Konversation erstellen
Entwickler können über die API Konversationen erstellen.
Anfragemethode
POST
Anfrage-URL
https://livedesk-api.engagelab.com/api/v2/accounts/conversations
Authentifizierung
Einzelheiten zur Authentifizierung finden Sie in der API-Übersicht.
Anfrage
Anfragebeispiel
curl -X POST https://livedesk-api.engagelab.com/api/v2/accounts/conversations \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
{
"inbox_id": 407, // Erforderlich
"contact_id": 2219256, // Geben Sie entweder contact_id oder source_id an, damit der Absender korrekt identifiziert werden kann
"source_id": "123456789"
}
curl -X POST https://livedesk-api.engagelab.com/api/v2/accounts/conversations \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
{
"inbox_id": 407, // Erforderlich
"contact_id": 2219256, // Geben Sie entweder contact_id oder source_id an, damit der Absender korrekt identifiziert werden kann
"source_id": "123456789"
}
Diesen Codeblock im schwebenden Fenster anzeigen
Anfrage-Header-Parameter
| Feld | Typ | Beschreibung |
|---|---|---|
| Authorization | string | Verwenden Sie Authorization: Basic base64(API Key:API Secret) zur Authentifizierung. Rufen Sie API Key und API Secret auf der API-Key-Seite ab, verbinden Sie beide mit einem Doppelpunkt und kodieren Sie sie anschließend mit Base64. |
| Content-Type | application/json | Dies ist das Datenformat der Anfrage. Verwenden Sie application/json. |
Request-Body-Parameter
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| inbox_id | String | Ja | Kanal-ID. Sie entspricht der ID, die in der API zum Erstellen eines Kontakts verwendet wird. |
| contact_id | String | Nein | Kontakt-ID. Dies ist die id, die in der Antwort der API zum Erstellen eines Kontakts zurückgegeben wird. |
| source_id | String | Nein | Quell-ID. |
Antwort
Antwortbeispiel
{
"meta": {
"sender": {
"additional_attributes": {},
"availability_status": "offline",
"email": null,
"id": 2219256,
"name": "wjTest",
"phone_number": null,
"blocked": false,
"identifier": null,
"thumbnail": "",
"custom_attributes": {},
"created_at": 1766571624
},
"channel": "Channel::Api",
"hmac_verified": false
},
"id": 40,
"messages": [],
"account_id": 17623000010928,
"uuid": "660ce36f-46bb-4153-948c-8a26e6dab634",
"inbox_id": 407,
"additional_attributes": {},
"agent_last_seen_at": 0,
"assignee_last_seen_at": 0,
"can_reply": true,
"contact_last_seen_at": 0,
"custom_attributes": {},
"labels": [],
"muted": false,
"snoozed_until": null,
"status": "open",
"priority": null,
"conversation_category": "chat",
"chat_mode": "private_chat",
"is_forum": false,
"created_at": 1766572062,
"updated_at": 1766572062.5803902,
"timestamp": 1766572062,
"first_reply_created_at": 0,
"unread_count": 0,
"last_non_activity_message": null,
"last_activity_at": 1766572062,
"waiting_since": 1766572062,
"sla_policy_id": null,
"ticket_id": null,
"over_limit": false,
"content_preview": {
"content": null,
"message_type": null,
"created_at": null
},
"platform": {
"channel_type": "Channel::Api",
"inbox_name": "JennyApi",
"inbox_id": 407
},
"account_info": {
"contact_name": "wjTest",
"contact_email": null,
"contact_phone": null,
"contact_id": 2219256,
"contact_avatar": ""
},
"assignment": {
"assignee_id": null,
"assignee_name": null,
"assignee_email": null,
"team_id": null,
"team_name": null
}
}
{
"meta": {
"sender": {
"additional_attributes": {},
"availability_status": "offline",
"email": null,
"id": 2219256,
"name": "wjTest",
"phone_number": null,
"blocked": false,
"identifier": null,
"thumbnail": "",
"custom_attributes": {},
"created_at": 1766571624
},
"channel": "Channel::Api",
"hmac_verified": false
},
"id": 40,
"messages": [],
"account_id": 17623000010928,
"uuid": "660ce36f-46bb-4153-948c-8a26e6dab634",
"inbox_id": 407,
"additional_attributes": {},
"agent_last_seen_at": 0,
"assignee_last_seen_at": 0,
"can_reply": true,
"contact_last_seen_at": 0,
"custom_attributes": {},
"labels": [],
"muted": false,
"snoozed_until": null,
"status": "open",
"priority": null,
"conversation_category": "chat",
"chat_mode": "private_chat",
"is_forum": false,
"created_at": 1766572062,
"updated_at": 1766572062.5803902,
"timestamp": 1766572062,
"first_reply_created_at": 0,
"unread_count": 0,
"last_non_activity_message": null,
"last_activity_at": 1766572062,
"waiting_since": 1766572062,
"sla_policy_id": null,
"ticket_id": null,
"over_limit": false,
"content_preview": {
"content": null,
"message_type": null,
"created_at": null
},
"platform": {
"channel_type": "Channel::Api",
"inbox_name": "JennyApi",
"inbox_id": 407
},
"account_info": {
"contact_name": "wjTest",
"contact_email": null,
"contact_phone": null,
"contact_id": 2219256,
"contact_avatar": ""
},
"assignment": {
"assignee_id": null,
"assignee_name": null,
"assignee_email": null,
"team_id": null,
"team_name": null
}
}
Diesen Codeblock im schwebenden Fenster anzeigen
Antwortparameter
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| meta | Object | Nein | Metadatenobjekt. |
| sender | Object | Nein | Informationen zum Absender. |
| additional_attributes | Object | Nein | Zusätzliche Attribute. |
| availability_status | String | Nein | Verfügbarkeitsstatus. |
| Null | Nein | E-Mail-Adresse. | |
| id | Number | Nein | Kontakt-ID. |
| name | String | Nein | Absendername. |
| phone_number | Null | Nein | Telefonnummer. |
| blocked | Boolean | Nein | Gibt an, ob blockiert. |
| identifier | Null | Nein | Kennung des Benutzerattributs. |
| thumbnail | String | Nein | Miniaturbild. |
| custom_attributes | Object | Nein | Benutzerdefinierte Attribute. |
| created_at | Number | Nein | Zeitstempel der Konversationserstellung. |
| channel | String | Nein | Kanaltyp. |
| hmac_verified | Boolean | Nein | HMAC-Verifizierungsstatus. |
| id | Number | Nein | Konversations-ID. |
| messages | Array | Nein | Nachrichtenarray. |
| account_id | Number | Nein | Projekt-ID. |
| uuid | String | Nein | Eindeutige Kennung. |
| inbox_id | Number | Nein | Kanal-ID. |
| additional_attributes | Object | Nein | Zusätzliche Attribute. |
| agent_last_seen_at | Number | Nein | Letzte Sichtung des Agenten. |
| assignee_last_seen_at | Number | Nein | Letzte Sichtung des Bearbeiters. |
| can_reply | Boolean | Nein | Gibt an, ob geantwortet werden kann. |
| contact_last_seen_at | Number | Nein | Letzte Sichtung des Kontakts. |
| custom_attributes | Object | Nein | Benutzerdefinierte Attribute. |
| labels | Array | Nein | Label-Array. |
| muted | Boolean | Nein | Gibt an, ob stummgeschaltet. |
| snoozed_until | Null | Nein | Snooze bis. |
| status | String | Nein | Status. |
| priority | Null | Nein | Priorität. |
| conversation_category | String | Nein | Konversationskategorie. |
| chat_mode | String | Nein | Chat-Modus. |
| is_forum | Boolean | Nein | Gibt an, ob Forum. |
| created_at | Number | Nein | Erstellungszeitstempel. |
| updated_at | Number | Nein | Aktualisierungszeitstempel. |
| timestamp | Number | Nein | Zeitstempel. |
| first_reply_created_at | Number | Nein | Erstellungszeit der ersten Antwort. |
| unread_count | Number | Nein | Anzahl ungelesener Nachrichten. |
| last_non_activity_message | Null | Nein | Letzte Nicht-Aktivitätsnachricht. |
| last_activity_at | Number | Nein | Zeitpunkt der letzten Aktivität. |
| waiting_since | Number | Nein | Beginn der Wartezeit. |
| sla_policy_id | Null | Nein | SLA-Richtlinien-ID. |
| ticket_id | Null | Nein | Ticket-ID. |
| over_limit | Boolean | Nein | Gibt an, ob das Limit überschritten wurde. |
| content_preview | Object | Nein | Inhaltsvorschau. |
| content_preview.content | Null | Nein | Vorschauinhalt. |
| content_preview.message_type | Null | Nein | Nachrichtentyp. |
| content_preview.created_at | Null | Nein | Erstellungszeit. |
| platform | Object | Nein | Plattforminformationen. |
| channel_type | String | Nein | Kanaltyp. |
| inbox_name | String | Nein | Name des Posteingangs. |
| inbox_id | Number | Nein | ID des Posteingangs. |
| account_info | Object | Nein | Kontoinformationen. |
| contact_name | String | Nein | Kontaktname. |
| contact_email | Null | Nein | Kontakt-E-Mail. |
| contact_phone | Null | Nein | Kontakttelefon. |
| contact_id | Number | Nein | Kontakt-ID. |
| contact_avatar | String | Nein | Kontakt-Avatar. |
| assignment | Object | Nein | Zuweisungsinformationen. |
| assignee_id | Null | Nein | Bearbeiter-ID. |
| assignee_name | Null | Nein | Bearbeitername. |
| assignee_email | Null | Nein | Bearbeiter-E-Mail. |
| team_id | Null | Nein | Team-ID. |
| team_name | Null | Nein | Teamname. |










