curl --request GET \
--url https://api.partoo.co/v2/conversations \
--header 'x-APIKey: <api-key>'{
"conversations": [
{
"id": 123,
"consumer_img": "https://www.example.com/profile-picture.jpg",
"consumer_name": "John Doe",
"consumer_phone_number": "+33612345678",
"last_message": "<unknown>",
"is_read": true,
"status": "Open",
"created_at": "2023-01-31 16:22:17.327878+00:00",
"has_one_user_message": true,
"business": {
"id": "<string>",
"name": "<string>",
"city": "<string>",
"zipcode": "<string>",
"country": "<string>",
"formatted_address": "<string>"
},
"messaging_partner": "Facebook",
"issues": [
"facebook_no_page_linked"
],
"first_message_date": "<string>",
"is_expired": false,
"is_solved": false,
"assigned_user_id": "62d80fae74e8b11d700302b8",
"custom_channel": "<unknown>"
}
],
"count": 1,
"next_cursor": "<string>"
}This endpoint lets you list all the Conversations you have access to.
You can filter the conversations based on the Organization or the Business that they are related to.
If you want to keep an up-to-date list of ongoing conversations for your businesses, we recommend using the Message Received and Message Deleted Webhooks instead of periodically calling this endpoint.
⚠️ This endpoint is paginated using cursor pagination. This means that in order to get the next page of results, you need to provide the cursor returned in the previous call.
curl --request GET \
--url https://api.partoo.co/v2/conversations \
--header 'x-APIKey: <api-key>'{
"conversations": [
{
"id": 123,
"consumer_img": "https://www.example.com/profile-picture.jpg",
"consumer_name": "John Doe",
"consumer_phone_number": "+33612345678",
"last_message": "<unknown>",
"is_read": true,
"status": "Open",
"created_at": "2023-01-31 16:22:17.327878+00:00",
"has_one_user_message": true,
"business": {
"id": "<string>",
"name": "<string>",
"city": "<string>",
"zipcode": "<string>",
"country": "<string>",
"formatted_address": "<string>"
},
"messaging_partner": "Facebook",
"issues": [
"facebook_no_page_linked"
],
"first_message_date": "<string>",
"is_expired": false,
"is_solved": false,
"assigned_user_id": "62d80fae74e8b11d700302b8",
"custom_channel": "<unknown>"
}
],
"count": 1,
"next_cursor": "<string>"
}The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.
Number of items to return per page.
1 <= x <= 100The cursor identifiying the page of data to fetch. If no cursor is provided, the query will return the first page of data. A cursor for the next page of data is provided in the response of this request.
Filter by business ids. Use a comma-separated list to provide multiple ids.
"a1c9f37b4deca92f83b61d02,9f4e2a8c0d73b154e621bc97,c73b15e9fa42d60b3a8c21ef"
OK
Response object
The list of conversations, paginated.
Show child attributes
The url of the consumer's profile picture
"https://www.example.com/profile-picture.jpg"
The name of the consumer, can be empty. The format may differ depending on the platform of contact (ex: "John Doe", "John Doe (@johndoe)", "@johndoe", "", ...).
"John Doe"
The phone number of the consumer, formatted in E.164 international format (ex: "+33612345678").
"+33612345678"
The last message exchanged in the conversation.
Show child attributes
The id of the message.
The id of the parent conversation.
The date at which the message was sent or received, in the ISO 8601 format (ex: "2023-01-31 16:22:17.327878+00:00").
"2023-01-31 16:22:17.327878+00:00"
The type of the message:
⚠️ New values may be added to this enum without prior notice and without following the classic depreciation cycle.
It is up to you to gracefully handle the case where new values are added.
We recommend showing a "Unhandled content" placeholder to the user in place of the message ⚠️
Text, Image, Video, Audio, Document, IgStoryReply, IgStoryMention, Unsupported Describes the person that sent the Message:
⚠️ New values may be added to this enum without prior notice and without following the classic depreciation cycle.
It is up to you to gracefully handle the case where new values are added.
We recommend ignoring messages with unhandled sender_type ⚠️
User, Consumer, Metadata Name of the person sending the message
"Jane Doe"
The delivery status of the message. Messages send via Partoo are created with the status "Sending", and propagated to the messaging channel. If the message is sent successfully, the status is changed to "Success". If the messaging channel fails to send the message, the status changed to "Failed". A failed message can be retried using the /retry endpoint.
Sending, Success, Failed If the message has been deleted by the consumer on the messaging channel (for now, only "Instagram" messages can be deleted).
false
The text of the message.
For "User" messages sent via the Partoo application, the id of the user that sent the message.
If the last message received was read.
This property is scoped to the user who performs the request. Multiple partoo users can have a different is_read value for the same conversation.
If Open, it is possible to send a message in the conversation, else not. A conversation can be Closed if it is expired.
Open, Closed The date of creation of the conversation, in the ISO 8601 format (ex: "2023-01-31 16:22:17.327878+00:00").
"2023-01-31 16:22:17.327878+00:00"
If the conversation has at least one message sent by a Partoo user.
Some basic information about the business that the conversation is associated with.
The channel that the message is being sent to/from.
⚠️ New values may be added to this enum without prior notice and without following the classic depreciation cycle.
It is up to you to gracefully handle the case where new values are added.
Google, Facebook, Instagram, SMS, Whatsapp "Facebook"
The list of issues that affect the conversation. The issues represent setup problem that the business may have with a messaging channel. It is not possible to send messages on a conversation that has issues.
⚠️ New values may be added to this enum without prior notice and without following the classic depreciation cycle.
It is up to you to gracefully handle the case where new values are added.
facebook_no_page_linked, facebook_partner_co_undone, facebook_invalid_status, facebook_missing_webhook_subs, instagram_no_account_linked, sms_no_phone_number ["facebook_no_page_linked"]The date at which the first message of the conversation was received, in the ISO 8601 format (ex: "2023-01-31 16:22:17.327878+00:00").
If the conversation has expired. A conversation expires if the consumer has not contacted the business for a certain amount of time.
You cannot send messages to an expired conversation.
false
If the conversation has been solved.
Conversations can be solved from our app or by updating conversation status to "closed".
false
The "user_id" of the user assigned to the conversation.
"62d80fae74e8b11d700302b8"
Data about the custom channel, this object is filled only if the messaging partner is Custom.
Show child attributes
The id of the custom channel.
The name of the custom channel.
Url of the channel's icon.
Set to true if the channel to be read-only (i.e., no replies via Partoo)
The unique id of the conversation in your system.
Total number of results available for the filters and dimensions requested.
1
The cursor to use in order to retrieve the next page of data. When all data have been fetched, the value is null.
Was this page helpful?