Skip to content

SOF43 - Create a thread on a service

Request

Call Frequency
Maximum usage: At every message thread
Path
service_codestringrequired

Service code on which the thread is created.

Query
shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

Bodymultipart/form-data
filesArray of strings, (binary)

List of attachments for the first message of the thread

thread_inputobjectrequired

The content of the thread: body, topic, participants...

curl -i -X POST \
  https://your-instance.mirakl.net/api/mms/services/{service_code}/threads \
  -H 'Content-Type: multipart/form-data' \
  -F 'files=@path/to/file' \
  -F 'thread_input="{\"body\":\"string\",\"to\":[\"OPERATOR\"],\"topic\":{\"type\":\"FREE_TEXT\",\"value\":\"string\"}}";type=application/json'

Responses

Created

Bodyapplication/json
message_idstringrequired

Id of the first message created on the thread

thread_idstringrequired

Id of the created thread

Response
{ "message_id": "fdf3a03a-9368-4db8-b318-a63f8fe49899", "thread_id": "9f16bf63-68f8-4edc-a557-1b4e4b4659fe" }