Authorization header.
Request format
Getting an API key
API keys are issued through the console dashboard at console.courtrules.app. Sign in with your organization account to view and manage your keys. Keys follow the formatcrm_<env>_<random> (e.g. crm_prod_...).
Example request
Error responses
401: Missing or malformed header
Returned when theAuthorization header is missing or doesn’t use the Bearer scheme.
403: Invalid key
Returned when the key is present and well-formed but not recognized.MCP authentication
The MCP server athttps://mcp.courtrules.app/mcp requires a credential on every request. There are two ways to get one, and neither makes you sign in again later.
Sign in
Add the server URL to your client and sign in when it asks. Per-client steps are in the MCP: Court Rules quick start. How it works: a request without a credential gets401 with a WWW-Authenticate header that points to https://mcp.courtrules.app/.well-known/oauth-protected-resource. Clients that support MCP sign-in (OAuth 2.1) read that, register themselves, and open the consent page. The access token they receive lasts one hour, and the client trades its refresh token for a new one in the background, so you are not asked again.
API key
Your API key is on the dashboard at console.courtrules.app. It is the same key the REST API takes. Claude Code:Errors
Every rejected request returns401 with a WWW-Authenticate header.
Common mistakes
- Copying an access token into a static header. Nothing refreshes it, so it stops working after an hour. Static headers should hold the API key.
- Setting a header and expecting sign-in. Claude Code skips sign-in for any server with an
Authorizationheader configured. Use one method per server entry.
Getting access
Sign in at console.courtrules.app with Google or email. Contact api@courtrules.app if your organization needs access provisioned.Security notes
- API keys are sensitive credentials. Do not commit them to version control or expose them in client-side code.
- Use environment variables to store keys in your application: