Appearance
Authentication
All requests to the API require an API key passed in the X-API-Key header.
Getting your API key
Generate your API key in your organisation settings on the Interplai platform.
Using the API key
Include the X-API-Key header in every request:
bash
curl -H "X-API-Key: your-api-key-here" \
https://api.interplai.app/v1/collectionsjavascript
const response = await fetch('https://api.interplai.app/v1/collections', {
headers: {
'X-API-Key': 'your-api-key-here',
},
});
const data = await response.json();
console.log(data.collections);python
import requests
response = requests.get(
"https://api.interplai.app/v1/collections",
headers={"X-API-Key": "your-api-key-here"},
)
data = response.json()
print(data["collections"])Authentication errors
| Error Code | HTTP Status | Description |
|---|---|---|
MISSING_API_KEY | 401 | No X-API-Key header provided |
INVALID_API_KEY | 401 | The API key is not recognised |
FORBIDDEN | 403 | The API key is valid but the organisation is disabled |
Example error response
json
{
"error": {
"code": "MISSING_API_KEY",
"message": "API key is required. Provide it via the X-API-Key header."
}
}Security best practices
- Never expose your API key in client-side code. Always call the API from your server or broadcast system.
- Rotate keys if you suspect they have been compromised — rotate your key in your organisation settings.
- Use environment variables to store your API key rather than hardcoding it.

