API ReferenceapicommsPOST /v1/unsubscribe

POST /v1/unsubscribe

Service: comms · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "brand_id": {
      "type": "string",
      "minLength": 1
    },
    "person_id": {
      "type": "string",
      "minLength": 1
    },
    "channel": {
      "type": "string",
      "enum": [
        "email",
        "sms",
        "push",
        "in_app"
      ]
    },
    "category": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "brand_id",
    "person_id",
    "channel",
    "category"
  ]
}

Responses

200 Unsubscribed successfully

{
  "type": "object",
  "properties": {
    "brand_id": {
      "type": "string"
    },
    "person_id": {
      "type": "string"
    },
    "channel": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "opted_in": {
      "type": "boolean"
    }
  },
  "required": [
    "brand_id",
    "person_id",
    "channel",
    "category",
    "opted_in"
  ]
}

422 Validation error

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

Example

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