Skip to content
Documentation sections

API credentials

The API Credentials tab of the Developers page shows the API key of your workspace. Your applications, your ERP or TMS, and the Salesforce integration send this key with every request to the Safecube API. A workspace has a single key: the tab shows it, copies it and replaces it.

Who can open API Credentials

GestureMinimum rolePlan
Open Developers and the API Credentials tabAdminEvery plan
View and copy the keyAdminEvery plan
Rotate the keyAdminEvery plan

An Editor or a Viewer does not see Developers in the sidebar, and a link to /api/credentials takes them to the access denied page. Roles are described in Users and roles.

Open API Credentials

  1. Select Developers in the sidebar. When the sidebar is collapsed, its icon reads API Access.
  2. The page opens on the API Credentials tab. The Webhooks tab next to it is described in Webhooks console.

The address https://app.safecube.ai/api/credentials opens the tab directly, and any other address under /api leads to it. When the key cannot be loaded, the toast "Failed to retrieve API credentials. Please try again later." appears and the app shows an error page.

View and copy the key

The API Key card reads "This key must be kept confidential". The key is masked by default.

  1. Select the eye button, Display key, to show the key in clear. Select it again to mask it.
  2. Select Copy key to copy the key to the clipboard. The button copies the full key even while it is masked, and shows no confirmation message.

The key gives access to the data of your whole workspace. Keep it on your servers, never in a web page, a shared document or a public code repository.

Rotate the key

Rotating replaces the key with a new one. The current key is invalidated at once, with no grace period: every application, script or integration that still sends it, Salesforce included, stops working until you give it the new key. Webhooks already set up keep delivering their events.

  1. Select Rotate API key.
  2. The Warning: API Key Rotation dialog reads "This action is irreversible. Your current API key will be permanently invalidated and any application still using it will stop working immediately.".
  3. Select Rotate to confirm, or Cancel to keep the current key.

On success, the dialog closes, the toast "Your API key has been rotated successfully." appears and the card shows the new key. Copy it and update every application that used the old one.

On failure, the toast "Failed to rotate API key. Please try again later." appears and the dialog shows Server error with Retry. The current key stays valid.

Use the key

The tab does not test the key. How to send it with a request, in the API_KEY header, is described in the Authentication guide of the API documentation. The Reference documentation and Quick start guide cards of the tab open the API documentation in a new tab.

Short answers to frequent API questions, such as the rate limit or the choice between polling and webhooks, are in the API and integration FAQ.

Limits

  • A workspace has one key: the tab does not create a second key, name a key or show its creation date.
  • The tab keeps no history of the previous keys, and a rotated key cannot be restored.
  • Rotating does not update the key in your applications or in Salesforce: paste the new key there yourself.