Create a conversation
In: header
Opening message body (HTML). Inline images hosted on supported source platforms are fetched and re-hosted automatically, with their links rewritten.
Priority level (defaults to Medium if not provided)
"Low" | "Medium" | "High" | "Urgent"Conversation source (defaults to Call if not provided)
"Mail" | "Call" | "API"Brand ID (defaults to account's default brand if not provided)
Status (defaults to Open if not provided)
"Open" | "Pending" | "Resolved" | "Closed"Requested by email or phone number
First name applied to the requester contact only when it is created. If a contact with this email/phone already exists, it is reused and its name is not changed.
Last name applied to the requester contact only when it is created (same create-only behaviour as requested_by_firstname).
emailThe time the conversation was created (epoch seconds). If not provided, the current time is used.
The time the conversation was resolved (epoch seconds). Only allowed when status is Resolved or Closed, and must be >= created_at.
Option to disable notifications when a Conversation is created. Defaults to false.
Tag labels to attach to the conversation. Tags that don't exist are created. Also useful for recording the channel/origin (e.g. "chat", "email").
Files fetched from these URLs and attached to the conversation's opening message. If a file can't be fetched, the conversation is still created and that file is skipped.
Response Body
application/json
application/json
application/json
curl -X POST "https://app.sparrowdesk.com/v1/conversations" \ -H "Content-Type: application/json" \ -d '{ "description": "string", "subject": "string", "requested_by": "string" }'{
"data": {
"id": 12345,
"brand": "Support Brand",
"brand_id": 1,
"source": "Mail",
"status": "Open",
"priority": "High",
"created_at": 1672531200,
"first_response_time": null,
"resolution_time": null,
"due": 1672617600,
"first_response_due": 1672538400,
"requested_by_email": "[email protected]",
"requested_by_id": 67890,
"assigned_to_member_id": 123,
"assigned_to_team_id": 456,
"last_updated_at": 1672535400,
"subject": "Payment issue with order #12345",
"description_html": "<p>I'm having trouble with my payment...</p>",
"description_text": "I'm having trouble with my payment...",
"attachments": [
"https://cdn.example.com/receipt.pdf"
],
"tags": [
{
"id": 1,
"label": "billing"
},
{
"id": 2,
"label": "urgent"
}
],
"custom_fields": [
{
"id": 9250,
"value": "ORD-12345",
"option_ids": null
},
{
"id": 9260,
"value": "premium",
"option_ids": null
},
{
"id": 9270,
"value": "Bug, Billing",
"option_ids": [
7790,
7791
]
}
],
"properties": {
"request_language": "English",
"browser_timezone": "Asia/Calcutta",
"browser": "Chrome",
"device": "mac OS 10.15.7",
"ip_address": "192.168.1.1",
"country": "India",
"region": "Tamil Nadu > Chennai",
"referral_url": "http://localhost:9091/",
"utm_source": "",
"utm_medium": "",
"utm_campaign": "",
"utm_content": "",
"utm_term": ""
}
}
}{
"error": {
"message": "Invalid field values"
}
}{
"error": {
"message": "Error while creating conversation"
}
}