webhook-events
support.session.ratedThe customer rated a session after it ended (`data.support_session.csat`).
Parameters
GaiaDesk-Signaturestringheaderrequiredt=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the webhook secret>. Reject a delivery whose t is more than five minutes off, and de-duplicate by the event id.Payload
application/json
support.session.created, .customer_connected, .joined, .ended, .rated, .attachment_added (with data.attachment), .consent (with data.consent) and .waiting (with data.alert, the waiting alert). Every one carries the session's consent receipt, null until the customer answered: .created always fires before they are asked. id is stable across retries. livemode is false for a test session's events (they are delivered all the same). Never carries the join code, the desk or the embed token. The session carries the agents' notes, outcome and the customer's csat whenever they are known (a rating usually arrives after .ended: that is .rated).
idstringrequiredtypestringrequiredcreatedintegerrequiredlivemodebooleanrequireddataobjectrequiredShow child parameters
support_sessionobjectrequiredShow child parameters
idstringrequiredobjectstringrequiredlivemodebooleanrequiredfalse for a session a test key created.statestringrequiredwaiting (no agent has joined yet), joined (an agent joined; still open), ended (see end_reason), expired (reached expires_at).modestringrequiredview: the agent sees the shared tab. cobrowse: the agent may also point, highlight, click, scroll and type INSIDE the page (applied by the embed to its own DOM, never as OS input; the customer sees it and can stop it).customerobjectrequired_, - or .; values are strings of at most 200 plain characters, numbers or booleans; at most 2 KB in all. Shown to the company's own agents and webhooks only, and never written to the audit trail (only the field names are).customer_verifiedbooleanrequiredfalse when a publishable key (the page itself) created the session: its customer is what the page said.external_idstringrequirednull.metadataobjectrequired_, - or .; each value a string of at most 500 characters without control characters.originstringrequiredapp://…) the embed must run on, if pinned.ownerstringrequiredcreated_atintegerrequiredexpires_atintegerrequiredexpired) then.joined_atintegerrequirednull.joined_bystringrequiredended_atintegerrequirednull.end_reasonstringrequiredstopped (the customer pressed Stop), customer_cancelled (the customer, or their app, stopped while still waiting: no agent had joined), disconnected (their tab or app went away), expired (reached expires_at), ended_by_api (POST /support/sessions/{id}/end), customer_declined (the customer declined the consent step while waiting), consent_timeout (nobody answered the consent step in time). null while open.duration_secondsintegerrequiredcreated_at to ended_at, once ended; else null.clientobjectrequirednull when not given.admin_urlstringrequiredhttps:// only), else null.connected_atintegerrequirednull.notesstringrequiredPATCH /support/sessions/{id}); never the customer's to see.outcomestringrequiredresolved, follow_up or bug; null until set.csatobjectrequiredPOST /support/sessions/{id}/csat), once given; else null.consentConsentReceiptrequiredPOST /support/sessions/{id}/consent), once recorded; else null.agentobjectsupport.session.joined only: the agent who joined.Show child parameters
emailstringrequiredattachmentobjectsupport.session.attachment_added only: the file (never its bytes).Show child parameters
objectstringrequiredidstringrequiredsession_idstringrequiredfilenamestringrequiredcontent_typestringrequiredtype/subtype), else application/octet-stream. A label only.sizeintegerrequiredcreated_atintegerrequiredconsentobjectsupport.session.consent only: the receipt just recorded.Show child parameters
idstringrequireddecisionstringrequiredatstringrequiredsurfacestringrequirednative_dialog (the library's dialog) or embedded (the web component, or the app's own UI).localestringrequiredwording_versionstringrequiredwording_sha256stringrequiredchoicesobjectrequiredos_userstringnull.osstringrequiredapp_namestringapp_versionstringsdkstringrequiredlibgaiadesk_embed/0.4.0, the web bridge's gaiadesk-consent/0.1.0).alertobjectsupport.session.waiting only: the waiting alert, exactly what Slack, Discord, email and push said.Show child parameters
objectstringrequiredsession_idstringrequiredjoin_urlstringrequiredjoin_url).customerobjectrequiredwaiting_secondsintegerrequiredsummarystringrequired"<name> (<external_id>) has been waiting <1 min 5 s> for support." (the parenthesis only when external_id is known).{
"id": "string",
"type": "support.session.created",
"created": 0,
"livemode": true,
"data": {
"support_session": {
"id": "string",
"object": "support_session",
"livemode": true,
"state": "waiting",
"mode": "view",
"customer": {},
"customer_verified": true,
"external_id": "string",
"metadata": {},
"origin": "string",
"owner": "string",
"created_at": 0,
"expires_at": 0,
"joined_at": 0,
"joined_by": "string",
"ended_at": 0,
"end_reason": "stopped",
"duration_seconds": 0,
"client": {
"os": "string",
"os_version": "string",
"app_version": "string",
"sdk": "string",
"sdk_version": "string"
},
"admin_url": "string",
"connected_at": 0,
"notes": "string",
"outcome": "resolved",
"csat": {
"rating": 0,
"comment": "string",
"rated_at": 0
},
"consent": {
"id": "string",
"decision": "accepted",
"at": "2024-01-01T00:00:00Z",
"surface": "native_dialog",
"locale": "string",
"wording_version": "string",
"wording_sha256": "string",
"choices": {
"guided": true,
"share_logs": true,
"capture": "window"
},
"os_user": "string",
"os": "string",
"app_name": "string",
"app_version": "string",
"sdk": "string"
}
},
"agent": {
"email": "string"
},
"attachment": {
"object": "support_attachment",
"id": "string",
"session_id": "string",
"filename": "string",
"content_type": "string",
"size": 0,
"created_at": 0
},
"consent": {
"id": "string",
"decision": "accepted",
"at": "2024-01-01T00:00:00Z",
"surface": "native_dialog",
"locale": "string",
"wording_version": "string",
"wording_sha256": "string",
"choices": {
"guided": true,
"share_logs": true,
"capture": "window"
},
"os_user": "string",
"os": "string",
"app_name": "string",
"app_version": "string",
"sdk": "string"
},
"alert": {
"object": "support_waiting_alert",
"session_id": "string",
"join_url": "string",
"customer": {
"name": "string",
"external_id": "string"
},
"waiting_seconds": 0,
"summary": "string"
}
}
}Responses
support.session.attachment_addedThe customer sent a file with a session (`data.attachment`; fetch its bytes with `GET /support/sessions/{id}/attachments/{attachment_id}`).
Parameters
GaiaDesk-Signaturestringheaderrequiredt=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the webhook secret>. Reject a delivery whose t is more than five minutes off, and de-duplicate by the event id.Payload
application/json
support.session.created, .customer_connected, .joined, .ended, .rated, .attachment_added (with data.attachment), .consent (with data.consent) and .waiting (with data.alert, the waiting alert). Every one carries the session's consent receipt, null until the customer answered: .created always fires before they are asked. id is stable across retries. livemode is false for a test session's events (they are delivered all the same). Never carries the join code, the desk or the embed token. The session carries the agents' notes, outcome and the customer's csat whenever they are known (a rating usually arrives after .ended: that is .rated).
idstringrequiredtypestringrequiredcreatedintegerrequiredlivemodebooleanrequireddataobjectrequiredShow child parameters
support_sessionobjectrequiredShow child parameters
idstringrequiredobjectstringrequiredlivemodebooleanrequiredfalse for a session a test key created.statestringrequiredwaiting (no agent has joined yet), joined (an agent joined; still open), ended (see end_reason), expired (reached expires_at).modestringrequiredview: the agent sees the shared tab. cobrowse: the agent may also point, highlight, click, scroll and type INSIDE the page (applied by the embed to its own DOM, never as OS input; the customer sees it and can stop it).customerobjectrequired_, - or .; values are strings of at most 200 plain characters, numbers or booleans; at most 2 KB in all. Shown to the company's own agents and webhooks only, and never written to the audit trail (only the field names are).customer_verifiedbooleanrequiredfalse when a publishable key (the page itself) created the session: its customer is what the page said.external_idstringrequirednull.metadataobjectrequired_, - or .; each value a string of at most 500 characters without control characters.originstringrequiredapp://…) the embed must run on, if pinned.ownerstringrequiredcreated_atintegerrequiredexpires_atintegerrequiredexpired) then.joined_atintegerrequirednull.joined_bystringrequiredended_atintegerrequirednull.end_reasonstringrequiredstopped (the customer pressed Stop), customer_cancelled (the customer, or their app, stopped while still waiting: no agent had joined), disconnected (their tab or app went away), expired (reached expires_at), ended_by_api (POST /support/sessions/{id}/end), customer_declined (the customer declined the consent step while waiting), consent_timeout (nobody answered the consent step in time). null while open.duration_secondsintegerrequiredcreated_at to ended_at, once ended; else null.clientobjectrequirednull when not given.admin_urlstringrequiredhttps:// only), else null.connected_atintegerrequirednull.notesstringrequiredPATCH /support/sessions/{id}); never the customer's to see.outcomestringrequiredresolved, follow_up or bug; null until set.csatobjectrequiredPOST /support/sessions/{id}/csat), once given; else null.consentConsentReceiptrequiredPOST /support/sessions/{id}/consent), once recorded; else null.agentobjectsupport.session.joined only: the agent who joined.Show child parameters
emailstringrequiredattachmentobjectsupport.session.attachment_added only: the file (never its bytes).Show child parameters
objectstringrequiredidstringrequiredsession_idstringrequiredfilenamestringrequiredcontent_typestringrequiredtype/subtype), else application/octet-stream. A label only.sizeintegerrequiredcreated_atintegerrequiredconsentobjectsupport.session.consent only: the receipt just recorded.Show child parameters
idstringrequireddecisionstringrequiredatstringrequiredsurfacestringrequirednative_dialog (the library's dialog) or embedded (the web component, or the app's own UI).localestringrequiredwording_versionstringrequiredwording_sha256stringrequiredchoicesobjectrequiredos_userstringnull.osstringrequiredapp_namestringapp_versionstringsdkstringrequiredlibgaiadesk_embed/0.4.0, the web bridge's gaiadesk-consent/0.1.0).alertobjectsupport.session.waiting only: the waiting alert, exactly what Slack, Discord, email and push said.Show child parameters
objectstringrequiredsession_idstringrequiredjoin_urlstringrequiredjoin_url).customerobjectrequiredwaiting_secondsintegerrequiredsummarystringrequired"<name> (<external_id>) has been waiting <1 min 5 s> for support." (the parenthesis only when external_id is known).{
"id": "string",
"type": "support.session.created",
"created": 0,
"livemode": true,
"data": {
"support_session": {
"id": "string",
"object": "support_session",
"livemode": true,
"state": "waiting",
"mode": "view",
"customer": {},
"customer_verified": true,
"external_id": "string",
"metadata": {},
"origin": "string",
"owner": "string",
"created_at": 0,
"expires_at": 0,
"joined_at": 0,
"joined_by": "string",
"ended_at": 0,
"end_reason": "stopped",
"duration_seconds": 0,
"client": {
"os": "string",
"os_version": "string",
"app_version": "string",
"sdk": "string",
"sdk_version": "string"
},
"admin_url": "string",
"connected_at": 0,
"notes": "string",
"outcome": "resolved",
"csat": {
"rating": 0,
"comment": "string",
"rated_at": 0
},
"consent": {
"id": "string",
"decision": "accepted",
"at": "2024-01-01T00:00:00Z",
"surface": "native_dialog",
"locale": "string",
"wording_version": "string",
"wording_sha256": "string",
"choices": {
"guided": true,
"share_logs": true,
"capture": "window"
},
"os_user": "string",
"os": "string",
"app_name": "string",
"app_version": "string",
"sdk": "string"
}
},
"agent": {
"email": "string"
},
"attachment": {
"object": "support_attachment",
"id": "string",
"session_id": "string",
"filename": "string",
"content_type": "string",
"size": 0,
"created_at": 0
},
"consent": {
"id": "string",
"decision": "accepted",
"at": "2024-01-01T00:00:00Z",
"surface": "native_dialog",
"locale": "string",
"wording_version": "string",
"wording_sha256": "string",
"choices": {
"guided": true,
"share_logs": true,
"capture": "window"
},
"os_user": "string",
"os": "string",
"app_name": "string",
"app_version": "string",
"sdk": "string"
},
"alert": {
"object": "support_waiting_alert",
"session_id": "string",
"join_url": "string",
"customer": {
"name": "string",
"external_id": "string"
},
"waiting_seconds": 0,
"summary": "string"
}
}
}