Note: Up-to-date API functionality is documented using Swagger here. You can use the Swagger UI to make sample requests.
You can test our API in Swagger. To do so, you'll need to connect your API key by using the following format ApiKey YOURKEY. Note there's a space after ApiKey.
Generating an API Key
In order to generate an API key, you must do the following:
- Log in to the Firstbase application as an Admin user (https://app.firstbasehq.com/).
- Navigate to the ‘Firstbase API’ tab from the Settings menu in the top navigation bar.
- Provide a name for your token (e.g., “Development” or “Production”). Tokens never expire by default. If you need to cycle tokens, you can delete old tokens in the Firstbase app UI.
- Make sure to copy the token to your clipboard and store it in your password manager!
- Include the API key in the header of your API requests using the following format: ‘Authorization: ApiKey XXXXXXXX’
Making requests
When making requests the following header values are required: Authorization and Accept.
The Authorization header value contains a value of ApiKey {{api-key}} (where the curly brackets are your key).
The Accept header values must contain application/scim+json for any endpoints that start with /scim.
Here's an example query for a user with the email of test@test.com.
curl -X 'GET' \
'https://apipub.firstbasehq.com/scim/v2/Users?filter=email.values%20eq%20%22test@test.com%22' \
-H 'accept: application/scim+json' \
-H 'Authorization: ApiKey 0000000000000000000000'
Here's an example query for all inventory details.
curl -X 'GET' \
'https://apipub.firstbasehq.com/api/inventory
-H 'accept: application/json' \
-H 'Authorization: ApiKey 0000000000000000000000'