create new entry
POST /api/rest/admin/customer-tokens
Parameters
| Name |
Description |
|
data[type]
|
Resource type (customer-tokens)
|
|
data[attributes][allowed-ips]
|
Allowed ips
|
|
data[attributes][customer-portal-access-profile-id]
|
Customer portal access profile id
|
|
data[relationships][customer]
|
Customer
|
|
data[relationships][accounts]
|
Accounts
|
|
data[relationships][allow-outgoing-numberlists]
|
Allow outgoing numberlists
|
|
data[relationships][provision-gateway]
|
Provision gateway
|
Request
Headers
Route
POST /api/rest/admin/customer-tokens
Body
{"data":{"type":"customer-tokens","attributes":{"allowed-ips":["10.20.30.40","11.12.13.14"],"customer-portal-access-profile-id":7},"relationships":{"customer":{"data":{"type":"contractors","id":42}},"accounts":{"data":[{"type":"accounts","id":46},{"type":"accounts","id":47}]},"allow-outgoing-numberlists":{"data":[{"type":"numberlists","id":2},{"type":"numberlists","id":3}]},"provision-gateway":{"data":{"type":"gateways","id":22}}}}}
Response
Headers
Status
201 Created
Body
{
"data": {
"id": "42",
"type": "customer-tokens",
"links": {
"self": "http://example.org/api/rest/admin/customer-tokens/42"
},
"attributes": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOlsiY3VzdG9tZXItdjEiXSwic3ViIjoiRCIsImNmZyI6eyJjdXN0b21lcl9pZCI6NDIsImN1c3RvbWVyX3BvcnRhbF9hY2Nlc3NfcHJvZmlsZV9pZCI6NywiYWNjb3VudF9pZHMiOls0Niw0N10sImFsbG93X291dGdvaW5nX251bWJlcmxpc3RzX2lkcyI6WzIsM10sImFsbG93ZWRfaXBzIjpbIjEwLjIwLjMwLjQwIiwiMTEuMTIuMTMuMTQiXSwicHJvdmlzaW9uX2dhdGV3YXlfaWQiOjIyfSwiZXhwIjoxNzcyMjEyMDAyfQ.eHK_M-KwPOS1Mtf6Pbd3Kk98V8AFXJCvjbtT--qiZ3g",
"expires-at": "2026-02-27T17:06:42.608Z"
}
}
}