Customer Token API

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

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgzLCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzkyNjE5ODA0fQ.mDtgVmp-G00eLkW6PeRvvWkN4abNtIx8fv_Na3ULYQA
Host: example.org
Cookie: 

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":45}},"accounts":{"data":[{"type":"accounts","id":49},{"type":"accounts","id":50}]},"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/45
vary: Accept
etag: W/"81492b63c27f15b94ec83898fe3bb53b"
cache-control: max-age=0, private, must-revalidate
x-request-id: afd58461-b7ee-45ab-8dd9-16bb8a013ed3
x-runtime: 0.017284
content-length: 574

Status

201 Created

Body

{
  "data": {
    "id": "45",
    "type": "customer-tokens",
    "links": {
      "self": "http://example.org/api/rest/admin/customer-tokens/45"
    },
    "attributes": {
      "token": "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOlsiY3VzdG9tZXItdjEiXSwic3ViIjoiRCIsImNmZyI6eyJjdXN0b21lcl9pZCI6NDUsImN1c3RvbWVyX3BvcnRhbF9hY2Nlc3NfcHJvZmlsZV9pZCI6NywiYWNjb3VudF9pZHMiOls0OSw1MF0sImFsbG93X291dGdvaW5nX251bWJlcmxpc3RzX2lkcyI6WzIsM10sImFsbG93ZWRfaXBzIjpbIjEwLjIwLjMwLjQwIiwiMTEuMTIuMTMuMTQiXSwicHJvdmlzaW9uX2dhdGV3YXlfaWQiOjIyfSwiZXhwIjoxNzkyNjE5ODA0fQ.JpZ4Wi1iKNPl_kSNr2VtMVLRfhswWgnreFfAbCATfJQ",
      "expires-at": "2026-10-21T21:56:44.429Z"
    }
  }
}