Skip to main content

Partially update a phone number

PATCH 

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

Changes some of what the number carries, leaving the rest alone. Omit branding or spoofDefense to leave it unchanged, send null to clear it, or send an object to replace it. The two are independent — changing one never affects the other.

A supplied object replaces that object entirely, so include its required fields (branding.displayName, spoofDefense.enabled). This is not RFC 7396 merge patch: nesting is not merged.

Unlike PUT, this never creates a number — patching one that isn't registered returns 404. 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

    phoneNumber phone_E164PhoneNumber (string)required

    An E.164 phone number, URL-encoded — the leading

    +
    becomes
    %2B
    (e.g.
    %2B12065550123
    ).

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

    Example: +12065550123

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

Responses​

The phone number after the update.

Response Body

application/json