Skip to main content
POST
/
api
/
v1
/
conversations
cURL
curl --request POST \
  --url https://backend.wassist.app/api/v1/conversations/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "toNumber": "<string>",
  "fromNumber": "<string>",
  "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "message": {
    "type": "template",
    "template": {
      "name": "<string>",
      "variables": {
        "body": [
          "<string>"
        ],
        "header": "<string>",
        "buttons": [
          "<string>"
        ],
        "cards": [
          {
            "body": [
              "<string>"
            ],
            "header": "<string>",
            "buttons": [
              "<string>"
            ]
          }
        ]
      }
    }
  },
  "phoneNumber": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contact": {
    "phoneNumber": "<string>",
    "name": "<string>"
  },
  "activeAgent": "<string>",
  "chatWindowRemainingTime": "<string>",
  "lastMessage": "<string>",
  "isHumanTakeover": "<string>",
  "active": "<string>"
}
This endpoint lets you create a new conversation.

Authorizations

X-API-Key
string
header
required

API key authentication. Pass your API key in the X-API-Key header.

Body

application/json
toNumber
string

The phone number of the contact to create the conversation with.

fromNumber
string

The whatsapp number to send the mesage from

agentId
string<uuid>

The ID of the agent to start the conversation with. If this is a new agent for this conversation, it will be a trigger a new session with the agent.

message
object
phoneNumber
string

This has been deprecated. Use toNumber instead.

Response

201 - application/json
id
string<uuid>
required
contact
object
required
activeAgent
string
required
chatWindowRemainingTime
string
required
lastMessage
string
required
isHumanTakeover
string
required
active
string
required