curl --request POST \
--url "https://api.nixflex.com/v1/contact-suppressions" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Content-Type: application/json" \
--data '{"phone_numbers":["+12025550101"],"channel":"all"}'
import Nixflex from 'nixflex';
const c = new Nixflex({
apiKey: process.env.NIXFLEX_API_KEY,
baseUrl: 'https://api.nixflex.com',
maxRetries: 0,
});
const result = await c.contacts.add({"phone_numbers": ["+12025550101"], "channel": "all"});
import os
from nixflex import Nixflex
with Nixflex(
api_key=os.environ["NIXFLEX_API_KEY"],
base_url="https://api.nixflex.com",
max_retries=0,
) as c:
result = c.contacts.add(phone_numbers=['+12025550101'], channel='all')
$body = @'
{
"phone_numbers": [
"+12025550101"
],
"channel": "all"
}
'@
[IO.File]::WriteAllText('request-101.json', $body, (New-Object Text.UTF8Encoding $false))
nixflex contacts add --body '@request-101.json' --confirm --json --base-url "https://api.nixflex.com"
{
"name": "add_contact_suppressions",
"arguments": {
"phone_numbers": [
"+12025550101"
],
"channel": "all",
"confirm": true
}
}
{
"added": 1,
"submitted": 1,
"channel": "all"
}
Contacts
Add contact suppressions
Add Nixflex do-not-contact entries for future contact checks. Existing entries are retained; review the number, channel and suppression reason.
POST
/
contact-suppressions
curl --request POST \
--url "https://api.nixflex.com/v1/contact-suppressions" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Content-Type: application/json" \
--data '{"phone_numbers":["+12025550101"],"channel":"all"}'
import Nixflex from 'nixflex';
const c = new Nixflex({
apiKey: process.env.NIXFLEX_API_KEY,
baseUrl: 'https://api.nixflex.com',
maxRetries: 0,
});
const result = await c.contacts.add({"phone_numbers": ["+12025550101"], "channel": "all"});
import os
from nixflex import Nixflex
with Nixflex(
api_key=os.environ["NIXFLEX_API_KEY"],
base_url="https://api.nixflex.com",
max_retries=0,
) as c:
result = c.contacts.add(phone_numbers=['+12025550101'], channel='all')
$body = @'
{
"phone_numbers": [
"+12025550101"
],
"channel": "all"
}
'@
[IO.File]::WriteAllText('request-101.json', $body, (New-Object Text.UTF8Encoding $false))
nixflex contacts add --body '@request-101.json' --confirm --json --base-url "https://api.nixflex.com"
{
"name": "add_contact_suppressions",
"arguments": {
"phone_numbers": [
"+12025550101"
],
"channel": "all",
"confirm": true
}
}
{
"added": 1,
"submitted": 1,
"channel": "all"
}
FIXED · account An incoming STOP blocks voice and SMS across the owning account. The receiving business number is evidence only.
NOT OFFERED → do this instead · number A number or a separate agent does not create its own STOP boundary. Businesses on a platform share its STOP list. Honour the suppression across their numbers.
YOU CAN CHANGE · account Add a do-not-contact entry for all channels, voice or SMS. Check the selected owner and recipient before any change.
SCOPE · recipient Preview local contact rules before outreach. Report the reason when a recipient is held and resolve the underlying policy or missing data.
Repeated values do not create duplicate entries in the same account/channel bucket. This changes future contact permission, not already accepted contact. Existing opt-outs remain enforced even if adding owner suppressions is temporarily paused.
needs_timezone, timezone_policy_paused, contact_policy_paused, consent_required, consent_withdrawn, do_not_contact, outside_hours, not_due_local, policy_migration_required, country_policy_review, holiday_data_unavailable, public_holiday.
Keyword STOP works independently. AI recognition of a sender’s clear objection in a verified incoming SMS is off by default. Customers have no switch for it. Where enabled on eligible automatic replies, it blocks calls and texts account-wide and may send one goodbye.
On GET /v1/contact-suppressions, business_number alone selects keyword evidence. Add source=attributed for keyword and AI entries. To correct an eligible AI mistake, the Owner or account key sends phone_number, channel=all, current review_version and a reason to POST /v1/contact-suppressions/ai-corrections. Reload on review_changed. Keyword STOP and independent restrictions stay locked. Correction never supplies consent.
Read the compact AI rules
Add account-owned do-not-contact entries for future contact checks. Existing entries are retained; a new owner request cannot replace recipient opt-out evidence.
Method: POST ·
Success: 200 ·
Scope: Owning account
The important part
- Add only the intended recipients and scope.
- Suppression blocks eligible future work; it cannot recall an already dispatched contact.
Authentication
SendAuthorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side credential. Send Content-Type: application/json.
Request fields
Send a JSON object.| Field | Type | Required | Default | Limits and meaning |
|---|---|---|---|---|
phone_numbers | array of string | Yes | None | One to 1,000 strict E.164 numbers. Maximum 1000 items. Minimum 1 items. |
channel | string | No | "all" | Channel bucket. Allowed: "all", "voice", "sms". |
Response fields
200 OK returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.
| Field | Type | Meaning |
|---|---|---|
added | integer | New stored entries; existing matches and duplicate input rows add nothing. |
submitted | integer | Number of submitted input rows, including duplicates. |
channel | string | Chosen stored bucket. Allowed: "all", "voice", "sms". |
Example request
These examples require Node/CLI 0.11.0 or later, Python 0.4.0 or later and MCP 0.5.0 or later. KeepNIXFLEX_API_KEY private. cURL uses Bash; CLI uses PowerShell and reads the key through NIXFLEX_API_KEY. Replace fixture identifiers and reserved example numbers with approved account-owned values. Configure the existing MCP installation for the same account at https://api.nixflex.com before using the shown tool arguments. Python shows the synchronous client; AsyncNixflex uses the same method with async with and await. This example changes state. Review the target and payload before running it.
curl --request POST \
--url "https://api.nixflex.com/v1/contact-suppressions" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Content-Type: application/json" \
--data '{"phone_numbers":["+12025550101"],"channel":"all"}'
import Nixflex from 'nixflex';
const c = new Nixflex({
apiKey: process.env.NIXFLEX_API_KEY,
baseUrl: 'https://api.nixflex.com',
maxRetries: 0,
});
const result = await c.contacts.add({"phone_numbers": ["+12025550101"], "channel": "all"});
import os
from nixflex import Nixflex
with Nixflex(
api_key=os.environ["NIXFLEX_API_KEY"],
base_url="https://api.nixflex.com",
max_retries=0,
) as c:
result = c.contacts.add(phone_numbers=['+12025550101'], channel='all')
$body = @'
{
"phone_numbers": [
"+12025550101"
],
"channel": "all"
}
'@
[IO.File]::WriteAllText('request-101.json', $body, (New-Object Text.UTF8Encoding $false))
nixflex contacts add --body '@request-101.json' --confirm --json --base-url "https://api.nixflex.com"
{
"name": "add_contact_suppressions",
"arguments": {
"phone_numbers": [
"+12025550101"
],
"channel": "all",
"confirm": true
}
}
Example response
Illustrative200 response. Identifiers and values are examples; some optional or compatibility fields are omitted.
{
"added": 1,
"submitted": 1,
"channel": "all"
}
Errors
Failures return anerror object with code, message, doc_url and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_request | The identifier or request fields are invalid. | Correct the documented fields before resending. |
| 503 | feature_paused | This control is paused. | Wait for availability; do not work around the refusal. |
| 503 | outcome_unknown | The write result could not be confirmed. | Read current state; do not resend automatically. |
| 400 | invalid_json | Invalid JSON body. | Correct JSON syntax. |
| 413 | payload_too_large | The request exceeds the JSON body limit. | Send a smaller request. |
| 401 | unauthorized | The credential is missing or invalid. | Check the full account credential. |
| 429 | rate_limit_exceeded | The account request limit was reached. | Wait for Retry-After. Reconcile uncertain writes before resending. |
Retry and idempotency
No idempotency key is documented. A timeout or 5xx can follow a committed change. Read the current state before deciding whether to submit again; never automatically repeat an uncertain write. Repeating the same values does not add duplicate rows, but an uncertain result should still be checked with the list endpoint.Related endpoints
Authorizations
Body
application/json