Skip to main content

Add or replace phone numbers

PUT 

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

Replaces the state of several numbers at once. branding and spoofDefense are both required, and each applies to every number in the request — PUT sets the numbers to exactly what you send, so pass null for a product you do not want. A number that isn't registered yet is created.

To give numbers different branding, send one request per distinct set of settings. Use PATCH instead to change one product and leave the other untouched.

Numbers you leave out of the list are not touched — they are neither changed nor removed. PUT here replaces the state of each number you send, not the business's whole set of numbers; use POST …/phone-numbers/delete to remove numbers.

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

Responses​

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

Response Body

application/json