Skip to main content
POST
/
messaging_numbers_bulk_updates
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const messagingNumbersBulkUpdate = await client.messagingNumbersBulkUpdates.create({
  messaging_profile_id: '00000000-0000-0000-0000-000000000000',
  numbers: ['+18880000000', '+18880000001', '+18880000002'],
});

console.log(messagingNumbersBulkUpdate.data);
{
  "data": {
    "record_type": "messaging_numbers_bulk_update",
    "order_id": "00000000-0000-0000-0000-000000000000",
    "success": [
      "+18880000000",
      "+18880000001",
      "+18880000002"
    ],
    "pending": [],
    "failed": []
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
messaging_profile_id
string
required

Configure the messaging profile these phone numbers are assigned to:

  • Set this field to "" to unassign each number from their respective messaging profile
  • Set this field to a quoted UUID of a messaging profile to assign these numbers to that messaging profile
numbers
string<+E.164>[]
required

The list of phone numbers to update.

Response

Successful response with details about messaging bulk update phone numbers.

data
object
Example:
{
"record_type": "messaging_numbers_bulk_update",
"order_id": "00000000-0000-0000-0000-000000000000",
"success": [
"+18880000000",
"+18880000001",
"+18880000002"
],
"pending": [],
"failed": []
}