ComRaidComRaid Docs

API keys

Create and revoke the secret keys your servers use to call ComRaid.

Your server calls the ComRaid API with a secret API key, which starts with cr_sk_. Each key belongs to one Project, so requests made with it automatically act on that Project. You don't pass a project ID.

Only Admins can see and manage API keys.

Keep secret keys on your server

A secret key can send Notifications and change Contacts. Store it in your server's secrets manager or environment variables. Never put it in a mobile app, a website, or a public repository. Your mobile app uses the public Mobile App ID (cr_app_…) instead. See Set up push.

Create a key

  1. Open API Keys in the sidebar and click Create key.
  2. Enter a Name that says where the key is used, for example "Production backend", and click Create.
  3. Copy the key straight away. It's only shown once. If you lose it, create a new key.
  4. Save it as a secret on your server, for example as COMRAID_API_KEY.

Use a separate key for each server or environment. That way you can revoke one without breaking the others.

Check your keys

The list shows each key's Name, Prefix (the first characters, so you can tell keys apart), Last used, Created, Expires, and State. A key that's never been used, or not used for a long time, is a good candidate to revoke.

Revoke a key

Click Revoke on the key and confirm. The key stops working immediately, and any server still using it gets authentication errors.

To replace a key without downtime:

  1. Create a new key.
  2. Deploy your server with the new key.
  3. Check that Last used has stopped updating on the old key.
  4. Revoke the old key.

From the API

Send the key as a Bearer token on every request: Authorization: Bearer cr_sk_…. Full details and examples: Authentication.

On this page