API ReferenceapicommsPOST /v1/threads

POST /v1/threads

Service: comms · operationId: (none)

Create or return an existing 1:1 DM thread. Idempotent on the participant_ids set.

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "participant_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 2
    }
  },
  "required": [
    "participant_ids"
  ]
}

Responses

200 Thread (existing or newly created)

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "brand_id": {
      "type": "string"
    },
    "channel_cid": {
      "type": "string"
    },
    "participant_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "brand_id",
    "channel_cid",
    "participant_ids",
    "created_at"
  ]
}

422 Validation error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

503 Thread service not available

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://comms.platform.loop.health/v1/threads \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'