Add Conversation
Create a new conversation in an account. Creating a conversation requires a source id in order to tie the session and the messages together. The source id could be the phone number in case of a WhatsApp session, identifier hash in case of a web widget and email in case of email channel.
Settings:
|
URL |
https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations |
|
Method |
JSON via POST |
Authorization:
|
Header Parameter |
Description |
|
api_access_token |
user API key |
The user API key provides access to endpoints based on the user permissions levels and can be obtained by visiting the profile page.
Path Parameters:
|
Parameter |
Description |
Required |
|
account_id |
The numeric id of the account |
yes |
Request body Parameters:
|
Parameter |
type |
Description |
Required |
|
inbox_id |
string |
Id of inbox in which the conversation is created |
yes |
|
source_id |
string |
Conversation source id |
no |
|
status |
string |
Conversation status
|
no |
|
contact_id |
string |
Contact id for which the conversation is created |
no |
|
assignee_id |
string |
Agent id for assigning the conversation to an agent |
no |
|
team_id |
string |
Team id for assigning the conversation to a team |
no |
|
custom_attributes |
object |
The object to save custom attributes for conversation, accepts custom attributes key and value |
no |
|
additional_attributes |
object |
Lets you specify attributes like browser information |
no |
Request body example:
{
"source_id": "string",
"inbox_id": "string",
"contact_id": "string",
"additional_attributes": {},
"custom_attributes": {
"attribute_key": "attribute_value"
},
"status": "open",
"assignee_id": "string",
"team_id": "string"
}
Response:
{
"meta": {
"sender": {
"additional_attributes": {},
"availability_status": "offline",
"email": "string",
"id": 0,
"name": "string",
"phone_number": "string",
"identifier": "string",
"thumbnail": "string",
"custom_attributes": {
"attribute_key": "attribute_value"
},
"last_activity_at": 0,
"blocked": false,
"created_at": 0
},
"assignee": {
"id": 0,
"account_id": 0,
"availability_status": "online",
"auto_offline": true,
"confirmed": true,
"email": "string",
"available_name": "string",
"name": "string",
"role": "agent",
"see_all_conversations": true,
"thumbnail": "string",
},
"channel": "string",
"hmac_verified": false
},
"id": 0,
"account_id": 0,
"additional_attributes": {},
"can_reply": false,
"custom_attributes": {},
"inbox_id": 0,
"muted": false,
"status": "open",
"created_at": 0
}
Response-Explain:
|
Parameter |
Description |
|
meta |
Object containing conversation related data |
|
meta -> sender |
Object containing the contact data |
|
meta -> sender -> id |
Numeric id of the contact |
|
meta -> sender -> name |
Contact name |
|
meta -> sender -> phone_number |
Contact phone number |
|
meta -> sender -> email |
Contact email address |
|
meta -> sender -> availability_status |
Availability status of the contact.
|
|
meta -> sender -> identifier |
A unique identifier for the contact in external system |
|
meta -> sender -> thumbnail |
Avatar URL of the contact |
|
meta -> sender -> custom_attributes |
Object containing custom attributes related to the contact |
|
meta -> sender -> additional_attributes |
Object containing additional attributes related to the contact |
|
meta -> sender -> last_activity_at |
Timestamp of the last activity |
|
meta -> sender -> blocked |
Whether the contact is blocked |
|
meta -> sender -> created_at |
Timestamp of contact creation time |
|
meta -> channel |
Channel type |
|
meta -> assignee |
Object containning assignee details |
|
meta -> assignee -> id |
Assignee id |
|
meta -> assignee -> account_id |
Numeric id of the account |
|
meta -> assignee -> availability_status |
The availability status of the assignee
|
|
meta -> assignee -> auto_offline |
Indicates whether the availability status of agent is configured to go offline automatically when away |
|
meta -> assignee -> confirmed |
Indicates whether the agent has been validated by clicking on the invitation email they received |
|
meta -> assignee -> email |
Agent email address |
|
meta -> assignee -> available_name |
|
|
meta -> assignee -> name |
Agent full name |
|
meta -> assignee -> role |
Assignee role
|
|
meta -> assignee -> see_all_conversations |
Indicates whether the assugnee can see all conversations in the account |
|
meta -> assignee -> thumbnail |
Assignee Avatar URL |
|
meta -> hmac_verified |
|
|
id |
Numeric id of the conversation |
|
account_id |
Numeric id of the account |
|
inbox_id |
Numeric id of the inbox |
|
status |
The status of the conversation
|
|
created_at |
The time at which conversation was created |
|
muted |
Whether the conversation is currently muted |
|
can_reply |
Whether the conversation is currently within messaging window |
|
custom_attributes |
Object containing custom attributes related to the conversation |
|
additional_attributes |
Object containing additional attributes related to the conversation |
Created with the Personal Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation