Rotate an API key
curl --request POST \
--url https://api.unitedmarket.ai/me/api-keys/{id}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <api-key>'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.unitedmarket.ai/me/api-keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.unitedmarket.ai/me/api-keys/{id}/rotate"
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text){
"id": "<string>",
"name": "trading-bot",
"prefix": "umk_live_AbC123",
"tier": "DEFAULT",
"lastUsedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"key": "umk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
}{
"message": "<string>",
"error": "Unauthorized",
"statusCode": 401
}API Keys
Rotate an API key
Revokes the key and issues a replacement. The new plaintext secret is returned exactly once. Requires x-api-key and a SIWE bearer.
POST
https://api.unitedmarket.ai
/
me
/
api-keys
/
{id}
/
rotate
Rotate an API key
curl --request POST \
--url https://api.unitedmarket.ai/me/api-keys/{id}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <api-key>'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.unitedmarket.ai/me/api-keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.unitedmarket.ai/me/api-keys/{id}/rotate"
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text){
"id": "<string>",
"name": "trading-bot",
"prefix": "umk_live_AbC123",
"tier": "DEFAULT",
"lastUsedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"key": "umk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
}{
"message": "<string>",
"error": "Unauthorized",
"statusCode": 401
}Authorizations
Shared web key or a personal key (umk_live_…). Required on routes that are not @Public(). A missing or unknown key returns 401 Invalid API Key provided even if a SIWE bearer is also sent.
SIWE access token returned by POST /auth/verify.
Path Parameters
API key id.
Response
New API key issued. The key field appears only in this response.
Example:
"trading-bot"
Non-secret display fragment of the key.
Example:
"umk_live_AbC123"
Rate-limit tier. MM sits between PRO and INTERNAL for external market makers.
Available options:
DEFAULT, PRO, MM, INTERNAL The full plaintext secret. Returned only once, at creation or rotation.
Example:
"umk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
