Skip to main content

Update a batch of numbers

POST 

/phone_numbers/jobs/update_phone_numbers

Creates a new background job to update a batch of numbers. At most one thousand numbers can be updated per API call. At least one of the updateable fields must be submitted.

Request

Body

required

    phone_numbers string[]required

    Array of phone number ids and/or phone numbers in E164 format to update

    tags string[]

    A list of user-assigned tags to help organize phone numbers.

    external_pin string

    If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, we will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism.

    customer_reference string

    A customer reference string for customer look ups.

    connection_id string

    Identifies the connection associated with the phone number.

    billing_group_id string

    Identifies the billing group associated with the phone number.

    voice

    object

    tech_prefix_enabled boolean

    Default value: false

    Controls whether a tech prefix is enabled for this phone number.

    translated_number string

    This field allows you to rewrite the destination number of an inbound call before the call is routed to you. The value of this field may be any alphanumeric value, and the value will replace the number originally dialed.

    call_forwarding

    object

    The call forwarding settings for a phone number.

    call_forwarding_enabled boolean

    Default value: true

    Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints.

    forwards_to string

    The phone number to which inbound calls to this number are forwarded. Inbound calls will not be forwarded if this field is left blank. If set, must be a +E.164-formatted phone number.

    forwarding_type string

    Possible values: [always, on_failure]

    Call forwarding type. 'forwards_to' must be set for this to have an effect.

    cnam_listing

    object

    The CNAM listing settings for a phone number.

    cnam_listing_enabled boolean

    Default value: false

    Enables CNAM listings for this number. Requires cnam_listing_details to also be set.

    cnam_listing_details string

    The CNAM listing details for this number. Must be alphanumeric characters or spaces with a maximum length of 15. Requires cnam_listing_enabled to also be set to true.

    usage_payment_method string

    Possible values: [pay-per-minute, channel]

    Default value: pay-per-minute

    Controls whether a number is billed per minute or uses your concurrent channels.

    media_features

    object

    The media features settings for a phone number.

    rtp_auto_adjust_enabled boolean

    Default value: true

    When RTP Auto-Adjust is enabled, the destination RTP address port will be automatically changed to match the source of the incoming RTP packets.

    accept_any_rtp_packets_enabled boolean

    Default value: false

    When enabled, Telnyx will accept RTP packets from any customer-side IP address and port, not just those to which Telnyx is sending RTP.

    t38_fax_gateway_enabled boolean

    Default value: false

    Controls whether Telnyx will accept a T.38 re-INVITE for this phone number. Note that Telnyx will not send a T.38 re-INVITE; this option only controls whether one will be accepted.

    call_recording

    object

    The call recording settings for a phone number.

    inbound_call_recording_enabled boolean

    Default value: false

    When enabled, any inbound call to this number will be recorded.

    inbound_call_recording_format string

    Possible values: [wav, mp3]

    Default value: wav

    The audio file format for calls being recorded.

    inbound_call_recording_channels string

    Possible values: [single, dual]

    Default value: single

    When using 'dual' channels, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B.

    inbound_call_screening string

    Possible values: [disabled, reject_calls, flag_calls]

    Default value: disabled

    The inbound_call_screening setting is a phone number configuration option variable that allows users to configure their settings to block or flag fraudulent calls. It can be set to disabled, reject_calls, or flag_calls. This feature has an additional per-number monthly cost associated with it.

Responses

202: Phone numbers job update phone numbers requested.

Schema

    data

    object

    id uuid

    Identifies the resource.

    record_type string

    Identifies the type of the resource.

    status string

    Possible values: [pending, in_progress, completed, failed, expired]

    Default value: pending

    Indicates the completion status of the background update.

    type string

    Possible values: [update_emergency_settings, delete_phone_numbers, update_phone_numbers]

    Identifies the type of the background job.

    etc date-time

    ISO 8601 formatted date indicating when the estimated time of completion of the background job.

    created_at string

    ISO 8601 formatted date indicating when the resource was created.

    updated_at string

    ISO 8601 formatted date indicating when the resource was updated.

    phone_numbers

    PhoneNumbersJobPhoneNumber[]

  • Array [

  • phone_number e164

    The phone number in e164 format.

    id int64

    The phone number's ID

  • ]

  • successful_operations

    PhoneNumbersJobSuccessfulOperation[]

  • Array [

  • phone_number e164

    The phone number in e164 format.

    id int64

    The phone number's ID

  • ]

  • pending_operations

    PhoneNumbersJobPendingOperation[]

  • Array [

  • phone_number e164

    The phone number in e164 format.

    id int64

    The phone number's ID

  • ]

  • failed_operations

    PhoneNumbersJobFailedOperation[]

  • Array [

  • phone_number e164

    The phone number in e164 format.

    id int64

    The phone number's ID

    errors

    Error[]

  • Array [

  • code integerrequired
    title stringrequired
    detail string

    source

    object

    pointer json-pointer

    JSON pointer (RFC6901) to the offending entity.

    parameter string

    Indicates which query parameter caused the error.

    meta

    object

    url string

    URL with additional information on the error.

  • ]

  • ]

401: Unauthorized

Schema

    errors

    Error[]

  • Array [

  • code integerrequired
    title stringrequired
    detail string

    source

    object

    pointer json-pointer

    JSON pointer (RFC6901) to the offending entity.

    parameter string

    Indicates which query parameter caused the error.

    meta

    object

    url string

    URL with additional information on the error.

  • ]

403: Forbidden

Schema

    errors

    Error[]

  • Array [

  • code integerrequired
    title stringrequired
    detail string

    source

    object

    pointer json-pointer

    JSON pointer (RFC6901) to the offending entity.

    parameter string

    Indicates which query parameter caused the error.

    meta

    object

    url string

    URL with additional information on the error.

  • ]

422: Unprocessable Entity

Schema

    errors

    Error[]

  • Array [

  • code integerrequired
    title stringrequired
    detail string

    source

    object

    pointer json-pointer

    JSON pointer (RFC6901) to the offending entity.

    parameter string

    Indicates which query parameter caused the error.

    meta

    object

    url string

    URL with additional information on the error.

  • ]

default: Unexpected error

Schema

    errors

    Error[]

  • Array [

  • code integerrequired
    title stringrequired
    detail string

    source

    object

    pointer json-pointer

    JSON pointer (RFC6901) to the offending entity.

    parameter string

    Indicates which query parameter caused the error.

    meta

    object

    url string

    URL with additional information on the error.

  • ]

Loading...