Create Api Key
POST
/api/v1/api-keys
const url = 'https://api.qeychain.xyz/api/v1/api-keys';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","permissions":["example"],"rate_limit_rpm":1,"rate_limit_rpd":1,"allowed_addresses":["example"],"expires_at":"2026-04-15T12:00:00Z","plan":"example","monthly_call_limit":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.qeychain.xyz/api/v1/api-keys \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "permissions": [ "example" ], "rate_limit_rpm": 1, "rate_limit_rpd": 1, "allowed_addresses": [ "example" ], "expires_at": "2026-04-15T12:00:00Z", "plan": "example", "monthly_call_limit": 1 }'Create a new API key.
IMPORTANT: The full API key is returned only once in this response. Store it securely - it cannot be retrieved again.
Available permissions:
- read:holdings, read:transactions, read:lots, read:tax-reports
- write:portfolios, write:webhooks
- admin:api-keys, admin:users
Requires: admin:api-keys permission
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CreateAPIKeyRequest
Request to create a new API key.
object
name
required
Name
API key name
string
permissions
Permissions
Permission strings
Array<string>
allowed_addresses
Any of:
Array<string>
null
Examplegenerated
{ "name": "example", "description": "example", "permissions": [ "example" ], "rate_limit_rpm": 1, "rate_limit_rpd": 1, "allowed_addresses": [ "example" ], "expires_at": "2026-04-15T12:00:00Z", "plan": "example", "monthly_call_limit": 1}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Response Create Api Key Api V1 Api Keys Post
object
key
additional properties
any
Examplegenerated
{}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}