{"openapi":"3.1.0","info":{"title":"Qwetty Developer API","version":"2026-10-20","description":"Connect your applications to Qwetty: sync contacts, manage conversations, send messages, and receive signed webhook events. Authenticate with an API key and use the permissions listed for each operation.\n\nResponses are versioned by date. Send `Qwetty-Version: 2026-10-20` to choose one per request; without it, the key's pinned version answers. Every response says which version it is in. 2026-10-20 answers with one shape per object (`object`, nested references, ISO times, signed media) — the same shape webhooks carry on payload version 2026-10-20."},"servers":[{"url":"https://api.qwetty.com/api/v1"}],"paths":{"/webhooks":{"get":{"operationId":"get__webhooks","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:view. Requires all-channel access.","x-permissions":["webhooks:view"],"x-all-channels":true,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post__webhooks","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:manage. Requires all-channel access.","x-permissions":["webhooks:manage"],"x-all-channels":true,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"default":null,"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"url":{"type":"string"},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["message.incoming","message.outgoing","contact.created","contact.updated","contact.tagged","webhook.test","message.updated","chat.updated"]}},"channelAccess":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","const":"selected"},"channelIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","channelIds"]}]},"enabled":{"default":true,"type":"boolean"},"version":{"default":"2026-10-20","type":"string","enum":["legacy","2026-09-23","2026-10-20"]}},"required":["name","url","events","channelAccess"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"get":{"operationId":"get__webhooks_id","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:view. Requires all-channel access.","x-permissions":["webhooks:view"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch__webhooks_id","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:manage. Requires all-channel access.","x-permissions":["webhooks:manage"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"default":null,"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"url":{"type":"string"},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["message.incoming","message.outgoing","contact.created","contact.updated","contact.tagged","webhook.test","message.updated","chat.updated"]}},"channelAccess":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","const":"selected"},"channelIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","channelIds"]}]},"enabled":{"default":true,"type":"boolean"},"version":{"default":"2026-10-20","type":"string","enum":["legacy","2026-09-23","2026-10-20"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete__webhooks_id","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:manage. Requires all-channel access.","x-permissions":["webhooks:manage"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"204":{"description":"Deleted or acknowledged without a body"},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/rotate-secret":{"post":{"operationId":"post__webhooks_id_rotate_secret","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:manage. Requires all-channel access.","x-permissions":["webhooks:manage"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"operationId":"post__webhooks_id_test","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:deliver. Requires all-channel access.","x-permissions":["webhooks:deliver"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique within this key and operation. Completed results replay for 24 hours. Uncertain operations require reconciliation.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{}}}}},"responses":{"202":{"description":"Accepted for delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"operationId":"get__webhooks_id_deliveries","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:view. Requires all-channel access.","x-permissions":["webhooks:view"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/deliveries/{id}":{"get":{"operationId":"get__webhooks_deliveries_id","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:inspect. Requires all-channel access.","x-permissions":["webhooks:inspect"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/deliveries/{id}/redeliver":{"post":{"operationId":"post__webhooks_deliveries_id_redeliver","tags":["webhooks"],"security":[{"ApiKey":[]}],"description":"Required grants: webhooks:deliver. Requires all-channel access.","x-permissions":["webhooks:deliver"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique within this key and operation. Completed results replay for 24 hours. Uncertain operations require reconciliation.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{}}}}},"responses":{"202":{"description":"Accepted for delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/typing":{"post":{"operationId":"post__chats_id_typing","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:send_message. Resource visibility follows the key's channel access.","x-permissions":["chats:send_message"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique within this key and operation. Completed results replay for 24 hours. Uncertain operations require reconciliation.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"state":{"type":"string","enum":["on","off"]}},"required":["state"]}}}},"responses":{"204":{"description":"Deleted or acknowledged without a body"},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/handover":{"post":{"operationId":"post__chats_id_handover","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:send_message. Resource visibility follows the key's channel access.","x-permissions":["chats:send_message"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique within this key and operation. Completed results replay for 24 hours. Uncertain operations require reconciliation.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/read":{"post":{"operationId":"post__chats_id_read","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:mark_read. Resource visibility follows the key's channel access.","x-permissions":["chats:mark_read"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique within this key and operation. Completed results replay for 24 hours. Uncertain operations require reconciliation.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{}}}}},"responses":{"204":{"description":"Deleted or acknowledged without a body"},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/return-to-bot":{"post":{"operationId":"post__chats_id_return_to_bot","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:send_message. Resource visibility follows the key's channel access.","x-permissions":["chats:send_message"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique within this key and operation. Completed results replay for 24 hours. Uncertain operations require reconciliation.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages/template":{"post":{"operationId":"post__messages_template","tags":["messages"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:send_message. Resource visibility follows the key's channel access.","x-permissions":["chats:send_message"],"x-all-channels":false,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique within this key and operation. Completed results replay for 24 hours. Uncertain operations require reconciliation.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channelId":{"type":"string","minLength":1},"phoneNumber":{"type":"string","minLength":1},"templateId":{"type":"string","minLength":1},"parameters":{"type":"object","properties":{"header":{"type":"string","minLength":1,"maxLength":2048},"body":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":1024}},"buttons":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2048}}},"additionalProperties":false},"templateVariables":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["channelId","phoneNumber","templateId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Message"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/participants":{"get":{"operationId":"get__chats_id_participants","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:view. Resource visibility follows the key's channel access.","x-permissions":["chats:view"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Participant"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/templates":{"get":{"operationId":"get__chats_id_templates","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:view, templates:view. Resource visibility follows the key's channel access.","x-permissions":["chats:view","templates:view"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{id}/render":{"post":{"operationId":"post__templates_id_render","tags":["templates"],"security":[{"ApiKey":[]}],"description":"Required grants: templates:view. Resource visibility follows the key's channel access.","x-permissions":["templates:view"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"chatId":{"type":"string","minLength":1},"agentName":{"type":"string","maxLength":255},"parameters":{"type":"object","properties":{"header":{"type":"string","minLength":1,"maxLength":2048},"body":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":1024}},"buttons":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2048}}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/RenderedTemplate"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats":{"get":{"operationId":"get__chats","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:view. Resource visibility follows the key's channel access.","x-permissions":["chats:view"],"x-all-channels":false,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","description":"One or more of open, pending, snoozed, closed, comma-separated (2026-10-20).","schema":{"type":"string"}},{"name":"channelId","in":"query","description":"Only this channel's chats (2026-10-20).","schema":{"type":"string"}},{"name":"type","in":"query","description":"direct or group (2026-10-20).","schema":{"type":"string","enum":["direct","group"]}},{"name":"assignee","in":"query","description":"unassigned, or a user id (2026-10-20).","schema":{"type":"string"}},{"name":"updatedSince","in":"query","description":"Only chats changed after this ISO 8601 time: an incremental sync (2026-10-20).","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Chat"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post__chats","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:create. Resource visibility follows the key's channel access.","x-permissions":["chats:create"],"x-all-channels":false,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channelId":{"type":"string","minLength":1},"contactId":{"type":"string","minLength":1},"platformId":{"type":"string"},"phoneId":{"type":"string"}},"required":["channelId","contactId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}":{"get":{"operationId":"get__chats_id","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:view. Resource visibility follows the key's channel access.","x-permissions":["chats:view"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch__chats_id","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:edit. Resource visibility follows the key's channel access.","x-permissions":["chats:edit"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["open","pending","snoozed","closed"]},"snoozedUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/assign":{"post":{"operationId":"post__chats_id_assign","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:reassign_chat. Resource visibility follows the key's channel access.","x-permissions":["chats:reassign_chat"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":["string","null"]}},"required":["userId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Chat"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/messages":{"get":{"operationId":"get__chats_id_messages","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:view. Resource visibility follows the key's channel access.","x-permissions":["chats:view"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}},{"name":"after","in":"query","description":"A message id: the messages after it, oldest first, paging forward (2026-10-20).","schema":{"type":"string"}},{"name":"clientReference","in":"query","description":"The Idempotency-Key a message was sent with (2026-10-20).","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post__chats_id_messages","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:send_message. Resource visibility follows the key's channel access.","x-permissions":["chats:send_message"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique within this key and operation. Completed results replay for 24 hours. Uncertain operations require reconciliation.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"TEXT"},"content":{"type":"string","minLength":1,"maxLength":10000},"replyToId":{"type":"string","minLength":1}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT"]},"mediaUrl":{"type":"string","format":"uri"},"fileName":{"type":"string","minLength":1,"maxLength":255},"content":{"default":"","type":"string","maxLength":10000},"replyToId":{"type":"string","minLength":1}},"required":["type","mediaUrl","fileName"]},{"type":"object","properties":{"type":{"type":"string","const":"LOCATION"},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"locationName":{"type":"string"},"locationAddress":{"type":"string"},"replyToId":{"type":"string","minLength":1}},"required":["type","latitude","longitude"]},{"type":"object","properties":{"type":{"type":"string","const":"CONTACT"},"contactName":{"type":"string","minLength":1},"contactPhone":{"type":"string","minLength":1},"contactVcard":{"type":"string"},"replyToId":{"type":"string","minLength":1}},"required":["type","contactName","contactPhone"]},{"type":"object","properties":{"type":{"type":"string","const":"TEMPLATE"},"templateId":{"type":"string","minLength":1},"parameters":{"type":"object","properties":{"header":{"type":"string","minLength":1,"maxLength":2048},"body":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":1024}},"buttons":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":2048}}},"additionalProperties":false},"templateVariables":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"replyToId":{"type":"string","minLength":1}},"required":["type","templateId"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Message"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/messages/{messageId}":{"get":{"operationId":"get__chats_id_messages_messageId","tags":["chats"],"security":[{"ApiKey":[]}],"description":"Required grants: chats:view. Resource visibility follows the key's channel access.","x-permissions":["chats:view"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Message"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates":{"get":{"operationId":"get__templates","tags":["templates"],"security":[{"ApiKey":[]}],"description":"Required grants: templates:view. Resource visibility follows the key's channel access.","x-permissions":["templates:view"],"x-all-channels":false,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"channelId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{id}":{"get":{"operationId":"get__templates_id","tags":["templates"],"security":[{"ApiKey":[]}],"description":"Required grants: templates:view. Resource visibility follows the key's channel access.","x-permissions":["templates:view"],"x-all-channels":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Template"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/channels":{"get":{"operationId":"get__channels","tags":["channels"],"security":[{"ApiKey":[]}],"description":"Required grants: channels:view. Resource visibility follows the key's channel access.","x-permissions":["channels:view"],"x-all-channels":false,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts":{"get":{"operationId":"get__contacts","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:view. Requires all-channel access.","x-permissions":["contacts:view"],"x-all-channels":true,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"externalId","in":"query","schema":{"type":"string"}},{"name":"phone","in":"query","description":"Contacts reachable on this number, in any format: their phone, any of their numbers, or a WhatsApp identity.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post__contacts","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:create. Requires all-channel access.","x-permissions":["contacts:create"],"x-all-channels":true,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"phones":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"value":{"type":"string","minLength":1},"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"isPrimary":{"default":false,"type":"boolean"}},"required":["value"]}},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"value":{"type":"string","minLength":1},"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"isPrimary":{"default":false,"type":"boolean"}},"required":["value"]}},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"type":["string","null"]},"notes":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"externalId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{id}":{"get":{"operationId":"get__contacts_id","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:view. Requires all-channel access.","x-permissions":["contacts:view"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch__contacts_id","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:edit. Requires all-channel access.","x-permissions":["contacts:edit"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"phones":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"value":{"type":"string","minLength":1},"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"isPrimary":{"default":false,"type":"boolean"}},"required":["value"]}},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"value":{"type":"string","minLength":1},"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"isPrimary":{"default":false,"type":"boolean"}},"required":["value"]}},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"type":["string","null"]},"notes":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]},"tags":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":50}},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"externalId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete__contacts_id","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:delete. Requires all-channel access.","x-permissions":["contacts:delete"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"204":{"description":"Deleted or acknowledged without a body"},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/bulk":{"post":{"operationId":"post__contacts_bulk","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:create, contacts:edit. Requires all-channel access.","x-permissions":["contacts:create","contacts:edit"],"x-all-channels":true,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contacts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":255}},"required":["externalId"],"additionalProperties":{}}}},"required":["contacts"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{id}/opt-out":{"post":{"operationId":"post__contacts_id_opt_out","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:edit. Requires all-channel access.","x-permissions":["contacts:edit"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"description":"The 2026-10-20 shape. Keys pinned to 2026-09-23 receive the earlier flat rows.","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete__contacts_id_opt_out","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:edit. Requires all-channel access.","x-permissions":["contacts:edit"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"204":{"description":"Deleted or acknowledged without a body"},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{id}/platforms":{"get":{"operationId":"get__contacts_id_platforms","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:view. Requires all-channel access.","x-permissions":["contacts:view"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"Opaque cursor bound to the tenant, resource and filters.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post__contacts_id_platforms","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:edit. Requires all-channel access.","x-permissions":["contacts:edit"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"platformType":{"type":"string","enum":["WHATSAPP","WHATSAPP_API","WEB","INSTAGRAM","MESSENGER"]},"platformId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"channelId":{"type":["string","null"]}},"required":["platformType","platformId","name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{id}/platforms/{pid}":{"patch":{"operationId":"patch__contacts_id_platforms_pid","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:edit. Requires all-channel access.","x-permissions":["contacts:edit"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"pid","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"platformId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete__contacts_id_platforms_pid","tags":["contacts"],"security":[{"ApiKey":[]}],"description":"Required grants: contacts:edit. Requires all-channel access.","x-permissions":["contacts:edit"],"x-all-channels":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"pid","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"204":{"description":"Deleted or acknowledged without a body"},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"operationId":"get__me","tags":["me"],"security":[{"ApiKey":[]}],"description":"Required grants: valid API key. Resource visibility follows the key's channel access.","x-permissions":[],"x-all-channels":false,"parameters":[{"name":"Qwetty-Version","in":"header","required":false,"description":"The response version. Defaults to the API key's pinned version; echoed on every answer.","schema":{"type":"string","enum":["2026-09-23","2026-10-20"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error (see error.code). Rate rejection is 429; monthly quota is 403; unavailable admission is 503.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"message.incoming":{"post":{"summary":"message.incoming","description":"Signed with `X-Qwetty-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.<raw body>\">`; `X-Qwetty-Event-Id` is the delivery's dedupe key. Retried with backoff for 24 hours on 408, 425, 429, 5xx and network errors. Order is not guaranteed: compare `updatedAt`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type","occurredAt","version","data"],"properties":{"id":{"type":"string"},"type":{"const":"message.incoming"},"occurredAt":{"type":"string","format":"date-time"},"version":{"const":"2026-10-20"},"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"object","properties":{"object":{"type":"string","const":"message"},"id":{"type":"string"},"chatId":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"type":{"type":"string","enum":["text","image","video","audio","document","sticker","location","contact","template","poll","reaction","system","unsupported"]},"author":{"type":"object","properties":{"type":{"type":"string","enum":["contact","agent","chatbot","automation","phone","api","unknown"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"text":{"description":"Raw text in WhatsApp formatting; null once deleted","type":["string","null"]},"mentions":{"type":"array","items":{"type":"object","properties":{"tag":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["tag","name","phone"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"fileName":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"voice":{"type":"boolean"},"gif":{"type":"boolean","description":"A video WhatsApp marked as a GIF: play it muted and looping"},"thumbnailUrl":{"type":["string","null"]},"preview":{"description":"A ~20px image as a data URI, to draw before the file loads","type":["string","null"]},"waveform":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]}},"required":["id","url","expiresAt","fileName","mimeType","size","width","height","durationMs","voice","gif","thumbnailUrl","preview","waveform"],"additionalProperties":false}},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contactCard":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"vcard":{"type":["string","null"]}},"required":["name","phone","vcard"],"additionalProperties":false},{"type":"null"}]},"template":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"header":{"anyOf":[{"type":"object","properties":{"format":{"type":"string"},"text":{"type":["string","null"]}},"required":["format","text"],"additionalProperties":false},{"type":"null"}]},"footer":{"type":["string","null"]},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"]},"text":{"type":["string","null"]},"url":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]}},"required":["type","text","url","phoneNumber"],"additionalProperties":false}}},"required":["name","header","footer","buttons"],"additionalProperties":false},{"type":"null"}]},"poll":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"multipleAnswers":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"votes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","votes"],"additionalProperties":false}}},"required":["name","multipleAnswers","options"],"additionalProperties":false},{"type":"null"}]},"system":{"anyOf":[{"type":"object","properties":{"event":{"type":["string","null"]},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["event","data"],"additionalProperties":false},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":["string","null"]},"preview":{"type":["string","null"]},"authorName":{"type":["string","null"]}},"required":["id","type","preview","authorName"],"additionalProperties":false},{"type":"null"}]},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["business","contact"]},"name":{"type":["string","null"]}},"required":["type","name"],"additionalProperties":false}}},"required":["emoji","count","authors"],"additionalProperties":false}},"status":{"type":"string","enum":["sent","delivered","read","failed","received"],"description":"Outgoing: sent, delivered, read or failed. Incoming: received until someone reads it, then read"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"edited":{"type":"boolean"},"editedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deleted":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"forwarded":{"type":"boolean"},"clientReference":{"description":"The Idempotency-Key the message was sent with","type":["string","null"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","chatId","direction","type","author","text","mentions","media","location","contactCard","template","poll","system","replyTo","reactions","status","error","edited","editedAt","deleted","deletedAt","forwarded","clientReference","sentAt","deliveredAt","readAt","createdAt","updatedAt"],"additionalProperties":false},"chat":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","const":"chat"},"id":{"type":"string"},"type":{"type":"string","enum":["direct","group"]},"name":{"type":["string","null"]},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["url","expiresAt","version"],"additionalProperties":false},{"type":"null"}]},"channel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"}},"required":["id","type","name"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":["string","null"]}},"required":["id","name","phone"],"additionalProperties":false},{"type":"null"}]},"platformId":{"description":"The address on the channel: a phone number, a page-scoped id, a group id","type":["string","null"]},"status":{"type":"string","enum":["open","pending","snoozed","closed"]},"snoozedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"handledBy":{"anyOf":[{"type":"string","enum":["bot","agent"]},{"type":"null"}]},"lastMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"preview":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","type","preview","direction","sentAt"],"additionalProperties":false},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"window":{"anyOf":[{"type":"object","properties":{"open":{"type":"boolean"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["open","expiresAt"],"additionalProperties":false},{"type":"null"}],"description":"The reply window on channels that have one; null elsewhere"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","type","name","avatar","channel","contact","platformId","status","snoozedUntil","assignee","handledBy","lastMessage","unreadCount","window","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["object","chat"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received"}}}},"message.outgoing":{"post":{"summary":"message.outgoing","description":"Signed with `X-Qwetty-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.<raw body>\">`; `X-Qwetty-Event-Id` is the delivery's dedupe key. Retried with backoff for 24 hours on 408, 425, 429, 5xx and network errors. Order is not guaranteed: compare `updatedAt`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type","occurredAt","version","data"],"properties":{"id":{"type":"string"},"type":{"const":"message.outgoing"},"occurredAt":{"type":"string","format":"date-time"},"version":{"const":"2026-10-20"},"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"object","properties":{"object":{"type":"string","const":"message"},"id":{"type":"string"},"chatId":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"type":{"type":"string","enum":["text","image","video","audio","document","sticker","location","contact","template","poll","reaction","system","unsupported"]},"author":{"type":"object","properties":{"type":{"type":"string","enum":["contact","agent","chatbot","automation","phone","api","unknown"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"text":{"description":"Raw text in WhatsApp formatting; null once deleted","type":["string","null"]},"mentions":{"type":"array","items":{"type":"object","properties":{"tag":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["tag","name","phone"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"fileName":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"voice":{"type":"boolean"},"gif":{"type":"boolean","description":"A video WhatsApp marked as a GIF: play it muted and looping"},"thumbnailUrl":{"type":["string","null"]},"preview":{"description":"A ~20px image as a data URI, to draw before the file loads","type":["string","null"]},"waveform":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]}},"required":["id","url","expiresAt","fileName","mimeType","size","width","height","durationMs","voice","gif","thumbnailUrl","preview","waveform"],"additionalProperties":false}},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contactCard":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"vcard":{"type":["string","null"]}},"required":["name","phone","vcard"],"additionalProperties":false},{"type":"null"}]},"template":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"header":{"anyOf":[{"type":"object","properties":{"format":{"type":"string"},"text":{"type":["string","null"]}},"required":["format","text"],"additionalProperties":false},{"type":"null"}]},"footer":{"type":["string","null"]},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"]},"text":{"type":["string","null"]},"url":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]}},"required":["type","text","url","phoneNumber"],"additionalProperties":false}}},"required":["name","header","footer","buttons"],"additionalProperties":false},{"type":"null"}]},"poll":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"multipleAnswers":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"votes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","votes"],"additionalProperties":false}}},"required":["name","multipleAnswers","options"],"additionalProperties":false},{"type":"null"}]},"system":{"anyOf":[{"type":"object","properties":{"event":{"type":["string","null"]},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["event","data"],"additionalProperties":false},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":["string","null"]},"preview":{"type":["string","null"]},"authorName":{"type":["string","null"]}},"required":["id","type","preview","authorName"],"additionalProperties":false},{"type":"null"}]},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["business","contact"]},"name":{"type":["string","null"]}},"required":["type","name"],"additionalProperties":false}}},"required":["emoji","count","authors"],"additionalProperties":false}},"status":{"type":"string","enum":["sent","delivered","read","failed","received"],"description":"Outgoing: sent, delivered, read or failed. Incoming: received until someone reads it, then read"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"edited":{"type":"boolean"},"editedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deleted":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"forwarded":{"type":"boolean"},"clientReference":{"description":"The Idempotency-Key the message was sent with","type":["string","null"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","chatId","direction","type","author","text","mentions","media","location","contactCard","template","poll","system","replyTo","reactions","status","error","edited","editedAt","deleted","deletedAt","forwarded","clientReference","sentAt","deliveredAt","readAt","createdAt","updatedAt"],"additionalProperties":false},"chat":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","const":"chat"},"id":{"type":"string"},"type":{"type":"string","enum":["direct","group"]},"name":{"type":["string","null"]},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["url","expiresAt","version"],"additionalProperties":false},{"type":"null"}]},"channel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"}},"required":["id","type","name"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":["string","null"]}},"required":["id","name","phone"],"additionalProperties":false},{"type":"null"}]},"platformId":{"description":"The address on the channel: a phone number, a page-scoped id, a group id","type":["string","null"]},"status":{"type":"string","enum":["open","pending","snoozed","closed"]},"snoozedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"handledBy":{"anyOf":[{"type":"string","enum":["bot","agent"]},{"type":"null"}]},"lastMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"preview":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","type","preview","direction","sentAt"],"additionalProperties":false},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"window":{"anyOf":[{"type":"object","properties":{"open":{"type":"boolean"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["open","expiresAt"],"additionalProperties":false},{"type":"null"}],"description":"The reply window on channels that have one; null elsewhere"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","type","name","avatar","channel","contact","platformId","status","snoozedUntil","assignee","handledBy","lastMessage","unreadCount","window","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["object","chat"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received"}}}},"contact.created":{"post":{"summary":"contact.created","description":"Signed with `X-Qwetty-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.<raw body>\">`; `X-Qwetty-Event-Id` is the delivery's dedupe key. Retried with backoff for 24 hours on 408, 425, 429, 5xx and network errors. Order is not guaranteed: compare `updatedAt`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type","occurredAt","version","data"],"properties":{"id":{"type":"string"},"type":{"const":"contact.created"},"occurredAt":{"type":"string","format":"date-time"},"version":{"const":"2026-10-20"},"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"object","properties":{"object":{"type":"string","const":"contact"},"id":{"type":"string"},"externalId":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"phones":{"type":"array","items":{}},"emails":{"type":"array","items":{}},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["url","expiresAt"],"additionalProperties":false},{"type":"null"}]},"tags":{},"notes":{"type":["string","null"]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"optedOut":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"source":{"type":["string","null"]}},"required":["at","source"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","externalId","name","phone","email","phones","emails","avatar","tags","notes","customFields","optedOut","revision","createdAt","updatedAt"],"additionalProperties":false}},"required":["object"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received"}}}},"contact.updated":{"post":{"summary":"contact.updated","description":"Signed with `X-Qwetty-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.<raw body>\">`; `X-Qwetty-Event-Id` is the delivery's dedupe key. Retried with backoff for 24 hours on 408, 425, 429, 5xx and network errors. Order is not guaranteed: compare `updatedAt`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type","occurredAt","version","data"],"properties":{"id":{"type":"string"},"type":{"const":"contact.updated"},"occurredAt":{"type":"string","format":"date-time"},"version":{"const":"2026-10-20"},"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"object","properties":{"object":{"type":"string","const":"contact"},"id":{"type":"string"},"externalId":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"phones":{"type":"array","items":{}},"emails":{"type":"array","items":{}},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["url","expiresAt"],"additionalProperties":false},{"type":"null"}]},"tags":{},"notes":{"type":["string","null"]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"optedOut":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"source":{"type":["string","null"]}},"required":["at","source"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","externalId","name","phone","email","phones","emails","avatar","tags","notes","customFields","optedOut","revision","createdAt","updatedAt"],"additionalProperties":false},"changedFields":{"type":"array","items":{"type":"string"}}},"required":["object","changedFields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received"}}}},"contact.tagged":{"post":{"summary":"contact.tagged","description":"Signed with `X-Qwetty-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.<raw body>\">`; `X-Qwetty-Event-Id` is the delivery's dedupe key. Retried with backoff for 24 hours on 408, 425, 429, 5xx and network errors. Order is not guaranteed: compare `updatedAt`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type","occurredAt","version","data"],"properties":{"id":{"type":"string"},"type":{"const":"contact.tagged"},"occurredAt":{"type":"string","format":"date-time"},"version":{"const":"2026-10-20"},"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"object","properties":{"object":{"type":"string","const":"contact"},"id":{"type":"string"},"externalId":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"phones":{"type":"array","items":{}},"emails":{"type":"array","items":{}},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["url","expiresAt"],"additionalProperties":false},{"type":"null"}]},"tags":{},"notes":{"type":["string","null"]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"optedOut":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"source":{"type":["string","null"]}},"required":["at","source"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","externalId","name","phone","email","phones","emails","avatar","tags","notes","customFields","optedOut","revision","createdAt","updatedAt"],"additionalProperties":false}},"required":["object"],"additionalProperties":{}}}}}}},"responses":{"2XX":{"description":"Received"}}}},"message.updated":{"post":{"summary":"message.updated","description":"Signed with `X-Qwetty-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.<raw body>\">`; `X-Qwetty-Event-Id` is the delivery's dedupe key. Retried with backoff for 24 hours on 408, 425, 429, 5xx and network errors. Order is not guaranteed: compare `updatedAt`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type","occurredAt","version","data"],"properties":{"id":{"type":"string"},"type":{"const":"message.updated"},"occurredAt":{"type":"string","format":"date-time"},"version":{"const":"2026-10-20"},"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"object","properties":{"object":{"type":"string","const":"message"},"id":{"type":"string"},"chatId":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"type":{"type":"string","enum":["text","image","video","audio","document","sticker","location","contact","template","poll","reaction","system","unsupported"]},"author":{"type":"object","properties":{"type":{"type":"string","enum":["contact","agent","chatbot","automation","phone","api","unknown"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"text":{"description":"Raw text in WhatsApp formatting; null once deleted","type":["string","null"]},"mentions":{"type":"array","items":{"type":"object","properties":{"tag":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["tag","name","phone"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"fileName":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"voice":{"type":"boolean"},"gif":{"type":"boolean","description":"A video WhatsApp marked as a GIF: play it muted and looping"},"thumbnailUrl":{"type":["string","null"]},"preview":{"description":"A ~20px image as a data URI, to draw before the file loads","type":["string","null"]},"waveform":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]}},"required":["id","url","expiresAt","fileName","mimeType","size","width","height","durationMs","voice","gif","thumbnailUrl","preview","waveform"],"additionalProperties":false}},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contactCard":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"vcard":{"type":["string","null"]}},"required":["name","phone","vcard"],"additionalProperties":false},{"type":"null"}]},"template":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"header":{"anyOf":[{"type":"object","properties":{"format":{"type":"string"},"text":{"type":["string","null"]}},"required":["format","text"],"additionalProperties":false},{"type":"null"}]},"footer":{"type":["string","null"]},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"]},"text":{"type":["string","null"]},"url":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]}},"required":["type","text","url","phoneNumber"],"additionalProperties":false}}},"required":["name","header","footer","buttons"],"additionalProperties":false},{"type":"null"}]},"poll":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"multipleAnswers":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"votes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","votes"],"additionalProperties":false}}},"required":["name","multipleAnswers","options"],"additionalProperties":false},{"type":"null"}]},"system":{"anyOf":[{"type":"object","properties":{"event":{"type":["string","null"]},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["event","data"],"additionalProperties":false},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":["string","null"]},"preview":{"type":["string","null"]},"authorName":{"type":["string","null"]}},"required":["id","type","preview","authorName"],"additionalProperties":false},{"type":"null"}]},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["business","contact"]},"name":{"type":["string","null"]}},"required":["type","name"],"additionalProperties":false}}},"required":["emoji","count","authors"],"additionalProperties":false}},"status":{"type":"string","enum":["sent","delivered","read","failed","received"],"description":"Outgoing: sent, delivered, read or failed. Incoming: received until someone reads it, then read"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"edited":{"type":"boolean"},"editedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deleted":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"forwarded":{"type":"boolean"},"clientReference":{"description":"The Idempotency-Key the message was sent with","type":["string","null"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","chatId","direction","type","author","text","mentions","media","location","contactCard","template","poll","system","replyTo","reactions","status","error","edited","editedAt","deleted","deletedAt","forwarded","clientReference","sentAt","deliveredAt","readAt","createdAt","updatedAt"],"additionalProperties":false},"chat":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","const":"chat"},"id":{"type":"string"},"type":{"type":"string","enum":["direct","group"]},"name":{"type":["string","null"]},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["url","expiresAt","version"],"additionalProperties":false},{"type":"null"}]},"channel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"}},"required":["id","type","name"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":["string","null"]}},"required":["id","name","phone"],"additionalProperties":false},{"type":"null"}]},"platformId":{"description":"The address on the channel: a phone number, a page-scoped id, a group id","type":["string","null"]},"status":{"type":"string","enum":["open","pending","snoozed","closed"]},"snoozedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"handledBy":{"anyOf":[{"type":"string","enum":["bot","agent"]},{"type":"null"}]},"lastMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"preview":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","type","preview","direction","sentAt"],"additionalProperties":false},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"window":{"anyOf":[{"type":"object","properties":{"open":{"type":"boolean"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["open","expiresAt"],"additionalProperties":false},{"type":"null"}],"description":"The reply window on channels that have one; null elsewhere"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","type","name","avatar","channel","contact","platformId","status","snoozedUntil","assignee","handledBy","lastMessage","unreadCount","window","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"changes":{"type":"array","items":{"type":"string","enum":["status","content","reactions","deleted"]}}},"required":["object","chat","changes"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received"}}}},"chat.updated":{"post":{"summary":"chat.updated","description":"Signed with `X-Qwetty-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.<raw body>\">`; `X-Qwetty-Event-Id` is the delivery's dedupe key. Retried with backoff for 24 hours on 408, 425, 429, 5xx and network errors. Order is not guaranteed: compare `updatedAt`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type","occurredAt","version","data"],"properties":{"id":{"type":"string"},"type":{"const":"chat.updated"},"occurredAt":{"type":"string","format":"date-time"},"version":{"const":"2026-10-20"},"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"object","properties":{"object":{"type":"string","const":"chat"},"id":{"type":"string"},"type":{"type":"string","enum":["direct","group"]},"name":{"type":["string","null"]},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["url","expiresAt","version"],"additionalProperties":false},{"type":"null"}]},"channel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"}},"required":["id","type","name"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":["string","null"]}},"required":["id","name","phone"],"additionalProperties":false},{"type":"null"}]},"platformId":{"description":"The address on the channel: a phone number, a page-scoped id, a group id","type":["string","null"]},"status":{"type":"string","enum":["open","pending","snoozed","closed"]},"snoozedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"handledBy":{"anyOf":[{"type":"string","enum":["bot","agent"]},{"type":"null"}]},"lastMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"preview":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","type","preview","direction","sentAt"],"additionalProperties":false},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"window":{"anyOf":[{"type":"object","properties":{"open":{"type":"boolean"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["open","expiresAt"],"additionalProperties":false},{"type":"null"}],"description":"The reply window on channels that have one; null elsewhere"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","type","name","avatar","channel","contact","platformId","status","snoozedUntil","assignee","handledBy","lastMessage","unreadCount","window","createdAt","updatedAt"],"additionalProperties":false},"changes":{"type":"array","items":{"type":"string","enum":["status","assignee","handler","read","chat"]}}},"required":["object","changes"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"schemas":{"Channel":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"channel"},"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","description":"WHATSAPP, WHATSAPP_API, INSTAGRAM, MESSENGER or WEB"},"state":{"type":["string","null"]},"capabilities":{"type":"object","properties":{"messageTypes":{"type":"array","items":{"type":"string"}},"typingOn":{"type":"boolean"},"typingOff":{"type":"boolean"}},"required":["messageTypes","typingOn","typingOff"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","type","state","capabilities","createdAt"],"additionalProperties":false},"Chat":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"chat"},"id":{"type":"string"},"type":{"type":"string","enum":["direct","group"]},"name":{"type":["string","null"]},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["url","expiresAt","version"],"additionalProperties":false},{"type":"null"}]},"channel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"}},"required":["id","type","name"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phone":{"type":["string","null"]}},"required":["id","name","phone"],"additionalProperties":false},{"type":"null"}]},"platformId":{"description":"The address on the channel: a phone number, a page-scoped id, a group id","type":["string","null"]},"status":{"type":"string","enum":["open","pending","snoozed","closed"]},"snoozedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"handledBy":{"anyOf":[{"type":"string","enum":["bot","agent"]},{"type":"null"}]},"lastMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"preview":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","type","preview","direction","sentAt"],"additionalProperties":false},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"window":{"anyOf":[{"type":"object","properties":{"open":{"type":"boolean"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["open","expiresAt"],"additionalProperties":false},{"type":"null"}],"description":"The reply window on channels that have one; null elsewhere"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","type","name","avatar","channel","contact","platformId","status","snoozedUntil","assignee","handledBy","lastMessage","unreadCount","window","createdAt","updatedAt"],"additionalProperties":false},"Message":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"message"},"id":{"type":"string"},"chatId":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"type":{"type":"string","enum":["text","image","video","audio","document","sticker","location","contact","template","poll","reaction","system","unsupported"]},"author":{"type":"object","properties":{"type":{"type":"string","enum":["contact","agent","chatbot","automation","phone","api","unknown"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"text":{"description":"Raw text in WhatsApp formatting; null once deleted","type":["string","null"]},"mentions":{"type":"array","items":{"type":"object","properties":{"tag":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["tag","name","phone"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"fileName":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"voice":{"type":"boolean"},"gif":{"type":"boolean","description":"A video WhatsApp marked as a GIF: play it muted and looping"},"thumbnailUrl":{"type":["string","null"]},"preview":{"description":"A ~20px image as a data URI, to draw before the file loads","type":["string","null"]},"waveform":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]}},"required":["id","url","expiresAt","fileName","mimeType","size","width","height","durationMs","voice","gif","thumbnailUrl","preview","waveform"],"additionalProperties":false}},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contactCard":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"vcard":{"type":["string","null"]}},"required":["name","phone","vcard"],"additionalProperties":false},{"type":"null"}]},"template":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"header":{"anyOf":[{"type":"object","properties":{"format":{"type":"string"},"text":{"type":["string","null"]}},"required":["format","text"],"additionalProperties":false},{"type":"null"}]},"footer":{"type":["string","null"]},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"]},"text":{"type":["string","null"]},"url":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]}},"required":["type","text","url","phoneNumber"],"additionalProperties":false}}},"required":["name","header","footer","buttons"],"additionalProperties":false},{"type":"null"}]},"poll":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"multipleAnswers":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"votes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","votes"],"additionalProperties":false}}},"required":["name","multipleAnswers","options"],"additionalProperties":false},{"type":"null"}]},"system":{"anyOf":[{"type":"object","properties":{"event":{"type":["string","null"]},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["event","data"],"additionalProperties":false},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":["string","null"]},"preview":{"type":["string","null"]},"authorName":{"type":["string","null"]}},"required":["id","type","preview","authorName"],"additionalProperties":false},{"type":"null"}]},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["business","contact"]},"name":{"type":["string","null"]}},"required":["type","name"],"additionalProperties":false}}},"required":["emoji","count","authors"],"additionalProperties":false}},"status":{"type":"string","enum":["sent","delivered","read","failed","received"],"description":"Outgoing: sent, delivered, read or failed. Incoming: received until someone reads it, then read"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"edited":{"type":"boolean"},"editedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deleted":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"forwarded":{"type":"boolean"},"clientReference":{"description":"The Idempotency-Key the message was sent with","type":["string","null"]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","chatId","direction","type","author","text","mentions","media","location","contactCard","template","poll","system","replyTo","reactions","status","error","edited","editedAt","deleted","deletedAt","forwarded","clientReference","sentAt","deliveredAt","readAt","createdAt","updatedAt"],"additionalProperties":false},"Template":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"template"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"channelId":{"type":["string","null"]},"source":{"type":"string","enum":["meta","local"]},"language":{"type":["string","null"]},"category":{"type":["string","null"]},"approvalStatus":{"type":["string","null"]},"enabled":{"type":"boolean"},"header":{"anyOf":[{"type":"object","properties":{"text":{"type":["string","null"]},"variables":{"type":"array","items":{"type":"string"}},"format":{"type":"string"}},"required":["text","variables","format"],"additionalProperties":false},{"type":"null"}]},"body":{"type":"object","properties":{"text":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}}},"required":["text","variables"],"additionalProperties":false},"footer":{"type":["string","null"]},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"]},"text":{"type":["string","null"]},"url":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]},"variables":{"type":"array","items":{"type":"string"}}},"required":["type","text","url","phoneNumber","variables"],"additionalProperties":false}},"requiresOpenWindow":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","channelId","source","language","category","approvalStatus","enabled","header","body","footer","buttons","requiresOpenWindow","createdAt","updatedAt"],"additionalProperties":false},"Contact":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"contact"},"id":{"type":"string"},"externalId":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"phones":{"type":"array","items":{}},"emails":{"type":"array","items":{}},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["url","expiresAt"],"additionalProperties":false},{"type":"null"}]},"tags":{},"notes":{"type":["string","null"]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"optedOut":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"source":{"type":["string","null"]}},"required":["at","source"],"additionalProperties":false},{"type":"null"}]},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","externalId","name","phone","email","phones","emails","avatar","tags","notes","customFields","optedOut","revision","createdAt","updatedAt"],"additionalProperties":false},"Participant":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"participant"},"id":{"type":"string"},"phone":{"type":["string","null"]},"name":{"type":["string","null"]},"admin":{"type":"boolean"},"role":{"type":"string"}},"required":["object","id","phone","name","admin","role"],"additionalProperties":false},"RenderedTemplate":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"rendered_template"},"templateId":{"type":"string"},"source":{"type":"string","enum":["meta","local"]},"header":{"anyOf":[{"type":"object","properties":{"format":{"type":"string"},"text":{"type":["string","null"]},"mediaUrl":{"type":["string","null"]}},"required":["format","text","mediaUrl"],"additionalProperties":false},{"type":"null"}]},"body":{"type":"string"},"footer":{"type":["string","null"]},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"]},"text":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["type","text","url"],"additionalProperties":false}},"components":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}],"description":"Meta components; null for local templates"}},"required":["object","templateId","source","header","body","footer","buttons","components"],"additionalProperties":false},"ListMeta":{"type":"object","properties":{"pagination":{"type":"object","required":["nextCursor","hasMore"],"properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}}}}},"Success":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]}}}}}}},"Error":{"type":"object","required":["error","requestId"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}},"requestId":{"type":"string"}}}}}}