Developers
APIs that can be used to work with State programmatically
APIs that can be used to work with State programmatically
The State API follows REST principles and is available over HTTPS only.
To protect data privacy, unencrypted HTTP is not supported.
All endpoints share the following base URL:
Only certain API endpoints are publicly accessible; most require authentication using an API key.
Include your API key in the request header as follows:
Here is a basic example:
You can create API keys in your Team profile. Login and navigate Team => API Keys
If the request is successful, you will receive the requested data in JSON format.
For DELETE requests, the response is usually:
{ "message": "OK" }
When the response contains a single object (e.g., link, tag, folder, etc.), you will get the object itself:
{ "id": 42, "name": "Important", "enabled": true }
When a request supports pagination, the response includes a list of items along with total, offset, and limit:
{
"items": [
{ "id": 42, "name": "Primary", "color": "blue" },
{ "id": 7, "name": "Secondary", "color": "yellow" }
],
"total": 2,
"offset": 0,
"limit": 10
}
If the request fails, you will receive an error containing a message and a status code.
The response status codes follow the standard HTTP specification.
| Code | Message |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 409 | Conflict |
| 412 | Precondition Failed |
| 417 | Expectation Failed |
| 429 | Too Many Requests |
| 500 | Internal Server Error |