Create a conversation
POST/v2/conversations
Creates a new conversation. Supports both contact-initiated (customer/lead) and admin-initiated (outreach) conversations.
Contact-Initiated Conversation
For conversations started by a customer or lead:
| Field | Type | Required | Description |
|---|---|---|---|
from.type | string | Yes | Must be “contact” |
from.id | string | Yes | The Featurebase contact ID (24-character ObjectId) |
bodyMarkdown | string | Yes | The initial message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
channel | string | No | The channel: “desktop” (default) or “email” |
createdAt | string | No | ISO timestamp for migrations |
Example Contact-Initiated Request
{
"from": {
"type": "contact",
"id": "676f0f6765bdaa7d7d760f88"
},
"bodyMarkdown": "Hello, I have a question about your product.",
"channel": "desktop"
}
Admin-Initiated Outreach
For outreach conversations started by an admin:
| Field | Type | Required | Description |
|---|---|---|---|
from.type | string | Yes | Must be “admin” |
from.id | string | Yes | The Featurebase admin ID (24-character ObjectId) |
bodyMarkdown | string | Yes | The initial message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
channel | string | No | The channel: “desktop” (default) or “email” |
recipients | object | Yes | Recipients for the outreach |
recipients.to | object | Yes | Primary recipients |
recipients.to.emails | string[] | No* | Email addresses |
recipients.to.ids | string[] | No* | Featurebase contact IDs |
recipients.cc | object | No | CC recipients (same structure as “to”) |
recipients.bcc | object | No | BCC recipients (same structure as “to”) |
subject | string | No** | Email subject line |
createdAt | string | No | ISO timestamp for migrations |
*At least one email or ID is required in recipients.to
**Required when channel is “email”
Example Admin Outreach (In-App)
{
"from": {
"type": "admin",
"id": "507f1f77bcf86cd799439011"
},
"bodyMarkdown": "Hi! Just following up on your inquiry.",
"channel": "desktop",
"recipients": {
"to": {
"ids": ["676f0f6765bdaa7d7d760f88"]
}
}
}
Example Admin Outreach (Email)
{
"from": {
"type": "admin",
"id": "507f1f77bcf86cd799439011"
},
"bodyMarkdown": "Hi! Just following up on your inquiry.",
"channel": "email",
"subject": "Following up on your inquiry",
"recipients": {
"to": {
"emails": ["john@example.com"]
},
"cc": {
"emails": ["manager@example.com"]
}
}
}
Response
Returns the created conversation object with a 201 Created status.
Example Response
{
"object": "conversation",
"id": "12345",
"state": "open",
"priority": false,
"adminAssigneeId": null,
"participants": [
{ "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }
],
"source": {
"channel": "desktop",
"deliveredAs": "customer_initiated",
"bodyHtml": "<p>Hello, I have a question about your product.</p>",
"bodyMarkdown": "Hello, I have a question about your product.",
"author": { "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }
},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
Version Availability
This endpoint is only available in API version 2026-01-01.nova and newer.
Body ParametersJSON
bodyMarkdown: string
The content of the initial message in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored.
minLength1
Create a conversation
curl https://do.featurebase.app/v2/conversations \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $FEATUREBASE_API_KEY" \
-d '{
"bodyMarkdown": "Hello, I have a question about your product.\\n\\n",
"from": {
"id": "676f0f6765bdaa7d7d760f88",
"type": "contact"
},
"channel": "desktop",
"createdAt": "2025-01-15T10:30:00.000Z",
"subject": "Following up on your inquiry"
}'{
"id": "12345",
"adminAssigneeId": "507f1f77bcf86cd799439011",
"botConversationStateLastUpdatedAt": "2025-01-15T10:30:00.000Z",
"brandId": "507f1f77bcf86cd799439011",
"createdAt": "2025-01-15T10:30:00.000Z",
"hasAdminOverriddenLanguage": false,
"isBlocked": false,
"lastActivityAt": "2025-01-15T12:30:00.000Z",
"object": "conversation",
"participants": [
{
"id": "676f0f6765bdaa7d7d760f88",
"type": "customer"
}
],
"priority": false,
"prioritySetAt": "2025-01-15T10:30:00.000Z",
"snoozedUntil": "2025-01-16T09:00:00.000Z",
"state": "open",
"tags": [
{
"id": "67ec1234abcd5678ef901234",
"name": "Churn",
"type": "tag"
}
],
"teamAssigneeId": "507f1f77bcf86cd799439012",
"updatedAt": "2025-01-15T12:30:00.000Z",
"userPreferredLanguage": "en",
"waitingSince": "2025-01-15T10:30:00.000Z",
"awaitingCustomerReply": true,
"botConversationState": "active",
"conversationParts": [
{
"id": "1",
"bodyHtml": "<p>Hello, I have a question about your product.</p>",
"bodyMarkdown": "Hello, I have a question about your product.",
"channel": "desktop",
"createdAt": "2025-01-15T10:30:00.000Z",
"object": "conversation_part",
"partType": "user_msg",
"updatedAt": "2025-01-15T10:30:00.000Z",
"author": {
"id": "676f0f6765bdaa7d7d760f88",
"type": "customer",
"email": "john@example.com",
"name": "John Doe",
"profilePicture": "https://cdn.example.com/avatars/user.png"
},
"redacted": false,
"tagApplications": [
{
"appliedAt": "2025-01-15T10:30:00.000Z",
"tagId": "67ec1234abcd5678ef901234",
"appliedBy": {
"type": "admin",
"id": "507f1f77bcf86cd799439011",
"name": "John Doe"
},
"removedAt": "2025-01-15T11:00:00.000Z",
"removedBy": {
"type": "admin",
"id": "507f1f77bcf86cd799439011",
"name": "John Doe"
},
"tag": {
"id": "67ec1234abcd5678ef901234",
"name": "Churn",
"type": "tag"
}
}
]
}
],
"csatDebug": {
"requestId": "csat_req_123",
"status": "pending",
"changeLockWindowEndsAt": "2025-01-16T12:30:00.000Z",
"emailDelivery": {
"status": "failed",
"failedAt": "2025-01-15T10:31:00.000Z",
"failureReason": "smtp_bounce",
"messageId": "msg_123",
"sentAt": "2025-01-15T10:31:00.000Z"
},
"lateSubmitWindowEndsAt": "2025-01-16T10:30:00.000Z"
},
"csatHistory": [
{
"channel": "desktop",
"isLatestEffective": true,
"lastUpdatedAt": "2025-01-15T10:35:00.000Z",
"requestedAt": "2025-01-15T10:30:00.000Z",
"requestId": "csat_req_123",
"requestSource": "workflow",
"status": "pending",
"canceledAt": "2025-01-15T10:32:00.000Z",
"changeLockWindowEndsAt": "2025-01-16T12:30:00.000Z",
"emailDelivery": {
"status": "failed",
"failedAt": "2025-01-15T10:31:00.000Z",
"failureReason": "smtp_bounce",
"messageId": "msg_123",
"sentAt": "2025-01-15T10:31:00.000Z"
},
"expiredAt": "2025-01-16T10:30:00.000Z",
"lateSubmitWindowEndsAt": "2025-01-16T10:30:00.000Z",
"ratedAgent": {
"type": "teammate",
"id": "507f1f77bcf86cd799439011"
},
"ratedAt": "2025-01-15T10:35:00.000Z",
"remark": "Thanks for the quick help.",
"score": 4,
"workflow": {
"workflowActionId": "action_123",
"workflowId": "507f1f77bcf86cd799439011",
"workflowRunId": "run_123",
"workflowStepId": "step_123"
}
}
],
"csatSummary": {
"lastUpdatedAt": "2025-01-15T10:35:00.000Z",
"status": "pending",
"canceledAt": "2025-01-15T10:35:00.000Z",
"channel": "desktop",
"expiredAt": "2025-01-15T10:35:00.000Z",
"ratedAgent": {
"type": "teammate",
"id": "507f1f77bcf86cd799439011"
},
"ratedAt": "2025-01-15T10:35:00.000Z",
"remark": "Very helpful support.",
"requestedAt": "2025-01-15T10:30:00.000Z",
"requestId": "csat_req_123",
"requestSource": "workflow",
"score": 5,
"workflow": {
"workflowActionId": "action_123",
"workflowId": "507f1f77bcf86cd799439011",
"workflowRunId": "run_123",
"workflowStepId": "step_123"
}
},
"disableCustomerReply": false,
"readReceipts": [
{
"id": "507f1f77bcf86cd799439011",
"lastReadPartId": "8",
"userType": "admin"
}
],
"source": {
"bodyHtml": "<p>Hi, I have a question about your enterprise plan...</p>",
"bodyMarkdown": "Hi, I have a question about your enterprise plan...",
"channel": "desktop",
"author": {
"id": "676f0f6765bdaa7d7d760f88",
"type": "customer"
},
"deliveredAs": "customer_initiated",
"subject": "Question about pricing",
"url": "https://example.com/pricing"
},
"title": "Question about pricing"
}Returns Examples
{
"id": "12345",
"adminAssigneeId": "507f1f77bcf86cd799439011",
"botConversationStateLastUpdatedAt": "2025-01-15T10:30:00.000Z",
"brandId": "507f1f77bcf86cd799439011",
"createdAt": "2025-01-15T10:30:00.000Z",
"hasAdminOverriddenLanguage": false,
"isBlocked": false,
"lastActivityAt": "2025-01-15T12:30:00.000Z",
"object": "conversation",
"participants": [
{
"id": "676f0f6765bdaa7d7d760f88",
"type": "customer"
}
],
"priority": false,
"prioritySetAt": "2025-01-15T10:30:00.000Z",
"snoozedUntil": "2025-01-16T09:00:00.000Z",
"state": "open",
"tags": [
{
"id": "67ec1234abcd5678ef901234",
"name": "Churn",
"type": "tag"
}
],
"teamAssigneeId": "507f1f77bcf86cd799439012",
"updatedAt": "2025-01-15T12:30:00.000Z",
"userPreferredLanguage": "en",
"waitingSince": "2025-01-15T10:30:00.000Z",
"awaitingCustomerReply": true,
"botConversationState": "active",
"conversationParts": [
{
"id": "1",
"bodyHtml": "<p>Hello, I have a question about your product.</p>",
"bodyMarkdown": "Hello, I have a question about your product.",
"channel": "desktop",
"createdAt": "2025-01-15T10:30:00.000Z",
"object": "conversation_part",
"partType": "user_msg",
"updatedAt": "2025-01-15T10:30:00.000Z",
"author": {
"id": "676f0f6765bdaa7d7d760f88",
"type": "customer",
"email": "john@example.com",
"name": "John Doe",
"profilePicture": "https://cdn.example.com/avatars/user.png"
},
"redacted": false,
"tagApplications": [
{
"appliedAt": "2025-01-15T10:30:00.000Z",
"tagId": "67ec1234abcd5678ef901234",
"appliedBy": {
"type": "admin",
"id": "507f1f77bcf86cd799439011",
"name": "John Doe"
},
"removedAt": "2025-01-15T11:00:00.000Z",
"removedBy": {
"type": "admin",
"id": "507f1f77bcf86cd799439011",
"name": "John Doe"
},
"tag": {
"id": "67ec1234abcd5678ef901234",
"name": "Churn",
"type": "tag"
}
}
]
}
],
"csatDebug": {
"requestId": "csat_req_123",
"status": "pending",
"changeLockWindowEndsAt": "2025-01-16T12:30:00.000Z",
"emailDelivery": {
"status": "failed",
"failedAt": "2025-01-15T10:31:00.000Z",
"failureReason": "smtp_bounce",
"messageId": "msg_123",
"sentAt": "2025-01-15T10:31:00.000Z"
},
"lateSubmitWindowEndsAt": "2025-01-16T10:30:00.000Z"
},
"csatHistory": [
{
"channel": "desktop",
"isLatestEffective": true,
"lastUpdatedAt": "2025-01-15T10:35:00.000Z",
"requestedAt": "2025-01-15T10:30:00.000Z",
"requestId": "csat_req_123",
"requestSource": "workflow",
"status": "pending",
"canceledAt": "2025-01-15T10:32:00.000Z",
"changeLockWindowEndsAt": "2025-01-16T12:30:00.000Z",
"emailDelivery": {
"status": "failed",
"failedAt": "2025-01-15T10:31:00.000Z",
"failureReason": "smtp_bounce",
"messageId": "msg_123",
"sentAt": "2025-01-15T10:31:00.000Z"
},
"expiredAt": "2025-01-16T10:30:00.000Z",
"lateSubmitWindowEndsAt": "2025-01-16T10:30:00.000Z",
"ratedAgent": {
"type": "teammate",
"id": "507f1f77bcf86cd799439011"
},
"ratedAt": "2025-01-15T10:35:00.000Z",
"remark": "Thanks for the quick help.",
"score": 4,
"workflow": {
"workflowActionId": "action_123",
"workflowId": "507f1f77bcf86cd799439011",
"workflowRunId": "run_123",
"workflowStepId": "step_123"
}
}
],
"csatSummary": {
"lastUpdatedAt": "2025-01-15T10:35:00.000Z",
"status": "pending",
"canceledAt": "2025-01-15T10:35:00.000Z",
"channel": "desktop",
"expiredAt": "2025-01-15T10:35:00.000Z",
"ratedAgent": {
"type": "teammate",
"id": "507f1f77bcf86cd799439011"
},
"ratedAt": "2025-01-15T10:35:00.000Z",
"remark": "Very helpful support.",
"requestedAt": "2025-01-15T10:30:00.000Z",
"requestId": "csat_req_123",
"requestSource": "workflow",
"score": 5,
"workflow": {
"workflowActionId": "action_123",
"workflowId": "507f1f77bcf86cd799439011",
"workflowRunId": "run_123",
"workflowStepId": "step_123"
}
},
"disableCustomerReply": false,
"readReceipts": [
{
"id": "507f1f77bcf86cd799439011",
"lastReadPartId": "8",
"userType": "admin"
}
],
"source": {
"bodyHtml": "<p>Hi, I have a question about your enterprise plan...</p>",
"bodyMarkdown": "Hi, I have a question about your enterprise plan...",
"channel": "desktop",
"author": {
"id": "676f0f6765bdaa7d7d760f88",
"type": "customer"
},
"deliveredAs": "customer_initiated",
"subject": "Question about pricing",
"url": "https://example.com/pricing"
},
"title": "Question about pricing"
}