cURL
curl --request POST \ --url https://relay.bayse.markets/v1/user/me/api-keys/{keyId}/rotate
{ "id": "3f7a1b2c-d4e5-6789-abcd-ef0123456789", "name": "Trading bot", "publicKey": "pk_live_abcdef123456", "secretKey": "sk_live_newsecret456def", "signingInstructions": { "algorithm": "HMAC-SHA256", "headers": ["X-Public-Key", "X-Timestamp", "X-Signature"], "payloadFormat": "{timestamp}.{method}.{path}.{bodyHash}", "timestampWindowSeconds": 300 } }
Generate a new secret key while keeping the same key ID
x-auth-token
x-device-id
curl -X POST \ https://relay.bayse.markets/v1/user/me/api-keys/3f7a1b2c-d4e5-6789-abcd-ef0123456789/rotate \ -H "x-auth-token: YOUR_AUTH_TOKEN" \ -H "x-device-id: YOUR_DEVICE_ID"