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
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.
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.
| Field | Type | Required | Details |
|---|---|---|---|
id | string | Yes | |
partnerId | string | Yes | |
partnerExternalId | string | Yes | |
programIds | union | Yes | Null includes all programs. Otherwise only these memberships are visible. |
placement | union | Yes | |
locale | union | Yes | |
layout | union | Yes | |
actions | array | Yes | |
embedOrigin | union | Yes | The parent page origin the merchant expects, or null when the session allows any listed origin. |
expiresAt | string | Yes | |
createdAt | string | Yes | |
consumedAt | union | Yes | When the frame exchanged the start token. |
revokedAt | union | Yes |
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
{
"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.