Skip to main content

Create an API Key

POST 

/api/partner-gateway/authentication

Creates an API key for your account and returns its full value. The key is active at once: send it in the X-API-Key header.

The full value is shown only once. No endpoint returns it again (GET /authentication shows it masked), so store it securely right away. If you lose a key, delete it with DELETE /authentication/{id} and create a new one.

  • operations scope the key on this API (/api/partner-gateway): each one opens the path of the same name, for example SMS opens /sms and CONTACTS opens /contacts. A call to an endpoint outside the key's operations is refused with 401. AUTOMATION, CALENDAR and REPORT open no endpoint.
  • Campaigns by channel: CAMPAIGNS opens every campaign. Without it, SMS, RCS and WHATSAPP open the campaigns of their channel under /campaigns (a combined sendingMode such as RCS_SMS needs every channel in it), and EMAIL opens the email campaigns under /campaigns/email.
  • They do not restrict sending: the messaging API (/api/message-server), which sends SMS, RCS and WhatsApp and spends credit, and media downloads (/api/files) accept any key of your account, whatever its operations.
  • A key cannot grant more than it has: the operations you request must be a subset of those of the key making the call, and trafficType can only be 0 (the default) or that key's own. Check both with GET /authentication/me.
  • userId must be an accepted member of your team, whatever user the calling key carries: a user of another company, a pending invitation or a suspended member is refused.
  • No username: keys created here are identified by their id and userId, so username is always null in the response.

Request​

Responses​

API key created. This is the only response that carries its full value.