Skip to main content
DELETE
/
phone_number_campaigns
/
{phoneNumber}
JavaScript
import Telnyx from 'telnyx';

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

const phoneNumberCampaign = await client.phoneNumberCampaigns.delete('phoneNumber');

console.log(phoneNumberCampaign.campaignId);
{
  "phoneNumber": "+18005550199",
  "campaignId": "<string>",
  "createdAt": "2021-03-08T17:57:48.801186",
  "updatedAt": "2021-03-08T17:57:48.801186",
  "brandId": "7ba705b7-22af-493f-addc-ac04b7ca071c",
  "tcrBrandId": "BBRAND1",
  "tcrCampaignId": "CCAMPA1",
  "telnyxCampaignId": "3008dd9f-66d7-40e0-bf23-bf2d8d1a96ba",
  "assignmentStatus": "ASSIGNED",
  "failureReasons": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

phoneNumber
string
required

Response

Successful Response

phoneNumber
string
required
Example:

"+18005550199"

campaignId
string
required

For shared campaigns, this is the TCR campaign ID, otherwise it is the campaign ID

createdAt
string
required
Example:

"2021-03-08T17:57:48.801186"

updatedAt
string
required
Example:

"2021-03-08T17:57:48.801186"

brandId
string

Brand ID. Empty if the number is associated to a shared campaign.

Example:

"7ba705b7-22af-493f-addc-ac04b7ca071c"

tcrBrandId
string

TCR's alphanumeric ID for the brand.

Example:

"BBRAND1"

tcrCampaignId
string

TCR's alphanumeric ID for the campaign.

Example:

"CCAMPA1"

telnyxCampaignId
string

Campaign ID. Empty if the number is associated to a shared campaign.

Example:

"3008dd9f-66d7-40e0-bf23-bf2d8d1a96ba"

assignmentStatus
enum<string>

The assignment status of the number.

Available options:
FAILED_ASSIGNMENT,
PENDING_ASSIGNMENT,
ASSIGNED,
PENDING_UNASSIGNMENT,
FAILED_UNASSIGNMENT
Example:

"ASSIGNED"

failureReasons
string

Extra info about a failure to assign/unassign a number. Relevant only if the assignmentStatus is either FAILED_ASSIGNMENT or FAILED_UNASSIGNMENT