Skip to main content
POST
/
conversations
Create conversation
curl --request POST \
  --url https://api.managem.co.uk/conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source": {
    "type": "ORDER",
    "id": "<string>"
  },
  "recipientId": "<string>",
  "body": "<string>"
}
'
{
  "id": "<string>",
  "source": {
    "type": "ORDER",
    "id": "<string>"
  },
  "userA": {
    "id": "<string>",
    "username": "<string>",
    "reviews": 123,
    "rating": 123,
    "score": 123,
    "sales": 123,
    "purchases": 123,
    "joined": "2023-11-07T05:31:56Z",
    "avatar": "<string>",
    "cover": "<string>",
    "profile": "<string>"
  },
  "userB": {
    "id": "<string>",
    "username": "<string>",
    "reviews": 123,
    "rating": 123,
    "score": 123,
    "sales": 123,
    "purchases": 123,
    "joined": "2023-11-07T05:31:56Z",
    "avatar": "<string>",
    "cover": "<string>",
    "profile": "<string>"
  },
  "locked": true,
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "lastMessage": {
    "id": "<string>",
    "conversationId": "<string>",
    "sender": {
      "id": "<string>",
      "username": "<string>",
      "reviews": 123,
      "rating": 123,
      "score": 123,
      "sales": 123,
      "purchases": 123,
      "joined": "2023-11-07T05:31:56Z",
      "avatar": "<string>",
      "cover": "<string>",
      "profile": "<string>"
    },
    "body": "<string>",
    "createdAt": "<string>",
    "viewedAt": "<string>",
    "attachments": [
      {
        "id": "<string>",
        "imageId": "<string>",
        "url": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Data required to create a new conversation with an initial message

source
object
required

Conversation source

recipientId
string
required

User ID of the conversation recipient

body
string
required

Initial message body. Links, emojis and profanity are sanitized.

Response

201 - application/json

Conversation created

id
string
required

Unique identifier for the conversation

source
object
required

Conversation source

userA
object
required

First participant

userB
object
required

Second participant

locked
boolean
required

Whether the conversation is locked

createdAt
string | null

Timestamp when the conversation was created

updatedAt
string | null

Timestamp when the conversation was last updated

lastMessage
object

Latest message in the conversation