Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Adding documentation for the TN endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
adarkbandwidth committed Jun 13, 2023
1 parent c571890 commit 91e81cb
Showing 1 changed file with 49 additions and 2 deletions.
51 changes: 49 additions & 2 deletions site/docs/messaging/campaign-management/csp/campaign-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ HTTP/1.1 429 Too Many Requests
6. [Deactivate Campaign](#deactivate-campaign)
7. [Re-Vet Campaign](#re-vet-campaign)
8. [Update Campaign TN Relationship](#update-campaign-tn-relationship)
9. [Bulk Update Campaign TN Relationships](#bulk-update-campaign-tn-relationships)

9. [Fetch Campaign TNs](#fetch-campaign-tns)
10. [Bulk Update Campaign TN Relationships](#bulk-update-campaign-tn-relationships)

## Create campaign

Expand Down Expand Up @@ -955,6 +955,53 @@ Location: https://dashboard.bandwidth.com/api/accounts/accounts/{accountId}/tnop
</TnOptionOrderResponse>
```

## Fetch Campaign TNs

This endpoint allows you to fetch the telephone numbers that have been registered to a specific campaign.

### Request URL

<Highlight color="#ff6f47">GET</Highlight> <code>https://dashboard.bandwidth.com/api/accounts/{accountId}/campaignManagement/10dlc/campaigns/{campaignId}/tn</code>

### Examples

> Request
```http
GET https://dashboard.bandwidth.com/api/accounts/{accountId}/campaignManagement/10dlc/campaigns/{campaignId}/tn HTTP/1.1
Content-Type: application/xml; charset=utf-8
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
```

> Response
```http
HTTP/1.1 200 No Content
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CampaignTnsResponse>
<TotalCount>1</TotalCount>
<TelephoneNumbers>
<TelephoneNumber>8888888888</TelephoneNumber>
</TelephoneNumbers>
</CampaignTnsResponse>
```

> Error Response
```http
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CampaignTnsResponse>
<ResponseStatus>
<ErrorCode>5081</ErrorCode>
<Description>Number Format 'wrong' is invalid.</Description>
</ResponseStatus>
</CampaignTnsResponse>
```


asdf

## Bulk Update Campaign TN Relationships
We do not have a publicly exposed REST endpoint for bulk TN updates. Please see how to import a csv in our [CSP campaign Dashboard UI guide](https://support.bandwidth.com/hc/en-us/articles/5900095168663-How-to-register-a-campaign-for-10DLC).<br/>
For more info on TNs, please see [Number Management](/docs/numbers/).<br/>
Expand Down

0 comments on commit 91e81cb

Please sign in to comment.