API ReferenceapicommsPUT /v1/preferences

PUT /v1/preferences

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
    },
    "enabled": {
      "type": "boolean"
    }
  },
  "required": [
    "brand_id",
    "person_id",
    "channel",
    "category",
    "enabled"
  ]
}

Responses

200 Preference updated

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

422 Validation error

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

Example

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