Get API Key

Obtain an API key using Basic Authentication. This key will be used for all other API requests. For a user belonging to multiple companies, pass `company_id` to select which company the new key belongs to. If omitted, the company is chosen deterministically: the user's first non-collaborator company, or otherwise their first company. Your company ID can be found in the URL after logging in to the Coperniq UI: `https://app.coperniq.io/{company_id}/inbox`.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Query parameters

company_idintegerOptional>=1
ID of the company the new API key should belong to. Required only when the authenticated user belongs to more than one company and the default (first non-collaborator company) is not the desired one. The user must belong to the given company. Your company ID can be found in the URL after logging in to the Coperniq UI: `https://app.coperniq.io/{company_id}/inbox`.

Response

API key generated successfully
tokenstringOptional

API key (token) for authenticating future requests

companyIdintegerOptional
Company identifier
descriptionstringOptional
Description of the API key
namestringOptional
Name of the API key
emailstringOptionalformat: "email"
Email address of the user who created the API key
idintegerOptional
API user identifier

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error