Using the Task Badger API
Authentication
API requests must be authenticated using a Project API Key provided in the
Authorization header as a Bearer token.
You can find your API key on the project settings page in the Task Badger dashboard. A default API key is created automatically when you create a new organization.
The API key encodes your organization and project, so you don't need to configure them separately.
Organization and Project
API endpoints include both the organization and project slug. When using
a Project API Key with the Python SDK or CLI, these are detected automatically
from the key.
If you need to find them manually:
- Organization slug — available on the 'My Organization' page
- Project slug — listed on the 'Projects' page
Request bodies
The payload of HTTP POST requests must be specified as JSON.
The Content-type HTTP header must be set to application/json
Without this header the data won't be interpreted as JSON.
For example:
Request methods
Task Badger uses standard REST methods:
| Method | Function |
|---|---|
| GET | Retrieve an object or list of objects |
| POST | Create an object |
| PUT | Update an object (complete data required) |
| PATCH | Update an object (partial data required) |
| DELETE | Delete or mark object as deleted or cancelled |
Pagination
List requests use cursor pagination. Each request will include a next and previous field. These may be null
indicating that is no next or previous page but will otherwise contain the full URL of the page.
The cursors can be used to navigate forwards or backwards through the data. For example:
This will respond with tasks in pages of size 2:
{
"previous": null,
"next": "https://taskbadger.net/api/{organization}/{project}/tasks/?cursor=XXX&page_size=2",
"results": [{...}, {...}]
}
To access the next page of data make a request to the URL provided in the next field:
The response will now include both next and previous page URLs.
{
"previous": "https://taskbadger.net/api/{organization}/{project}/tasks/?cursor=YYY&page_size=2",
"next": "https://taskbadger.net/api/{organization}/{project}/tasks/?cursor=ZZZ&page_size=2",
"results": [{...}, {...}]
}
Tip
The page_size parameter can be changed at any point to adjust the page size of the request.
Rate Limiting
Rate limits are applied to API requests based on the Organization subscription plan. Requests that have been rate limited will respond as follows:
OpenAPI Specification
The Task Badger API includes an endpoint for downloading the OpenAPI 2.0 specification which describes the requests and responses.
Download the spec from taskbadger.net