Moving from v1 Keys
v1 keys were ECDSA key pairs: your server signed every request (Authorization: Signature keyId:sig:ts), or exchanged a signature for a short-lived JWT at /v1/api-keys/tokens. v2 keys replace both with a single bearer token, plus scopes and IP restrictions.
What has changed
- You can’t create v1 keys any more. The Legacy signing keys tab in the portal only lists and revokes existing ones.
- Existing v1 keys keep working until their sunset date. Responses to v1-signed requests carry a
Deprecation: trueheader as a reminder. - The signature helper is gone.
POST /v1/api-keys/:apiKeyId/signature, where Relm signed a request for you from a private key in the body, now answers410. GET /v1/api-keys/tokensno longer returns a refresh token, only{ token }. If you refreshed withrefreshToken, call/tokensagain instead, or better, move to v2.- Webhook signatures are unchanged. Keep verifying deliveries with the key from
GET /v1/api-keys/webhook/public-key. - POS location credentials (store code and PIN) are unchanged.
v1 → v2 at a glance
| v1 | v2 |
|---|---|
| ECDSA key pair (Key ID, public key, private key) | One secret token rlm_sk_… |
Authorization: Signature keyId:sig:ts on every request | Authorization: Bearer rlm_sk_… |
GET /v1/api-keys/tokens to get an access + refresh JWT | Not needed on servers. The payroll widget uses payroll sessions |
| Full power of the user who created it | Limited by scopes |
| Usable from any IP | Optional allowed IPs |
| Belongs to one user | Belongs to the business, acts as its creator, handed over by rolling |
| Revoke only | Edit, roll (with a grace period) and revoke |
Migrate an integration
- Create a v2 secret key with the scopes your integration uses and your server IPs. See Create an API key.
- Remove the signing code (canonical string, ECDSA signing, timestamps) and any
/v1/api-keys/tokenscalls. SendAuthorization: Bearer rlm_sk_…instead. - Move browser code to sessions. If a page called the API with a token from
/v1/api-keys/tokens, have your server call the API, or start a payroll session for the payroll widget. Never send the secret key to the page. - Deploy, then check the v1 key’s
lastUsedAtwithGET /v1/api-keys(from a logged-in session, not a key) until it stops moving. - Revoke the v1 key.
Example
Before (v1):
curl "https://sandbox.api.relm.co/v1/accounts" \
-H "Authorization: Signature <keyId>:<base64_signature>:<timestamp>"
After (v2):
curl "https://sandbox.api.relm.co/v1/accounts" \
-H "Authorization: Bearer rlm_sk_test_..."