List conversations
GET
/workspaces/{workspaceId}/conversations
List all conversations across the workspace. This will return a maximum of 100 conversations per page, with 10 as default. You can use the limit and pageToken query parameters to paginate the results. Learn more about pagination in the Common API Usage pagination section.
Parametry zapytania
limit
integer
pageToken
string
reverse
boolean
resource
string
The resource to find conversation for
Treść odpowiedzi
results
array of object
wymagane
List of conversations.
Pokaż atrybuty podrzędne
results.accessibility
string
wymagane
Possible values: open, invite-only, request-to-join, private
results.activeParticipantCount
integer
wymagane
results.assigneeId
string
results.attributes
object
results.category
string
results.channelId
string
wymagane
results.createdAt
string
wymagane
results.description
string
results.directory
string
results.featuredParticipants
array of object
wymagane
Pokaż atrybuty podrzędne
results.featuredParticipants.avatarUrl
string
results.featuredParticipants.contact
object
Pokaż atrybuty podrzędne
results.featuredParticipants.contact.identifierKey
string
wymagane
results.featuredParticipants.contact.identifierValue
string
wymagane
results.featuredParticipants.contact.platformAddress
string
results.featuredParticipants.contact.platformAddressSelector
string
results.featuredParticipants.conversationId
string
results.featuredParticipants.createdAt
string
results.featuredParticipants.displayName
string
results.featuredParticipants.id
string
wymagane
results.featuredParticipants.resourceUri
string
results.featuredParticipants.status
string
Possible values: invited, pending, active, inactive
results.featuredParticipants.type
string
wymagane
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
results.featuredParticipants.updatedAt
string
results.hasDraft
boolean
results.id
string
wymagane
results.inbox
object
Pokaż atrybuty podrzędne
results.inbox.id
string
wymagane
results.inbox.identifier
string
wymagane
results.inbox.ownerId
string
wymagane
results.inbox.ownerType
string
wymagane
Possible values: user, group
results.inbox.type
string
wymagane
Possible values: personal, shared, support
results.initiatingParticipant
object
Pokaż atrybuty podrzędne
results.initiatingParticipant.avatarUrl
string
results.initiatingParticipant.contact
object
Pokaż atrybuty podrzędne
results.initiatingParticipant.contact.identifierKey
string
wymagane
results.initiatingParticipant.contact.identifierValue
string
wymagane
results.initiatingParticipant.contact.platformAddress
string
results.initiatingParticipant.contact.platformAddressSelector
string
results.initiatingParticipant.conversationId
string
results.initiatingParticipant.createdAt
string
results.initiatingParticipant.displayName
string
results.initiatingParticipant.id
string
wymagane
results.initiatingParticipant.resourceUri
string
results.initiatingParticipant.status
string
Possible values: invited, pending, active, inactive
results.initiatingParticipant.type
string
wymagane
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
results.initiatingParticipant.updatedAt
string
results.lastMessage
object
Pokaż atrybuty podrzędne
results.lastMessage.createdAt
string
wymagane
results.lastMessage.draft
boolean
wymagane
results.lastMessage.id
string
wymagane
results.lastMessage.preview
object
wymagane
Pokaż atrybuty podrzędne
results.lastMessage.preview.text
string
results.lastMessage.recipients
array of object
Pokaż atrybuty podrzędne
results.lastMessage.recipients.contactAnnotation
object
Annotations add extra information to a sender or receiver. For email messages, the name annotation overrides the display name.
Pokaż atrybuty podrzędne
results.lastMessage.recipients.contactAnnotation.name
string
results.lastMessage.recipients.countryCode
string
results.lastMessage.recipients.id
string
The ID of the contact.
results.lastMessage.recipients.identifierKey
string
The identifier key for finding the contact (e.g. emailaddress, phonenumber). For WhatsApp channels with BSUID support, use whatsappbsuid to send to a contact by their Business-Scoped User ID.
results.lastMessage.recipients.identifierValue
string
The identifier value for finding the contact.
results.lastMessage.recipients.identifiers
array of object
Additional identifiers to augment the contact during resolution.
Pokaż atrybuty podrzędne
results.lastMessage.recipients.identifiers.identifierKey
string
wymagane
The identifier key for finding the contact (e.g. emailaddress, phonenumber).
results.lastMessage.recipients.identifiers.identifierValue
string
wymagane
The identifier value for finding the contact.
results.lastMessage.recipients.platformAddress
string
The resolved platform address used to deliver the message (e.g. phone number or email address).
results.lastMessage.recipients.platformAddressSelector
string
An expression that defines how we resolve the platform address from a contact. Optional override for the default resolution logic.
results.lastMessage.recipients.receiverExpression
string
results.lastMessage.recipients.receiverValue
string
results.lastMessage.recipients.type
string
The type of the receiver (e.g. to, cc, bcc for email).
results.lastMessage.sender
object
Pokaż atrybuty podrzędne
results.lastMessage.sender.email
string
results.lastMessage.sender.name
string
results.lastMessage.sender.avatarUrl
string
results.lastMessage.sender.contact
object
Pokaż atrybuty podrzędne
results.lastMessage.sender.contact.identifierKey
string
wymagane
results.lastMessage.sender.contact.identifierValue
string
wymagane
results.lastMessage.sender.contact.platformAddress
string
results.lastMessage.sender.contact.platformAddressSelector
string
results.lastMessage.sender.conversationId
string
results.lastMessage.sender.createdAt
string
results.lastMessage.sender.displayName
string
results.lastMessage.sender.id
string
wymagane
results.lastMessage.sender.resourceUri
string
results.lastMessage.sender.status
string
Possible values: invited, pending, active, inactive
results.lastMessage.sender.type
string
wymagane
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
results.lastMessage.sender.updatedAt
string
results.lastMessage.status
string
wymagane
Possible values: accepted, processing, sent, sending_failed, delivered, delivery_failed, deleted
results.lastMessage.type
string
wymagane
Possible values: text, html, image, file, gif, location, carousel, list, section, authentication, action, comment
results.lastMessageIncomingAt
string
results.lastMessageOutgoingAt
string
results.name
string
wymagane
results.participants
array of object
Pokaż atrybuty podrzędne
results.participants.contact
object
Pokaż atrybuty podrzędne
results.participants.contact.identifierKey
string
wymagane
results.participants.contact.identifierValue
string
wymagane
results.participants.contact.platformAddress
string
results.participants.contact.platformAddressSelector
string
results.participants.id
string
wymagane
results.participants.type
string
wymagane
Possible values: user, contact, agent, flow, bot, accessKey, channel, connector, collaborationAutomation
results.pendingParticipantCount
integer
results.platformStyle
string
wymagane
Possible values: direct, email, direct-multiple, direct-threaded, group-multiple
results.privateAttributes
string
results.read
boolean
results.referral
object
Pokaż atrybuty podrzędne
results.referral.caption
string
results.referral.mediaType
string
results.referral.mediaUrl
string
results.referral.sourceId
string
wymagane
results.referral.sourceType
string
results.referral.sourceUrl
string
results.referral.text
string
results.referral.timestamp
string
results.referral.title
string
results.referral.username
string
results.resource
object
Pokaż atrybuty podrzędne
results.resource.id
string
wymagane
results.resource.type
string
wymagane
Possible values: task, task-conversation, reimbursement, sales-lead, sales-opportunity, sales-account, expense, project
results.resourceUri
string
results.starred
boolean
results.status
string
wymagane
Possible values: deleted, active, closed, spam, archived
results.style
string
wymagane
Possible values: default, directMessage, chatChannel, personalInbox, resource, groupInbox, support
results.summary
string
results.tags
array of string
results.updatedAt
string
wymagane
results.visibility
string
wymagane
Possible values: public, private, direct, group
nextPageToken
string
The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.
total
integer
totalType
string
Possible values: ``, equal, greaterThanOrEqual
Przykład kodu
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/conversations' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Przykład kodu
curl "https://api.bird.com/workspaces/e58899bf-1e8d-4ff7-b9db-a60befaf90d2/conversations" \
-H "Authorization: AccessKey abcd"Przykład kodu
{
"results": [
{
"id": "bace24af-cebb-4bd5-a1e6-f7cff24abadf",
"name": "Re: About your refund",
"description": "",
"status": "active",
"visibility": "private",
"accessibility": "open",
"featuredParticipants": [
{
"id": "8f0b5377-2edc-4116-a8e8-6a475f245a04",
"type": "contact",
"status": "active",
"displayName": "John Doe",
"avatarUrl": "",
"contact": {
"identifierKey": "emailaddress",
"identifierValue": "john.doe@bird.com",
"platformAddress": "john.doe@bird.com"
}
}
],
"activeParticipantCount": 1,
"pendingParticipantCount": 0,
"initiatingParticipant": {
"id": "8f0b5377-2edc-4116-a8e8-6a475f245a04",
"type": "contact",
"status": "active",
"displayName": "John Doe",
"avatarUrl": "",
"contact": {
"identifierKey": "emailaddress",
"identifierValue": "john.doe@bird.com",
"platformAddress": "john.doe@bird.com"
}
},
"channelId": "7b0eb8a0-606b-59f1-bd90-43cacb048146",
"lastMessage": {
"id": "0ff78529-eb64-400d-8522-c45ae2170885",
"type": "html",
"preview": {
"text": "That's right 👍"
},
"recipients": null,
"status": "delivered",
"sender": {
"id": "8f0b5377-2edc-4116-a8e8-6a475f245a04",
"type": "contact",
"status": "active",
"displayName": "John Doe",
"avatarUrl": "",
"contact": {
"identifierKey": "emailaddress",
"identifierValue": "john.doe@bird.com",
"platformAddress": "john.doe@bird.com"
}
},
"createdAt": "2024-11-27T14:47:59.577Z"
},
"createdAt": "2024-11-27T14:47:59.577Z",
"updatedAt": "2024-11-27T14:47:59.577Z",
"platformStyle": "email"
}
]
}
Note: if there are more than 10 conversations, the results may be paginated. Please refer to Pagination on how to use nextPageToken.