Skip to content

Compliance

Manage your Do-Not-Call (DNC) registry. Numbers on this list are automatically rejected when PSTN participants are queued through the Calls or Batch API.

Add to DNC List

http
POST /v1/dnc

Request Body

FieldTypeRequiredDefaultDescription
phone_numberstringYesPhone number to blocklist. Normalized to E.164 on write — +1 (555) 000-9999 is stored as +15550009999
reasonstringNo"API request"Human-readable reason for blocklisting

Example Request

bash
curl -X POST https://api.rymi.live/v1/dnc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+15550009999",
    "reason": "Customer opted out via email"
  }'

Response 201

json
{
  "status": "blocklisted",
  "phone_number": "+15550009999"
}

Adding a number that is already blocklisted succeeds (the entry is upserted) — the operation is idempotent, so retries are safe.

Errors

StatusMeaning
400phone_number is missing or not a valid E.164 number
401Missing or invalid API key

List DNC Entries

http
GET /v1/dnc

Retrieve a paginated list of blocklisted phone numbers.

Query Parameters

ParameterTypeDefaultDescription
limitinteger50Max records to return (max 500)
offsetinteger0Records to skip

Example Request

bash
curl "https://api.rymi.live/v1/dnc?limit=20&offset=0" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "dnc_entries": [
    {
      "phone": "+15550009999",
      "reason": "Customer opted out via email",
      "opt_out_at": "2026-03-01T10:00:00Z"
    }
  ],
  "total": 1,
  "offset": 0,
  "limit": 20
}

Response Fields

FieldTypeDescription
phonestringBlocklisted phone number in E.164 format
reasonstringReason for blocklisting
opt_out_atstringISO 8601 timestamp when the entry was added

Errors

StatusMeaning
401Missing or invalid API key

Remove from DNC

http
DELETE /v1/dnc/:phone

Path Parameters

ParameterTypeDescription
phonestringPhone number to remove from the DNC list (E.164 format)

Example Request

bash
curl -X DELETE https://api.rymi.live/v1/dnc/+15550009999 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "status": "removed",
  "phone": "+15550009999"
}

Removal is idempotent — deleting a number that isn't on the list still returns 200. The input is normalized to E.164 before matching, so format differences don't prevent removal.

Errors

StatusMeaning
401Missing or invalid API key

Bulk Import

http
POST /v1/dnc/batch

Add up to 1,000 phone numbers to the DNC list in a single request.

Request Body

FieldTypeRequiredDefaultDescription
phone_numbersstring[]YesArray of phone numbers in E.164 format (max 1,000)
reasonstringNo"Bulk API import"Shared reason applied to all entries

Example Request

bash
curl -X POST https://api.rymi.live/v1/dnc/batch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_numbers": ["+15550009999", "+15550008888", "+15550007777"],
    "reason": "Customer opt-out list from CRM export"
  }'

Response 201

json
{
  "status": "blocklisted",
  "count": 3,
  "invalid_count": 0,
  "invalid": []
}
FieldTypeDescription
countintegerNumbers blocklisted after normalization and de-duplication
invalid_countintegerInputs that failed E.164 validation and were skipped
invalidstring[]The skipped inputs, verbatim, so you can correct and resubmit them

Numbers that fail validation are skipped, not fatal — the batch never fails as a whole. Duplicates (already on the DNC list, or the same number in two formats) are upserted once, so the operation is idempotent.

Errors

StatusMeaning
400Empty phone_numbers array, more than 1,000 entries, or no valid E.164 numbers in the batch
401Missing or invalid API key

Check DNC Status

http
POST /v1/dnc/check

Check whether one or more phone numbers are on the DNC list without adding them. Useful for pre-flight validation before queuing outbound calls.

Request Body

FieldTypeRequiredDefaultDescription
phone_numbersstring[]YesArray of phone numbers to check (max 500)

Example Request

bash
curl -X POST https://api.rymi.live/v1/dnc/check \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_numbers": ["+15550009999", "+15551234567"]
  }'

Response 200

json
{
  "results": [
    { "phone_number": "+15550009999", "normalized": "+15550009999", "blocked": true, "valid": true },
    { "phone_number": "+1 (555) 123-4567", "normalized": "+15551234567", "blocked": false, "valid": true }
  ],
  "blocked_count": 1,
  "total_checked": 2
}

Response Fields

FieldTypeDescription
resultsarrayPer-number check results, in input order
results[].phone_numberstringThe phone number exactly as you sent it
results[].normalizedstring | nullE.164 form used for the lookup; null if the input couldn't be parsed
results[].blockedbooleantrue if the number is on the DNC list
results[].validbooleanfalse if the input is not a valid phone number (blocked is always false in that case)
blocked_countintegerTotal numbers found on the DNC list
total_checkedintegerTotal numbers checked

Errors

StatusMeaning
400Empty phone_numbers array or exceeds 500 limit
401Missing or invalid API key

How DNC Filtering Works

When you call POST /v1/calls or POST /v1/calls/batch with PSTN participants, Rymi cross-references the requested numbers against the DNC registry for the authenticated tenant. Both sides are compared in normalized E.164 form, so format differences can't slip past the check. Matching numbers are rejected before queueing with a 400 error stating that one or more (or all) requested numbers are on your Do-Not-Call list.

Bulk Operations

Use POST /v1/dnc/batch to blocklist up to 1,000 numbers at once, and POST /v1/dnc/check to verify numbers before queuing calls.