Öffentliche API-Referenz
Endpunkte, Scopes und Beispiele für Tickets, Nachrichten und Aktionen.
Nutzen Sie API-Schlüssel mit Scopes, um Omnichannel-Tickets und Aktionen aus Ihren Systemen zu steuern.
Basis-URL
Alle Anfragen laufen über das öffentliche Gateway.
https://api.threada.ai Authentifizierung
- API-Schlüssel im Header `X-Api-Key` senden.
- Schlüssel in Admin → API keys erstellen und rotieren; ein Schlüssel pro Integration.
- Schlüssel sind mandantenbezogen und erzwingen Least-Privilege-Scopes.
Scopes
- `support.read` — Tickets, Nachrichten und Aktionen auflisten und abrufen.
- `support.write` — Tickets erstellen/aktualisieren und Nachrichten hinzufügen.
- `support.actions` — Aktionen ausführen und Status abfragen.
Paginierung
- Listen-Endpunkte akzeptieren `limit` und `page_token`.
- Geben Sie `next_page_token` in der nächsten Anfrage mit.
Fehler
- Fehler liefern `{ error: { type, message, code } }`.
- HTTP-Statuscodes entsprechen dem `code`-Wert.
Anfrage- und Antwortbeispiele
Tickets auflisten
Offene Tickets über alle Kanäle abrufen.
Anfrage
curl -X GET "https://api.threada.ai/api/v1/public/tickets?limit=25" \
-H "X-Api-Key: YOUR_API_KEY" Antwort
{
"items": [
{
"ticket_id": "TICKET_ID",
"tenant_id": "TENANT_ID",
"subject": "SUBJECT",
"status": "open",
"priority": "normal",
"channel": "email",
"tags": ["vip", "returns"],
"last_message_at": "2026-02-04T18:32:11Z"
}
],
"next_page_token": "NEXT_PAGE_TOKEN"
} Ticket erstellen
Neues Ticket mit einer Anfangsnachricht eröffnen.
Anfrage
curl -X POST "https://api.threada.ai/api/v1/public/tickets" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "SUBJECT",
"priority": "normal",
"channel": "email",
"contact": {
"name": "CUSTOMER_NAME",
"email": "customer@example.com"
},
"tags": ["returns"],
"initial_message": {
"role": "user",
"content": "MESSAGE_BODY",
"external_message_id": "EXT_MSG_ID"
}
}' Antwort
{
"ticket": {
"summary": {
"ticket_id": "TICKET_ID",
"tenant_id": "TENANT_ID",
"subject": "SUBJECT",
"status": "open",
"priority": "normal",
"channel": "email",
"tags": ["returns"],
"created_at": "2026-02-04T18:32:11Z"
},
"contact": {
"name": "CUSTOMER_NAME",
"email": "customer@example.com"
},
"messages": [
{
"message_id": "MESSAGE_ID",
"role": "user",
"content": "MESSAGE_BODY",
"channel": "email",
"created_at": "2026-02-04T18:32:11Z"
}
]
}
} Aktion ausführen
Eine benutzerdefinierte HTTP-Automation für ein Ticket auslösen.
Anfrage
curl -X POST "https://api.threada.ai/api/v1/public/tickets/TICKET_ID/actions" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"type": "custom_http",
"method": "POST",
"url": "/hooks/zapier",
"headers": {
"X-Source": "threada"
},
"body_json": "{\"event\":\"ticket_updated\"}"
}
}' Antwort
{
"action": {
"action_id": "ACTION_ID",
"tenant_id": "TENANT_ID",
"ticket_id": "TICKET_ID",
"action_type": "custom_http",
"status": "succeeded",
"requested_by": "api_key:API_KEY_ID",
"payload": {
"type": "custom_http",
"method": "POST",
"url": "/hooks/zapier",
"headers": {
"X-Source": "threada"
},
"body_json": "{\"event\":\"ticket_updated\"}"
}
}
} Mehr Endpunkte benötigt?
Kontaktieren Sie uns für erweiterten Zugriff, höhere Limits und Enterprise-SLAs.
Vertrieb kontaktieren