API ReferenceapicommsPOST /v1/ask/threads/{thread_id}/replies

POST /v1/ask/threads/\{thread_id\}/replies

Service: comms · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • thread_id (string) required

Request body

{
  "type": "object",
  "properties": {
    "author_user_id": {
      "type": "string"
    },
    "author_name": {
      "type": "string",
      "minLength": 1
    },
    "author_avatar_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "body": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "author_name",
    "body"
  ]
}

Responses

200 Ask reply recorded

{
  "type": "object",
  "properties": {
    "thread_id": {
      "type": "string"
    },
    "message": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "thread_id": {
          "type": "string"
        },
        "author_user_id": {
          "type": "string"
        },
        "author_role": {
          "type": "string"
        },
        "author_name": {
          "type": "string"
        },
        "author_avatar_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "body": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "thread_id",
        "author_user_id",
        "author_role",
        "author_name",
        "author_avatar_url",
        "body",
        "created_at"
      ]
    }
  },
  "required": [
    "thread_id",
    "message"
  ]
}

403 Missing brand context or subject mismatch

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

404 Ask thread not found

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

422 Invalid request body

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

500 Ask reply could not be recorded

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

Example

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