Skip to content
Shortcut: /, ⌘K or Ctrl+K

Call consent

View as Markdown

The call opt-out object

Attributes

  • idstring (uuid)required

    Identifier for this resource.

  • phoneNumberstringrequirednullable

    The phone number in E.164 format, or null for a BSUID entry.

  • bsuidstringrequirednullable

    The WhatsApp business-scoped user ID, or null for a phone number entry.

  • notestringrequirednullable

    Your note, for example why the person asked not to be called.

  • sourcestringrequired

    How the entry was added.

    Allowed valuesapiconsoleimport
  • createdAtstring (date-time)required

    ISO 8601 timestamp when this resource was created.

The call opt-out object
{
  "id": "00000000-0000-4000-8000-000000000000",
  "phoneNumber": "string",
  "bsuid": "string",
  "note": "string",
  "source": "api",
  "createdAt": "2026-09-22T12:00:00Z"
}

The call policy object

Attributes

  • blockedCountryCodesarray of stringrequired

    Calls to phone numbers that start with one of these codes are refused with 403 call_destination_blocked. While the list is not empty, calls to a person whose phone number is not known are refused too.

  • optOutCountintegerrequiredmin0

    Entries on the team's do-not-call list.

  • revisionintegerrequiredmin0

    Increases every time the blocked country codes change; 0 before they are first saved. Send it as expectedRevision.

  • updatedAtstring (date-time)requirednullable

    When the blocked country codes last changed, or null.

The call policy object
{
  "blockedCountryCodes": [
    "string"
  ],
  "optOutCount": 0,
  "revision": 0,
  "updatedAt": "2026-09-22T12:00:00Z"
}

Create call opt out

POST/platform/call-opt-outsPlatform API
Base URL
https://api.polymorfa.com
Required permission
sessions:manage

Adds a phone number or BSUID. Calls to it are refused with 403 call_recipient_opted_out from then on. Adding an entry that already exists returns it with 200.

Body

Provide exactly one of: phoneNumber or bsuid

  • phoneNumberstringpattern^\+[1-9]\d{1,14}$

    Phone number in E.164 format, for example +14155550123.

  • bsuidstringpattern^[A-Z]{2}\.[A-Za-z0-9]{1,128}$

    WhatsApp business-scoped user ID, for example US.13491208655302741918.

  • notestringlength1–500

    Optional note, 1 to 500 Unicode characters.

Responses

  • 200The entry already existed.
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 6 child fields
    Show 3 headers
  • 201Entry added.
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 409`call_opt_out_limit`: the list already holds 100,000 entries.
  • 500Internal server error
POST /platform/call-opt-outscURL
Not available with the Test key. Use a team key or project token.
curl -X POST "https://api.polymorfa.com/platform/call-opt-outs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "phoneNumber": "string",
  "bsuid": "string",
  "note": "string"
}'
Response
{
  "success": true,
  "data": {
    "id": "00000000-0000-4000-8000-000000000000",
    "phoneNumber": "string",
    "bsuid": "string",
    "note": "string",
    "source": "api",
    "createdAt": "2026-09-22T12:00:00Z"
  }
}

List call opt outs

GET/platform/call-opt-outsPlatform API
Base URL
https://api.polymorfa.com
Required permission
sessions:read

Lists the team's do-not-call entries, newest first.

Query parameters

  • limitintegerrange1–500

    Specifies limit for this query parameter.

    Default 100
  • cursorstring (uuid)

    Specifies cursor for this query parameter.

  • phoneNumberstringpattern^\+[1-9]\d{1,14}$

    Phone number in international format.

  • bsuidstringpattern^[A-Z]{2}\.[A-Za-z0-9]{1,128}$

    Business-scoped user identifier (BSUID), scoped to the owning business portfolio.

Responses

  • 200One page of entries.
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataarray of objectrequired

      Structured data carried by this object.

      Show 6 child fields
    • pageobjectrequired

      Specifies page for this management platform access list call opt outs response.

      Show 2 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
GET /platform/call-opt-outscURL
Not available with the Test key. Use a team key or project token.
curl "https://api.polymorfa.com/platform/call-opt-outs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "success": true,
  "data": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "phoneNumber": "string",
      "bsuid": "string",
      "note": "string",
      "source": "api",
      "createdAt": "2026-09-22T12:00:00Z"
    }
  ],
  "page": {
    "nextCursor": "string",
    "hasMore": true
  }
}

Get call policy

GET/platform/call-policyPlatform API
Base URL
https://api.polymorfa.com
Required permission
sessions:read

Returns the team's blocked country codes and the size of its do-not-call list.

Responses

  • 200The call policy.
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 4 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
GET /platform/call-policycURL
Not available with the Test key. Use a team key or project token.
curl "https://api.polymorfa.com/platform/call-policy" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "success": true,
  "data": {
    "blockedCountryCodes": [
      "string"
    ],
    "optOutCount": 0,
    "revision": 0,
    "updatedAt": "2026-09-22T12:00:00Z"
  }
}

Update call policy

PUT/platform/call-policyPlatform API
Base URL
https://api.polymorfa.com
Required permission
sessions:manage

Replaces the blocked country codes. New calls are checked against the new list at once; calls in progress continue.

Body

  • blockedCountryCodesarray of stringrequiredmax items300item pattern^[1-9]\d{0,3}$

    The complete list, replacing the stored one. At most 300 codes; duplicates are removed. Send an empty list to allow every country.

  • expectedRevisionintegermin0

    Apply the change only if the policy still has this revision. Otherwise it fails with 409 state_conflict.

Responses

  • 200The updated call policy.
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 4 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 409`state_conflict`: the policy changed after `expectedRevision`.
  • 500Internal server error
PUT /platform/call-policycURL
Not available with the Test key. Use a team key or project token.
curl -X PUT "https://api.polymorfa.com/platform/call-policy" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "blockedCountryCodes": [
    "44"
  ]
}'
Response
{
  "success": true,
  "data": {
    "blockedCountryCodes": [
      "string"
    ],
    "optOutCount": 0,
    "revision": 0,
    "updatedAt": "2026-09-22T12:00:00Z"
  }
}

Import call opt outs

POST/platform/call-opt-outs/importPlatform API
Base URL
https://api.polymorfa.com
Required permission
sessions:manage

Adds up to 5,000 entries in one request. Valid entries are added together; invalid ones are listed in rejected. If the valid entries would take the list past its limit, nothing is added and the request fails with 409 call_opt_out_limit.

Body

  • entriesarray of objectrequireditems1–5000

    1 to 5,000 entries, each with exactly one of phoneNumber (E.164) or bsuid, and an optional note. Invalid entries are reported in rejected and the others are added.

    Show 3 child fields

Responses

  • 200Import result.
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 3 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 409`call_opt_out_limit`: the entries would take the list past 100,000 entries.
  • 500Internal server error
POST /platform/call-opt-outs/importcURL
Not available with the Test key. Use a team key or project token.
curl -X POST "https://api.polymorfa.com/platform/call-opt-outs/import" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "entries": [
    {
      "phoneNumber": "string",
      "bsuid": "string",
      "note": "string"
    }
  ]
}'
Response
{
  "success": true,
  "data": {
    "added": 0,
    "existing": 0,
    "rejected": [
      {
        "index": 0,
        "reason": "invalid_phone_number"
      }
    ]
  }
}

Delete call opt out

DELETE/platform/call-opt-outs/{optOutId}Platform API
Base URL
https://api.polymorfa.com
Required permission
sessions:manage

Removes one entry. The person can be called again.

Path parameters

  • optOutIdstring (uuid)required

    Identifier for the opt out.

Responses

  • 200Entry removed.
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 2 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
DELETE /platform/call-opt-outs/{optOutId}cURL
Not available with the Test key. Use a team key or project token.
curl -X DELETE "https://api.polymorfa.com/platform/call-opt-outs/<optOutId>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "success": true,
  "data": {
    "id": "00000000-0000-4000-8000-000000000000",
    "deleted": true
  }
}