string
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.example.com/api/webhooks/gorgias' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"ticket_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ticket": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"messages": [
{
"from_agent": true,
"public": true,
"body_text": "string",
"body_html": "string",
"source": {
"extra": {
"suppress_in_chat": true,
"kind": "standard"
}
}
}
],
"message": {
"from_agent": true,
"public": true,
"body_text": "string",
"body_html": "string",
"source": {
"extra": {
"suppress_in_chat": true,
"kind": "standard"
}
}
},
"body_text": "string"
}'
{
"ok": true,
"threadId": "string",
"messagesAdded": 1
}
Gorgias HTTP integration webhook (agent replies into the chat thread)
Authenticated by the token query parameter matching GORGIAS_WEBHOOK_SECRET. In production a missing secret answers 503 webhook_not_configured…
POST
/
api
/
webhooks
/
gorgias
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.example.com/api/webhooks/gorgias' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"ticket_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ticket": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"messages": [
{
"from_agent": true,
"public": true,
"body_text": "string",
"body_html": "string",
"source": {
"extra": {
"suppress_in_chat": true,
"kind": "standard"
}
}
}
],
"message": {
"from_agent": true,
"public": true,
"body_text": "string",
"body_html": "string",
"source": {
"extra": {
"suppress_in_chat": true,
"kind": "standard"
}
}
},
"body_text": "string"
}'
{
"ok": true,
"threadId": "string",
"messagesAdded": 1
}
Authenticated by the
token query parameter matching GORGIAS_WEBHOOK_SECRET. In
production a missing secret answers 503 webhook_not_configured; outside production the
gate is skipped. Public agent messages (from_agent: true, public !== false) are
appended to the earliest thread carrying the ticket id; acknowledgement messages and
messages flagged source.extra.suppress_in_chat are skipped.
Request body
GorgiasWebhookPayload
Response
object | object
Status codes
| Code | Meaning |
|---|---|
200 | Processed or skipped |
401 | Bad or missing token |
500 | Unhandled error |
503 | Production deployment without GORGIAS_WEBHOOK_SECRET |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.example.com/api/webhooks/gorgias' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"ticket_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ticket": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"messages": [
{
"from_agent": true,
"public": true,
"body_text": "string",
"body_html": "string",
"source": {
"extra": {
"suppress_in_chat": true,
"kind": "standard"
}
}
}
],
"message": {
"from_agent": true,
"public": true,
"body_text": "string",
"body_html": "string",
"source": {
"extra": {
"suppress_in_chat": true,
"kind": "standard"
}
}
},
"body_text": "string"
}'
{
"ok": true,
"threadId": "string",
"messagesAdded": 1
}
Last modified on November 13, 2026