Customer Token API

create new entry

POST /api/rest/admin/customer-tokens

Parameters

Name Description
data[type] Resource type (customer-tokens)
data[attributes][allow-listen-recording] Allow listen recording
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

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjcyLCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzY3MzU4NTYzfQ.hcN963h-2LcysB4Iiw5RuEvNHoDCx7haIAjFtoM7Bro
Host: example.org
Cookie: 

Route

POST /api/rest/admin/customer-tokens

Body

{"data":{"type":"customer-tokens","attributes":{"allow-listen-recording":true,"allowed-ips":["10.20.30.40","11.12.13.14"],"customer-portal-access-profile-id":7},"relationships":{"customer":{"data":{"type":"contractors","id":40}},"accounts":{"data":[{"type":"accounts","id":44},{"type":"accounts","id":45}]},"allow-outgoing-numberlists":{"data":[{"type":"numberlists","id":2},{"type":"numberlists","id":3}]},"provision-gateway":{"data":{"type":"gateways","id":22}}}}}

Response

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/vnd.api+json
location: http://example.org/api/rest/admin/customer-tokens/40
vary: Accept
etag: W/"e4eccb023ed7c8d74d96de3b178c0303"
cache-control: max-age=0, private, must-revalidate
x-request-id: e8ec312d-e261-4617-9aba-f7b080dfd651
x-runtime: 0.012395
content-length: 614

Status

201 Created

Body

{
  "data": {
    "id": "40",
    "type": "customer-tokens",
    "links": {
      "self": "http://example.org/api/rest/admin/customer-tokens/40"
    },
    "attributes": {
      "token": "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOlsiY3VzdG9tZXItdjEiXSwic3ViIjoiRCIsImNmZyI6eyJjdXN0b21lcl9pZCI6NDAsImN1c3RvbWVyX3BvcnRhbF9hY2Nlc3NfcHJvZmlsZV9pZCI6NywiYWNjb3VudF9pZHMiOls0NCw0NV0sImFsbG93X2xpc3Rlbl9yZWNvcmRpbmciOnRydWUsImFsbG93X291dGdvaW5nX251bWJlcmxpc3RzX2lkcyI6WzIsM10sImFsbG93ZWRfaXBzIjpbIjEwLjIwLjMwLjQwIiwiMTEuMTIuMTMuMTQiXSwicHJvdmlzaW9uX2dhdGV3YXlfaWQiOjIyfSwiZXhwIjoxNzY3MzU4NTYzfQ.SHokwoMJgw5oiLf2_d5Yp5MOG448Off0jl8o-HTXeUk",
      "expires-at": "2026-01-02T12:56:03.527Z"
    }
  }
}