Settings

Create API key

Use the Create API keys endpoint to generate a new API key for your client.

API keys are tokens used to control access to the API. Include this token in the Authorization header parameter when making API calls, following the word "Basic" and a space with your API key.

You can read more about authentication at Codat and managing API keys via the Portal UI or API.

Tips and pitfalls

  • Your first API key is created for you. Access this key via Codat's Portal.
  • If you require multiple API keys, perform multiple calls to the Create API keys endpoint.
  • The number of API keys is limited to 10. If you have reached the maximum amount of keys, use the Delete API key endpoint to delete an unused key first.
post/apiKeys

Request body

nameName — unresolved $ref

Response

Success

idstring

Unique identifier for the API key.

namestring nullable

A meaningful name assigned to the API key.

apiKeystring

The API key value used to make authenticated http requests.

createdDatestring

In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:

2020-10-08T22:40:50Z
2021-01-01T00:00:00

When syncing data that contains DateTime fields from Codat, make sure you support the following cases when reading time information:

  • Coordinated Universal Time (UTC): 2021-11-15T06:00:00Z
  • Unqualified local time: 2021-11-15T01:00:00
  • UTC time offsets: 2021-11-15T01:00:00-05:00

Time zones

Not all dates from Codat will contain information about time zones.
Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.

Example response

{
  "id": "e288a972-b402-4b21-93f9-b5335ae5679c",
  "name": "azure-invoice-finance-processor",
  "apiKey": "ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd",
  "createdDate": "2022-10-23T00:00:00Z"
}

Changes