Skip to content
Last updated

Working with Interu APIs

Authenticate with API Key

An API Key is a unique identifier that allows users or applications to authenticate requests when interacting with a REST API. It is typically provided by the API provider and must be included in each request to verify the caller’s identity and permissions.

Creating a Key

To find out how to create an API Key read the Get API Key tutorial.

Using an API Key

Interu APIs required the API Key to be sent within a request header. The header key is "x-api-key".

GET /path HTTP/1.1
Host: api.example.com
x-api-key: YOUR_API_KEY

Expected content type for API requests

Apart from when uploading a file, all Interu API Requests where you are adding or updating a record expect JSON content type.

This is represented using the Content-Type in the request header.

POST /path HTTP/1.1
Host: api.example.com
x-api-key: YOUR_API_KEY
Content-Type: application/json

{
  "message": "Hello, world!"
}

Please ensure that your API requests are formatted correctly using the appropriate content type to ensure successful communication with the Interu APIs. Using the wrong content type may result in unexpected behavior or errors.