Skip to Content
Developers
Numbers

Assign a number to a campaign and publisher

Needs the numbers:write scope. About scopes

Try it with a test key

Sends to https://api.traki.io

Test keys only. The key stays in this page while it is open and is never saved.

/v1/account/numbers/{id}/assign

Puts the number on one of the account’s call campaigns, for one of its publishers. Give campaignId, publisherId or both: without campaignId the number stays on its current campaign and changes publisher; without publisherId it keeps its publisher. The publisher must be approved on the campaign (422 source_not_approved). Pool numbers follow their pool and cannot be assigned one by one.

Authorization

key
headerAuthorizationBearer <traki_account_…>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
campaignId?string
Formatuuid
publisherId?string
Formatuuid

Response Body

Success

application/json
  1. response
id*string
Formatuuid
number*string
name*string|null
type*string
country*string
region*string|null
state*string
campaignId*|null
publisher*|null
monthlyRent*string
acquiredAt*string
updatedAt*string
Example Request
curl -X POST 'https://api.traki.io/v1/account/numbers/497f6eca-6276-4993-bfeb-53cbbbba6f08/assign' \  -H "Authorization: Bearer $TRAKI_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: a-unique-id-for-this-change' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "number": "string",  "name": "string",  "type": "string",  "country": "string",  "region": "string",  "state": "string",  "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf",  "publisher": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "externalId": "string",    "name": "string"  },  "monthlyRent": "string",  "acquiredAt": "string",  "updatedAt": "string"}