General Information
API Basics
- API Endpoint:
https://api.spell.im - Versioned APIs
- Usage:
https://api.spell.im/v1 - Documentation: Please switch to the corresponding API version in the top-left corner.
- Usage:
Constructing a Request
Some API calls may require a user’s API Key or signature. If you haven’t created one yet, please create an API Key first.
- Request Headers: Both
X-API-Key: <ApiToken>andX-Signature: <SIGNATURE>are required. - GET Requests: Parameters for query operations are sent in the URL as Query Parameters.
- POST Requests: Parameters for create operations are sent in the request body with the
application/jsonformat. The request header must include the signatureX-Signature: <SIGNATURE>. For more details, please refer to: API Keys.
Getting a Response
All API responses are in JSON format.
Response Status Codes
HTTP 200: SuccessHTTP 400: Bad RequestHTTP 401: UnauthorizedHTTP 403: ForbiddenHTTP 404: Not FoundHTTP 500: Internal Server Error
For successful requests, common response formats are as follows:
Single Result Data (e.g., a successful creation):
{
"code": 200,
"data": {
// Single data object
}
} Multiple Result Data (e.g., a list query):
{
"code": 200,
"items": [
{
// Single data object
},
{
// Single data object
},
...
]
}