REST API: Messages

Replace {subdomain} in the endpoints below with your Vitally subdomain.

You can find your subdomain in the URL used to log into Vitally (i.e., https://yoursubdomain.vitally.io

The Message object

The Participant Object

Participant

Create A Message POST

US Data Center (default):

https://{subdomain}.rest.vitally.io/resources/conversations/:conversationId/messages

EU Data Center:

https://rest.vitally-eu.io/resources/conversations/:conversationId/messages

Request Body

Participant

Example Request

POST https://{subdomain}.rest.vitally.io/resources/conversations/:id/messages
{
  "externalId": "message-1",
  "conversationId": "thread-1",
  "message": "<p>Hello there</p>",
  "timestamp": "2020-12-11T20:16:27.370Z",
  "from": {
    "type": "admin",
    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  },
  "to": [
    {
      "type": "user",
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
  ]
}

Example Response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "outbound",
  "externalId": "message-1",
  "externalUrl": null,
  "conversationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "message": "<p>Hello there</p>",
  "timestamp": "2020-12-11T20:16:27.370Z",
  "from": {
    "type": "admin",
    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  },
  "to": [
    {
      "type": "user",
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
  ],
  "cc": [],
  "bcc": []
}

Delete A Message DELETE

US Data Center (default):

https://{subdomain}.rest.vitally.io/resources/messages/:id

EU Data Center:

https://rest.vitally-eu.io/resources/messages/:id

Request Params

Last updated