# Create conversation

Create a conversation. For inbound messages the author is assumed to be the requester of the conversation (end user). For outbound messages the author is specified using the agentId field.

Endpoint: POST /beta/conversations
Version: beta
Security: ApiKeyAuth

## Request fields (application/json):

  - `requesterId` (string, required)
    The end user's userId

  - `direction` (string, required)
    values: [Inbound, Outbound]

  - `contactEndpointId` (string, required)

  - `queueId` (string, required)

  - `widgetId` (string, required)

  - `message` (any, required)
    Only Outbound messages are supported for Sms and Whatsapp.

  - `message.content` (any, required)

  - `message.content.value` (string, required)

  - `message.attachments` (array)

  - `message.attachments.url` (string, required)
    url

  - `message.attachments.prettyName` (string)

  - `message.integrationEmail` (string)
    Internal email address registered for the integration with format: <email-address>@email.dixa.io

  - `message.externalId` (string)
    Client generated identifier for external reference

  - `message.agentId` (string, required)

  - `message.integrationEmail` (string)

  - `message.externalId` (string)

  - `message.cc` (array)

  - `message.bcc` (array)

  - `browserInfo` (object)

  - `browserInfo.name` (string, required)

  - `browserInfo.version` (string)

  - `browserInfo.ipAddress` (string)

  - `browserInfo.originatingUrl` (string)

  - `language` (string)

  - `emailIntegrationId` (string, required)

  - `subject` (string, required)

  - `contactEndpointId` (string, required)
    SMS enabled provisioned phone number in valid E.164 format

  - `contactEndpointId` (string, required)
    WhatsApp-enabled integration phone number that sends the message

  - `message` (object, required)

  - `message.template` (object, required)

  - `message.template.templateId` (string, required)

## Response 201 fields (application/json):

  - `data` (object, required)

  - `data.id` (integer, required)

## Response 400 fields (application/json):

  - `message` (string, required)

## Response 404 fields (application/json):

  - `message` (string, required)

## Response 500 fields (application/json):

  - `message` (string, required)

