Conversations
Conversations API
Conversations and their messages.
List conversations
/v1/conversationsCursor-paginated conversations, newest first (order=last_message: most recently active first, on last_message_at).
With q, results are a single relevance-ranked page of at most limit (no cursor); each item carries match — a highlighted snippet (<mark> tags) of the best-matching message, its message_id, and in_internal_note when the hit is an agent note. q also matches the customer's name and email.
Required scope: conversations:read.
limitintegerPage size (1–100).
starting_afterstringCursor: the `id` of the last item from the previous page.
qstringFull-text search over messages, internal notes and the customer's name/email.
assigneestring`ai`, `escalated` (waiting for a human), `unassigned`, `me` (tokens that act for a member) or a user id.
last_message_afterstringlast_message_beforestringorderstringOne of: created, last_message.
statusstringOne of: open, closed.
channelstringOne of: api, widget, whatsapp, facebook, instagram, telegram, slack, email.
channel_idstringcustomer_idstringprioritystringOne of: low, normal, high, urgent.
curl "https://api.asks.app/v1/conversations" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "list",
"data": [
{
"object": "conversation",
"id": "string",
"status": "open",
"channel": "api",
"channel_id": {},
"customer_id": {},
"customer_name": {},
"customer_email": {},
"assignee": {},
"priority": "low",
"tags": [
"string"
],
"external_id": {},
"is_pinned": true,
"resolution_type": "confirmed",
"message_count": 1,
"custom_action_memory": {},
"resolved_at": {},
"created_at": {},
"updated_at": {},
"last_message_at": {},
"match": {
"snippet": {},
"message_id": {},
"in_internal_note": true
},
"messages": [
{
"object": null,
"id": null,
"conversation_id": null,
"ticket_id": null,
"sender_type": null,
"sender_id": null,
"content": null,
"visibility": null,
"channel": null,
"external_id": null,
"attachments": null,
"is_read": null,
"created_at": null,
"kind": null,
"delivery": null,
"campaign": null,
"preview_text": null,
"context": null
}
],
"messages_has_more": true,
"notes": [
{
"object": null,
"id": null,
"conversation_id": null,
"ticket_id": null,
"sender_type": null,
"sender_id": null,
"content": null,
"visibility": null,
"channel": null,
"external_id": null,
"attachments": null,
"is_read": null,
"created_at": null,
"kind": null,
"delivery": null,
"campaign": null,
"preview_text": null,
"context": null
}
],
"notes_has_more": true
}
],
"has_more": true,
"next_cursor": {}
}Create a conversation
/v1/conversationsCreates a conversation. If customer info is provided, the customer is created or matched (cross-channel dedup).
Required scope: conversations:write.
channelstringOne of: api, widget, whatsapp, facebook, instagram, telegram.
customerobjectIdentifying info used to create or match a customer.
metadataobjectcurl -X POST "https://api.asks.app/v1/conversations" \
-H "Authorization: Bearer $ASKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "api",
"customer": {
"email": "customer@example.com",
"phone": "string",
"name": "string",
"external_id": "string"
},
"metadata": {}
}'{
"object": "conversation",
"id": "string",
"status": "open",
"channel": "api",
"channel_id": {},
"customer_id": {},
"customer_name": {},
"customer_email": {},
"assignee": {},
"priority": "low",
"tags": [
"string"
],
"external_id": {},
"is_pinned": true,
"resolution_type": "confirmed",
"message_count": 1,
"custom_action_memory": {},
"resolved_at": {},
"created_at": {},
"updated_at": {},
"last_message_at": {},
"match": {
"snippet": {},
"message_id": {},
"in_internal_note": true
},
"messages": [
{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": null,
"url": null
},
"referral": {
"source": null,
"headline": null,
"body": null,
"ad_id": null,
"ref": null,
"product_id": null
},
"location": {
"name": null,
"address": null,
"latitude": null,
"longitude": null
},
"contact_names": [],
"order_items": [],
"product_items": []
}
}
],
"messages_has_more": true,
"notes": [
{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": null,
"url": null
},
"referral": {
"source": null,
"headline": null,
"body": null,
"ad_id": null,
"ref": null,
"product_id": null
},
"location": {
"name": null,
"address": null,
"latitude": null,
"longitude": null
},
"contact_names": [],
"order_items": [],
"product_items": []
}
}
],
"notes_has_more": true
}Retrieve a conversation
/v1/conversations/{id}include=messages embeds the newest 50 customer-facing messages (messages, newest first, + messages_has_more); include=notes embeds the newest 50 internal agent notes (notes, + notes_has_more). Combine with a comma.
Required scope: conversations:read.
includestringComma-separated: `messages`, `notes`.
curl "https://api.asks.app/v1/conversations/<id>" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "conversation",
"id": "string",
"status": "open",
"channel": "api",
"channel_id": {},
"customer_id": {},
"customer_name": {},
"customer_email": {},
"assignee": {},
"priority": "low",
"tags": [
"string"
],
"external_id": {},
"is_pinned": true,
"resolution_type": "confirmed",
"message_count": 1,
"custom_action_memory": {},
"resolved_at": {},
"created_at": {},
"updated_at": {},
"last_message_at": {},
"match": {
"snippet": {},
"message_id": {},
"in_internal_note": true
},
"messages": [
{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": null,
"url": null
},
"referral": {
"source": null,
"headline": null,
"body": null,
"ad_id": null,
"ref": null,
"product_id": null
},
"location": {
"name": null,
"address": null,
"latitude": null,
"longitude": null
},
"contact_names": [],
"order_items": [],
"product_items": []
}
}
],
"messages_has_more": true,
"notes": [
{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": null,
"url": null
},
"referral": {
"source": null,
"headline": null,
"body": null,
"ad_id": null,
"ref": null,
"product_id": null
},
"location": {
"name": null,
"address": null,
"latitude": null,
"longitude": null
},
"contact_names": [],
"order_items": [],
"product_items": []
}
}
],
"notes_has_more": true
}Update a conversation
/v1/conversations/{id}Update status, priority, tags, or assignment — the same path as the dashboard: closing records the resolution, closes the linked ticket with one lifecycle note, emails the customer the resolved/rate-us message and emits conversation.updated + conversation.closed; assigning a member takes over from the AI; assignee: "ai" hands back to the AI and answers 409 conflict when the AI can't serve the conversation (agent off, not deployed on the channel, AI off for the channel). tags replaces the list.
Required scope: conversations:write.
statusstring`resolved` is accepted as a legacy alias for `closed`. One of: open, closed.
prioritystringOne of: low, normal, high, urgent.
tagsarray of stringassigneestringnull`"ai"`, a user id, or `null` to unassign.
curl -X PATCH "https://api.asks.app/v1/conversations/<id>" \
-H "Authorization: Bearer $ASKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "open",
"priority": "low",
"tags": [
"string"
],
"assignee": {}
}'{
"object": "conversation",
"id": "string",
"status": "open",
"channel": "api",
"channel_id": {},
"customer_id": {},
"customer_name": {},
"customer_email": {},
"assignee": {},
"priority": "low",
"tags": [
"string"
],
"external_id": {},
"is_pinned": true,
"resolution_type": "confirmed",
"message_count": 1,
"custom_action_memory": {},
"resolved_at": {},
"created_at": {},
"updated_at": {},
"last_message_at": {},
"match": {
"snippet": {},
"message_id": {},
"in_internal_note": true
},
"messages": [
{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": null,
"url": null
},
"referral": {
"source": null,
"headline": null,
"body": null,
"ad_id": null,
"ref": null,
"product_id": null
},
"location": {
"name": null,
"address": null,
"latitude": null,
"longitude": null
},
"contact_names": [],
"order_items": [],
"product_items": []
}
}
],
"messages_has_more": true,
"notes": [
{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": null,
"url": null
},
"referral": {
"source": null,
"headline": null,
"body": null,
"ad_id": null,
"ref": null,
"product_id": null
},
"location": {
"name": null,
"address": null,
"latitude": null,
"longitude": null
},
"contact_names": [],
"order_items": [],
"product_items": []
}
}
],
"notes_has_more": true
}List messages
/v1/conversations/{id}/messagesCursor-paginated messages, newest first.
Required scope: conversations:read.
limitintegerPage size (1–100).
starting_afterstringCursor: the `id` of the last item from the previous page.
curl "https://api.asks.app/v1/conversations/<id>/messages" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "list",
"data": [
{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": null,
"url": null
},
"referral": {
"source": null,
"headline": null,
"body": null,
"ad_id": null,
"ref": null,
"product_id": null
},
"location": {
"name": null,
"address": null,
"latitude": null,
"longitude": null
},
"contact_names": [],
"order_items": [],
"product_items": []
}
}
],
"has_more": true,
"next_cursor": {}
}Send a message
/v1/conversations/{id}/messagesPosts an agent message into the conversation and sends it to the customer on the conversation's channel. Emits a message.created webhook. The response adds delivery: sent (forwarded to the channel or pushed to the live widget), stored (nothing to deliver to — api-channel conversations), or failed with a reason (e.g. the WhatsApp/Instagram messaging window is closed). A token that acts for a member (an MCP connection) sends as that member.
Required scope: messages:write.
contentstringrequiredattachmentsarray of objectchannel_metadataobjectclient_message_idstringYour own id for client-side dedup.
curl -X POST "https://api.asks.app/v1/conversations/<id>/messages" \
-H "Authorization: Bearer $ASKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "string",
"attachments": [
{}
],
"channel_metadata": {},
"client_message_id": "string"
}'{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": "string",
"url": "string"
},
"referral": {
"source": "ad",
"headline": "string",
"body": "string",
"ad_id": "string",
"ref": "string",
"product_id": "string"
},
"location": {
"name": "string",
"address": "string",
"latitude": 1,
"longitude": 1
},
"contact_names": [
"string"
],
"order_items": [
{
"retailer_id": "string",
"quantity": 1,
"price": 1,
"currency": "string",
"title": "string",
"variant_title": "string",
"sku": "string",
"product_url": "string"
}
],
"product_items": [
{
"id": "string",
"retailer_id": "string",
"title": "string",
"product_url": "string"
}
]
}
}Add an internal note
/v1/conversations/{id}/notesAdds an internal note for your team (visibility internal). It is never sent to the customer. A token that acts for a member writes the note as that member; an API key writes it as the key's creator (or the workspace owner).
Required scope: conversations:write.
contentstringrequiredcurl -X POST "https://api.asks.app/v1/conversations/<id>/notes" \
-H "Authorization: Bearer $ASKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "string"
}'{
"object": "message",
"id": "string",
"conversation_id": "string",
"ticket_id": {},
"sender_type": "customer",
"sender_id": {},
"content": "string",
"visibility": "public",
"channel": "string",
"external_id": {},
"attachments": {},
"is_read": true,
"created_at": {},
"kind": "text",
"delivery": {
"status": "sent",
"reason": "string"
},
"campaign": {
"id": "string",
"name": "string"
},
"preview_text": {},
"context": {
"caption": "string",
"permalink": "string",
"link": {
"title": "string",
"url": "string"
},
"referral": {
"source": "ad",
"headline": "string",
"body": "string",
"ad_id": "string",
"ref": "string",
"product_id": "string"
},
"location": {
"name": "string",
"address": "string",
"latitude": 1,
"longitude": 1
},
"contact_names": [
"string"
],
"order_items": [
{
"retailer_id": "string",
"quantity": 1,
"price": 1,
"currency": "string",
"title": "string",
"variant_title": "string",
"sku": "string",
"product_url": "string"
}
],
"product_items": [
{
"id": "string",
"retailer_id": "string",
"title": "string",
"product_url": "string"
}
]
}
}