---
title: "Manually record an opt-out for a phone number"
method: POST
path: "/v1/compliance/opt-outs"
tags: ["Compliance / CASL"]
---

# Manually record an opt-out for a phone number

`POST /v1/compliance/opt-outs`

## Request

- Base URL: `https://api.honkio.ca`
- URL: `https://api.honkio.ca/v1/compliance/opt-outs`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Requires `compliance:w`.

## Request body

- object
  - `phone_number` string, required: Number that is opting out (subscriber)
  - `from_number` string, required: Your sending number they are opting out from

## Response `201`

Opted out.

- object: Opted out.
  - `status` 'opted_out', required

## Other responses

- `401`: Missing, invalid, revoked or expired API key.
- `402`: The account has no balance, or a LIVE key was used before the first top-up.
- `403`: PHONE_NUMBER_NOT_OWNED: a live key recorded an opt-out from a number the account does not hold.
- `422`: INVALID_PHONE_NUMBER or VALIDATION_ERROR.
- `429`: Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/honkio/apis/honkio-api.md) · [All operations](https://skmtc.dev/honkio/apis/honkio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/honkio/apis/honkio-api/revisions/ce4ed3fe9691?raw)
