Format requests to the Casebook API
The Casebook API allows you to create, read, update, and delete data in Casebook. It supports many of the same operations available to end users in the Casebook platform.
This developer guide introduces common examples to help you get started with the Casebook API.
For more help with the Casebook API, get in touch with the Casebook Support team.
Instructions
Requests to the Casebook API support standard JSON:API modifiers for formatting, filtering, sorting, and pagination.
Set authorization and content-type headers
Each request must include the following headers:
-
Authorization: Bearer {access_token}
-
How do I obtain a Bearer access token?
Casebook uses OAuth 2.0 for authentication. You’ll generate credentials when registering an incoming application in Casebook Admin, then exchange those credentials for a Bearer token.
Learn more about requesting an access token
-
-
Content-Type: application/vnd.api+json
Route your request
Start with the base URL
All GET, POST, PATCH, and DELETE requests to the Casebook API start with the same base URL
-
From Canada, use https://api.casebookca.net
-
From the US, use https://api.casebook.net
Add the Service
Next, add the Casebook service you’re reaching out to after the base URL in your requst.
Here are a few common examples:
-
Providers:
/providers/… -
Services:
/services/… -
Intake:
/intake/… -
People:
/people/… -
Cases:
/cases/… -
Attachments and Notes:
/attachments/…
Add the Operation and Endpoint
A successful request must always specify the operation (GET, POST, PATCH, or DELETE) and the endpoint you’re looking to reach within the relevant service.
Here are a few common examples:
-
Intake - Create a Report: POST
/intake/reports -
People - Update a Person: PATCH
/people/people/ -
Providers - Get all Providers: GET
/providers/providers -
Attachments - Delete a Note: DELETE
/attachments/notes/
Include Query parameters in GET requests to modify results
GET requests often require filters to narrow down the records you want to retrieve. Query parameters let you specify these filters directly in the endpoint URL. Use ? before the first modifier, and & before any additional modifiers to chain multiple conditions.
Here are a few common examples:
Examples
Get all active Services offered by a specific Provider
GET https://api.casebookca.net/services/service_offerings?filter[provider_id]=ab47a706-59b0-44b5-bc9b-6986ce8c7668&filter[archived]=false
-
Base URL: either https://api.casebookca.net (Canada) or https://api.casebook.net (US)
-
FYI - this example uses the base URL for requests from Canada
-
-
Casebook service: /services
-
Operation: GET
-
Endpoint: /service_offerings
-
Query parameters:
-
?filter[provider_id]=ab47a706-59b0-44b5-bc9b-6986ce8c7668&filter[archived]=false
-
Reminder - the first parameter is prefixed by ? and all additional parameters are prefixed by &
-
-
&filter[archived]=false
-
Run in Postman
Get all Notes created between two dates
GET https://api.casebook.net/attachments/notes?filter[created_at][ge]=2025-01-01T00:00:00Z&filter[created_at][le]=2025-06-30T23:59:59Z
-
What are [ge] and [le] used for?
The [ge] (“greater than or equal to”) and [le] (“less than or equal to”) operators can be placed before = to filter results to a date range
People - Get all People with a specific name
GET https://api.casebook.net/people/people?filter[last_name][like]=Doe
-
What is [like] used for?
The [like] operator can be placed before = for case-insensitive wildcard filtering. This can be useful for partial matches
Run in Postman
Creating data in Casebook
To create new data in Casebook, use a POST request to a relevant endpoint with the data to be created in the request body
-
fields vs relationships
More information about creating resources
Getting data from Casebook
To get existing data from Casebook, use a GET request to a relevant endpoint with required sort, filter, pagination, and fields specified.
Sorting results
To sort in ascending order, use sort={field_name}
-
Example: /people/people?sort=full_name
To sort in descending order, use sort=-{field_name}
-
Example: /people/people?sort=-created_at
Filtering results
To filter results with a case-sensitive exact match on a field, use filter[{field_name}]={value}
-
Example: /people/people?filter[full_name]=Jane%20Doe
-
In this example, only People whose full_name is exactly "Jane Doe" will be returned.
-
What is %20 used for?
%20 is the URL equivalent of a space character. Web addresses can’t contain actual spaces, so they get “URL-encoded” into %20.
Here are a few common ways to URL-encode a query string:
-
JavaScript: encodeURIComponent("Jane Doe") → Jane%20Doe
-
Python: urllib.parse.quote("Jane Doe") → Jane%20Doe
-
cURL: wrap the string in quotes and cURL will handle it for you.
-
To filter results with a case-insensitive wildcard match on a field, use filter[{field_name}][LIKE]={value}
-
Example: /people/people?filter[full_name][like]=Ali
-
In this example, all People with names including "ali", like "Ali", "Alice", "Alina", "Malik", etc. will be returned.
To filter results using fields from a related entity, use filter[{relationship_name}.{relationship_field_name}]={value}
-
Example: /cases/cases?filter[case_assignees.user_id]=cb28b69d-358b-4f65-86af-68efa255b1d7
More information about filtering
Paginating results
To specify the number of results per page, use page[size]={number} with a recommended maximum of 100 results per page. Although page[size] is optional, setting it ensures consistent and predictable results. If it is not specified, the API will return a default page size, which may vary by endpoint.
-
Example: /people/people?page[size]=25
To specify which page of results to return, use page[number]={number}. If page[number] is not specified, it will default to 1.
-
Example: /people/people?page[number]=1
More information on paginating
Including only specific fields in your response
To include only specific fields in the response, use fields[{resource_type}]={comma_separated_list_of_fields} (e.g., /people?fields[people]=full_name,email)
More information on sparse fieldsets
Updating data in Casebook
To update data in Casebook, send a PATCH request with the fields to be updated in the request body (e.g., updating a person's name).
talk about relationships
More information about updating resources
Deleting data from Casebook
To delete a specific resource, send a DELETE request to the resource's endpoint (e.g., /people/{id})