API ReferenceapicommsPOST /v1/sequences/{id}/enroll

POST /v1/sequences/\{id\}/enroll

Service: comms · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Request body

{
  "type": "object",
  "properties": {
    "brand_id": {
      "type": "string",
      "minLength": 1
    },
    "person_id": {
      "type": "string",
      "minLength": 1
    },
    "recipient": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "brand_id",
    "person_id",
    "recipient"
  ]
}

Responses

201 Person enrolled in sequence

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "sequence_id": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "person_id": {
      "type": "string"
    },
    "recipient": {
      "type": "string"
    },
    "current_step": {
      "type": "number"
    },
    "status": {
      "type": "string"
    },
    "next_step_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "enrolled_at": {
      "type": "string"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "sequence_id",
    "brand_id",
    "person_id",
    "recipient",
    "current_step",
    "status",
    "next_step_at",
    "enrolled_at",
    "completed_at",
    "cancelled_at"
  ]
}

404 Sequence not found

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

Example

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