Skip to content

MngCreateAffiliateApiToken

Creates a managed API token for one affiliate and brand. Requires access_crm and set_customers.

{"command":"MngCreateAffiliateApiToken","extID":"1","data":{"affiliate_id":42,"brand":"default","name":"Reporting integration","scopes":["customers:read","transactions:read"],"expires_time":1798761600}}
Field Type Required Description
affiliate_id int Yes Active affiliate with active access to the effective brand
brand string Admin: yes Effective manager brand scope
name string Yes Human-readable token name, maximum 128 characters
scopes string[] Yes customers:read, transactions:read, or both
expires_time int64 No Future Unix timestamp; 0 or omitted means no expiration

The response contains token and record. The complete JWT is returned only by this command and cannot be recovered from the token list later.

The integration sends it without Bearer:

Authorization: {JWT_TOKEN}