POST
/
conversations
curl --request POST \
  --url https://insights.reforge.com/api/v1/conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "conversation-123",
  "source": "intercom",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "contacts": [
    {
      "id": "user-456",
      "shouldUnflattenProperties": true,
      "properties": {
        "$email": "user@example.com",
        "$name": "John Doe",
        "$createdAt": "2023-11-07T05:31:56Z",
        "$updatedAt": "2023-11-07T05:31:56Z"
      }
    }
  ],
  "messages": [
    {
      "id": "message-789",
      "incoming": true,
      "contactId": "user-456",
      "content": "Hello! I'\''m having trouble...",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "shouldUnflattenProperties": true,
      "properties": {}
    }
  ],
  "shouldUnflattenProperties": true,
  "properties": {}
}'
{
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
id
string

The unique identifier for the conversation.

source
string

The source of the conversation.

createdAt
string

The date and time the conversation was created.

contacts
object[]
messages
object[]
shouldUnflattenProperties
boolean | null

Whether to unflatten properties that are meant to be nested objects for example { "plan.type": "Pro" } will be unflattened to { "plan": { "type": "Pro" } }

properties
object

Additional metadata properties (key-value pairs)

Response

200
application/json
Conversation submitted successfully.
success
boolean