Using the API
Requests and Responses
Requests
Encryption
All requests must be sent using HTTPS with TLS 1.2 or higher. Please make sure your developer tools support this version of TLS as older versions or SSL are not supported for security reasons.
Headers
All BSPK API calls must include the following headers to authenticate the request:
key | value |
---|---|
Authorization | Bearer API_KEY |
Responses
Responses use the customary HTTP status codes, with the most typical ones being:
Code | Meaning |
---|---|
Successful Responses | |
200 | OK |
201 | OK |
204 | No content returned |
Error Responses | |
400 | Bad Request |
401 | Unauthorized |
429 | Too Many Requests |
500 | Internal Server Error |
Headers
All BSPK API calls must respond with the following headers:
key | eg. value | description |
---|---|---|
X-RateLimit-Limit | 30 | Request limit per time window (10 seconds) |
X-RateLimit-Remaining | 1 | The number of requests left for the 10 seconds window |
X-Total-Count | 123 | Total number of records found |
Link | <https://api.bspk.com/api/extraction/v1/emails.json?page=2>; rel=‘next’, <https://api.bspk.com/api/extraction/v1/emails.json?page=18>; rel=‘last’ | Links for the last and next pages |
If an endpoint doesn’t support pagination (eg.: https://api.bspk.com/api/extraction/v1/ideabook_actions
) the pagination related headers will be omitted.