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 /authenticationshows it masked), so store it securely right away. If you lose a key, delete it withDELETE /authentication/{id}and create a new one.
operationsscope the key on this API (/api/partner-gateway): each one opens the path of the same name, for exampleSMSopens/smsandCONTACTSopens/contacts. A call to an endpoint outside the key's operations is refused with401.AUTOMATION,CALENDARandREPORTopen no endpoint.- Campaigns by channel:
CAMPAIGNSopens every campaign. Without it,SMS,RCSandWHATSAPPopen the campaigns of their channel under/campaigns(a combinedsendingModesuch asRCS_SMSneeds every channel in it), andEMAILopens 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
trafficTypecan only be0(the default) or that key's own. Check both withGET /authentication/me. userIdmust 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
idanduserId, sousernameis always null in the response.
Request
Responses
- 201
- 400
- 401
- 403
- 500
API key created. This is the only response that carries its full value.
The body is malformed or misses a required field (userId, or a non-empty operations), or userId is not an accepted member of your team.
The API key is missing, invalid, or lacks the AUTHENTICATION operation.
The requested operations exceed those of the calling key, or trafficType is neither 0 nor that key's own.
Unexpected server error.