Endpoint

POST /v2/message-provision

Request Parameters

Path Parameters

  • numbers
    array of strings required

    An array of numbers as strings to take action on.

  • action
    string required

    The action to take: "enable" or "disable"

  • callback_url
    string

    The callback URL to be called when the Message Provision Task status is updated.

  • email
    boolean

    If the email address boolean is true in a Message Provision request then an email will be sent on Message Task status updates.

Response Format

On success, the HTTP status code in the response header is 201 Created.
If the request included one number, then a message_provisioning_status will be returned.
If the request included more than one number, then a message_bulk_provisioning_status will be returned.
On error, the header status code is an error code and the response body contains an error object.

message_provisioning_status

Response format when one number is included in Message Provision request.

  • data

    Object composed of attributes, type, and id.

  • attributes

    Object composed of the following:

    • status - The status of the Message Provision task.

    • tn - The phone number (tn) in the Message Provision task.

  • type
    string

    Object type. This will always be message_provisioning_status.

  • id
    string

    ID for the Messaging Provision task.

message_bulk_provisioning_status

Response format when multiple numbers are included in the Message Provision request.

  • data

    Object composed of attributes, type, and id.

  • attributes

    Object composed of the following:

    • status - The status of the Message Provision task.

    • message - Informational messages about the Message Provision task.

    • numbers - An Object with the numbers separated by status. On submission, all numbers should be in the "processing" status.

      • successful - An array of numbers that have been successfully provisioned.

      • processing - An array of numbers that are still processing.

      • failed - An array of numbers that have failed provisioning.

  • type
    string

    Object type. This will always be message_provisioning_status.

  • id
    string

    ID for the Messaging Provision task.