Skip to content
Developer docs
⌘ K
Dashboard ↗

HTTP endpoints

revokeEmbedSession

End a session before it expires. The frame's next read fails with session_expired. Needs embed:write.

DELETE /api/v1/embed/sessions/{sessionId}

Requires embed:write. Keep the Bearer key on your server.

SDK

ts
grizzlee.revokeEmbedSession(sessionId: string): Promise<EmbedSession>

HTTP

Use your backend's HTTP client. The cURL request shows the wire format. Replace path parameters and example values.

sh
curl --fail-with-body --request DELETE \
  'https://app.grizzlee.ca/api/v1/embed/sessions/{sessionId}' \
  -H "Authorization: Bearer $GRIZZLEE_SERVER_KEY"

Response

HTTP responses wrap this value in data. The SDK returns the value directly unless the note above describes a wrapper.

FieldTypeRequiredDetails
idstringYes
partnerIdstringYes
partnerExternalIdstringYes
programIdsunionYesNull includes all programs. Otherwise only these memberships are visible.
placementunionYes
localeunionYes
layoutunionYes
actionsarrayYes
embedOriginunionYesThe parent page origin the merchant expects, or null when the session allows any listed origin.
expiresAtstringYes
createdAtstringYes
consumedAtunionYesWhen the frame exchanged the start token.
revokedAtunionYes

programIds

Variant 1

Type: null.

Variant 2

Type: array.

placement

Variant 1

Type: null.

Variant 2

Type: string.

locale

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

layout

Variant 1

Type: string.

Variant 2

Type: string.

actions[]

Variant 1

Type: string.

Variant 2

Type: string.

embedOrigin

Variant 1

Type: null.

Variant 2

Type: string.

consumedAt

Variant 1

Type: null.

Variant 2

Type: string.

revokedAt

Variant 1

Type: null.

Variant 2

Type: string.

Response schema

json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "partnerId": {
      "type": "string"
    },
    "partnerExternalId": {
      "type": "string"
    },
    "programIds": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Null includes all programs. Otherwise only these memberships are visible."
    },
    "placement": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    },
    "locale": {
      "anyOf": [
        {
          "type": "string",
          "const": "en"
        },
        {
          "type": "string",
          "const": "fr-CA"
        },
        {
          "type": "string",
          "const": "hy"
        },
        {
          "type": "string",
          "const": "ru"
        }
      ]
    },
    "layout": {
      "anyOf": [
        {
          "type": "string",
          "const": "full"
        },
        {
          "type": "string",
          "const": "simple"
        }
      ]
    },
    "actions": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string",
            "const": "payout_details:write"
          },
          {
            "type": "string",
            "const": "profile:write"
          }
        ]
      }
    },
    "embedOrigin": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ],
      "description": "The parent page origin the merchant expects, or null when the session allows any listed origin."
    },
    "expiresAt": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "consumedAt": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ],
      "description": "When the frame exchanged the start token."
    },
    "revokedAt": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "required": [
    "id",
    "partnerId",
    "partnerExternalId",
    "programIds",
    "placement",
    "locale",
    "layout",
    "actions",
    "embedOrigin",
    "expiresAt",
    "createdAt",
    "consumedAt",
    "revokedAt"
  ]
}

Errors

Failures return { "error": { "code": "...", "message": "...", "details": {} } }. Details are optional. See error statuses. Reuse an unchanged event payload when retrying.