The Compliance API is available for Enterprise workspaces only.
Credentials
Sign an authentication token
A signed authentication token is a JSON Web Token (JWT) that identifies you as the security partner. You sign each token with your signing key, which is the private key of the key pair you generated when you registered with Base44. Send it in theAuthorization header as a bearer token. Base44 verifies the signature with the public key you registered.
To sign an authentication token:
- Create a token with the claims in the following table.
- Use a JWT library to generate the token from the claims and your signing key. The result is the signed authentication token. Send it in the
Authorizationheader as a bearer token when you call a method.
Sign a fresh token for every request, including every retry.
RS256 instead. If you registered more than 1 key, also set kid in the token header to your key ID.
Workspace ID
The workspace ID identifies the workspace that a request reads. Use the workspace ID in the request path when you call a method. A workspace owner or admin finds it in the workspace settings and shares it with you. To get the workspace ID:- Go to app.base44.com.
- Click the workspace name at the bottom left of the screen.
- Click Settings.
- Copy the workspace ID from the Settings URL, which has the form
https://app.base44.com/workspace/<workspace_id>/settings.
Workspace API key
A workspace owner or admin creates the key, chooses its scopes, and shares it with you, the security partner. The workspace API key authorizes access to exactly 1 workspace. Send the workspace API key in theapi_key header when you call a method. Learn more about Managing workspace secrets. For the steps from the workspace owner or admin’s side, see Connecting a security partner with the Compliance API.
To create a workspace API key:
- Go to app.base44.com.
- Click the workspace name at the bottom left and click Settings.
- Click Secrets in the sidebar.
- Click + Create API Key.
- Enter a name for the key and an optional description.
- Under Permissions, select the permissions the key should have. Each permission grants a scope.
- Click Create Key.
- Copy the key and store it somewhere safe.
- Click Done.
Scopes
A scope specifies the data that a workspace API key can read. The workspace owner or admin chooses the scopes when they create the key. In Base44, each scope appears as a permission. The following table lists the permission that grants each scope:
Learn more about choosing permissions.
The following table lists the methods that each scope grants access to:
Some methods require multiple scopes. For example, List workspace members requires both the
compliance:inventory:read and compliance:members:read scopes.403 permission_error that names the scope the method needs. For all error codes, see Error codes.