Skip to main content
PATCH
/
do-not-call
/
{id}
Update a DNC entry
curl --request PATCH \
  --url https://api.goyappr.com/do-not-call/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "agent_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "phone_number": "+972501234567",
  "reason": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "agents": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "type": "prompt",
      "flow_config": {
        "nodes": [
          {
            "id": "<string>",
            "name": "<string>",
            "position": {
              "x": 123,
              "y": 123
            },
            "agent_speaks_first": true,
            "greeting": "<string>",
            "is_literal": false,
            "next_step_id": "<string>",
            "auto_advance": true
          }
        ],
        "flow_config_version": "1",
        "metadata": {
          "custom_metadata_keys": [
            "<string>"
          ]
        }
      },
      "system_prompt": "<string>",
      "description": "<string>",
      "background_sound_volume": 0.3,
      "temperature": 1,
      "greeting_message": "<string>",
      "agent_speaks_first": true,
      "vad_stop_secs": 0.5,
      "vad_start_secs": 0.2,
      "vad_confidence": 0.7,
      "silence_timeout_secs": 60,
      "max_continuous_speech_secs": 120,
      "max_call_duration_secs": 600,
      "lead_memory_enabled": true,
      "is_active": true,
      "webhook_url": "<string>",
      "webhook_events": [],
      "extraction_parameters": [
        {
          "name": "customerName",
          "description": "The caller's full name as mentioned during the conversation"
        }
      ],
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.goyappr.com/llms.txt

Use this file to discover all available pages before exploring further.

Update reason, expires_at, and/or agent_ids on an existing Do-Not-Call entry. The phone_number is immutable — delete the entry and add a new one if the number itself needs to change. To switch a scoped entry to a global block, pass agent_ids: []. To narrow a global block to specific agents, pass a non-empty array. Required scope: do_not_call:manage.

Example request

# Convert a scoped entry to a global block
curl -X PATCH "https://api.goyappr.com/do-not-call/8c0e0f8a-1c11-4d3a-9a02-2b1e9d2f0001" \
  -H "Authorization: Bearer $YAPPR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_ids": []}'

# Update the note and set an expiry
curl -X PATCH "https://api.goyappr.com/do-not-call/8c0e0f8a-1c11-4d3a-9a02-2b1e9d2f0001" \
  -H "Authorization: Bearer $YAPPR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Cooling-off period — auto-expire in 30 days",
    "expires_at": "2026-06-10T00:00:00Z"
  }'

Example response

{
  "id": "8c0e0f8a-1c11-4d3a-9a02-2b1e9d2f0001",
  "company_id": "fe493f11-0000-0000-0000-000000000001",
  "phone_number": "+972501234567",
  "reason": "Cooling-off period — auto-expire in 30 days",
  "source": "api",
  "expires_at": "2026-06-10T00:00:00Z",
  "agents": [],
  "created_at": "2026-05-10T08:14:22.123Z"
}

Errors

HTTPCodeWhen
400Attempted to edit phone_number (immutable).
400expires_at is malformed or in the past.
400agent_ids contains a UUID that does not reference an agent in this company.
401INSUFFICIENT_SCOPEAPI key lacks do_not_call:manage.
404The id does not exist or belongs to a different company.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.

Path Parameters

id
string<uuid>
required

Body

application/json
reason
string | null
expires_at
string<date-time> | null
agent_ids
string<uuid>[]

Empty array = global; non-empty = scoped to listed agents.

Response

Updated entry

A phone number on the company's Do-Not-Call list. Outbound call placement skips numbers on this list — the request returns status: "dnc_blocked" and a call_logs row is recorded for analytics, but no carrier leg is established and no minutes are charged.

DNC entries can be global (block every agent) or agent-scoped (block only specific agents — others can still call the number). Scope is controlled via the agent_ids field.

id
string<uuid>
company_id
string<uuid>
phone_number
string

E.164 form, e.g. +972501234567. Whatever input format you submit gets normalized before storage.

Example:

"+972501234567"

reason
string | null

Optional free-form note. Surfaced in the dashboard, not in outbound API responses.

source
enum<string>

Where this entry came from. manual = added via dashboard, api = added via this API, auto = reserved for future automated additions (e.g. opt-out keyword detection during a call).

Available options:
manual,
api,
auto
expires_at
string<date-time> | null

When the block lapses. null = permanent. Past timestamps are filtered out at outbound-check time.

agents
object[]

Empty array [] (or omitted on insert) = global: every agent in the company is blocked from calling this number.

Non-empty = scoped: only the listed agents are blocked. Agents NOT in the array can still place outbound calls to this number.

On GET responses each item is the full agent object (resolved from the underlying agent_ids column so you don't have to make a second /agents/{id} call). On POST/PATCH inputs the field is named agent_ids and takes a string[] of UUIDs — see those endpoints for the input shape.

created_by
string<uuid> | null

Best-effort attribution to a user; null when added via API.

created_at
string<date-time>