Skip to main content
Every request to the Compliance API requires the following credentials: Together they show which workspace you may read and who is calling. To connect, you register once with Base44, get credentials from a workspace owner or admin, and sign an authentication token for each request.
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 the Authorization header as a bearer token. Base44 verifies the signature with the public key you registered. To sign an authentication token:
  1. Create a token with the claims in the following table.
A claim is a field in the token. Include the following claims.
  1. 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 Authorization header as a bearer token when you call a method.
Sign a fresh token for every request, including every retry.
The following examples create the same token in each language, using a JWT library and an ES256 key. For an RSA key, sign with 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:
  1. Go to app.base44.com.
  2. Click the workspace name at the bottom left of the screen.
  3. Click Settings.
  4. 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 the api_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:
  1. Go to app.base44.com.
  2. Click the workspace name at the bottom left and click Settings.
  3. Click Secrets in the sidebar.
  4. Click + Create API Key.
  5. Enter a name for the key and an optional description.
  6. Under Permissions, select the permissions the key should have. Each permission grants a scope.
  7. Click Create Key.
  8. Copy the key and store it somewhere safe.
  9. 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.
If a key lacks a scope, the matching methods return a 403 permission_error that names the scope the method needs. For all error codes, see Error codes.

Send a request

Send the workspace API key and your signed authentication token with every request. This example calls the Get Workspace Configuration Method:
If the request fails, see Error codes.