Skip to main content

Using the API

Our API is currently in Beta. You’re free to use the API, but be aware that we might make breaking changes at any point during this phase.
With the infinity.swiss API, you can perform actions within an Infinity organisation programmatically. The following modules are suppported through the API:

Authentication

To make requests to the Infinity API, an API key is required. API keys are bound to an organisation and can be created from Infinity settings. To authenticate a request, provide the API key in the Authorization header of your HTTP request:
Authorization: Bearer <API-KEY-GOES-HERE>

Error handling

When something goes wrong, endpoints of the Infinity API will return a non-OK status code along with a JSON response containing an error code. We recommend that you use the error code to discern the specific cause of the error, as some types of errors use the same HTTP status error code. Some error codes may occur for all endpoints, such as general/unauthorised, general/missing-fields, or general/server-error. Other, endpoint-specific error codes can be found in the individual endpoint documentation (see section “Response“ and select an HTTP error response code from the dropdown to see the errors).