Skip to main content

Partially update phone numbers

PATCH 

/v1/businesses/{businessId}/phone-numbers

Changes some of what several numbers carry, leaving the rest alone. Omit branding or spoofDefense to leave it unchanged, send null to clear it, or send an object to replace it; whatever you send applies to every number in the request. The two are independent — changing one never affects the other.

A supplied object replaces that object entirely, so include its required fields. This is not RFC 7396 merge patch: nesting is not merged.

Unlike PUT, this never creates a number — a number that isn't registered is reported in needsAttention with NOT_FOUND, and the rest of the batch is still applied. Sending every field makes this equivalent to PUT.

The business must have completed verification (ACTIVE or INACTIVE).

Path Parameters​


    businessId string<uuid>required

    The ID of the business, assigned by Hiya.

    Example: 9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f

Header Parameters​


    X-Hiya-Request-Id string

    Your own correlation ID for this call, returned as requestId in the response body. Hiya generates one if omitted. A value that doesn't match the pattern is rejected with 400 INVALID_HEADER.

    Possible values: <= 200 characters, Value must match regular expression ^[A-Za-z0-9._:/+=@-]+$

    Example: job-2f9c1a7e-0042

Body

required

application/json

    phoneNumbersobject[]required

    The numbers to change.

    Possible values: >= 1, <= 1000

  • Array [


  • phoneNumberstringrequired

    A phone number in E.164 format, with the leading + — e.g. +12065550123.

    No pattern is enforced on the request so that a malformed number is reported per-number in the response rather than rejecting the whole batch. Hiya normalises and validates each number server-side; anything it cannot use comes back in needsAttention.

    Format: phone_SubmittedPhoneNumber (string)
    Example: +12065550123
  • ]


  • brandingobject | null

    Replaces the branding on every number in the request. null removes it; omit to leave it unchanged.


    displayNamestringrequired

    Name shown on the recipient's phone for branded calls.

    Possible values: non-empty and <= 200 characters

    Example: Acme Plumbing

    logoIdstring | null

    The id of a logo uploaded via the logo endpoints.

    Format: string<uuid>
    Example: 550e8400-e29b-41d4-a716-446655440000

    callReasonstring | null

    Reason for the call, shown next to the brand.

    Possible values: <= 50 characters

    Example: Appointment reminder

    doNotOriginateboolean

    Mark the number as Do-Not-Originate — it should only receive calls, never place them.

    Default value: false
    Example: false

    secureBrandingobject | null

    Secure Branding for the number — delivers the business's branding at call time.


    enabledbooleanrequired
    Example: true

    spoofDefenseobject | null

    Replaces the Spoof Defense state on every number in the request. null turns it off; omit to leave it unchanged.


    enabledbooleanrequired

    Whether Spoof Defense is on for the number.

    Example: true

Responses​

The batch was processed. Check the response to see which numbers were updated and which need attention.

Response Body

application/json

    requestIdstringrequired

    The X-Hiya-Request-Id this call was handled under — the value you sent, or one Hiya generated if you didn't send one.

    Example: job-2f9c1a7e-0042

    timestampstringrequired

    When Hiya handled the request.

    Format: string<date-time>

    Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$

    Example: 2026-05-28T14:32:10.264Z

    updatedarrayrequired

    The numbers that were changed.

    Format: phone_E164PhoneNumber (string)[]

    Possible values: Value must match regular expression ^\+[1-9]\d{1,14}$

    Example: ["+12065550123"]

    needsAttentionobject[]required

    The numbers that did not end up in the state you asked for, each with its own error.code and error.message saying why.

    error.codeMeaning
    INVALID_FIELDNot a usable phone number
    NOT_FOUNDNot registered anywhere — PATCH never creates
    CONFLICTAlready registered
    BRANDING_FAILEDChanged, but the branding could not be applied
  • Array [


  • phoneNumberstringrequired

    The number this applies to, echoed exactly as you submitted it — which, if the problem was the format, will not be E.164.

    Example: +12065550123

    errorobjectrequired

    codestringrequired

    | Code | Meaning | |---|---| | INVALID_FIELD | Not a usable phone number. | | NOT_FOUND | Not registered — PATCH never creates. | | CONFLICT | Already registered. | | BRANDING_FAILED | Changed, but the branding could not be applied. |

    Possible values: [INVALID_FIELD, NOT_FOUND, CONFLICT, BRANDING_FAILED]

    Example: INVALID_FIELD

    messagestringrequired

    A description of what went wrong.

    Example: Not a valid E.164 phone number.
  • ]

Example from Schema​

{
"requestId": "job-2f9c1a7e-0042",
"timestamp": "2026-05-28T14:32:10.264Z",
"updated": [
"+12065550123"
],
"needsAttention": [
{
"phoneNumber": "+12065553333",
"error": {
"code": "NOT_FOUND",
"message": "This number is not registered to this business."
}
}
]
}