
post
/v4/organizations/{organizationId}/api-keys
Create a key for the caller, or for a service account with serviceAccountId. Needs api_key.create; a service account also needs api_key.manage on it. The secret is returned once. An organization holds at most 5 active keys per creator (409). Managing the credentials of a service account lets the holder act with that service account's rights.
Path parameters
organizationIdstring (uuid)required
Request body
descriptionstringexpiresAtstring (date-time)ISO 8601, in the future
serviceAccountIdstring (uuid)The service account the key belongs to. Omit it for a personal key of the caller. Managing the credentials of a service account lets the holder act with that service account's rights.
Responses
200Response for status 200
Schema
object
idstringrequired
organizationIdstring | nullrequired
userIdstring | nullrequired
prefixstringrequired
descriptionstring | nullrequired
tiernumberrequired
issuedByUserIdstring | nullrequired
createdAtstringrequired
expiresAtstring | nullrequired
revokedAtstring | nullrequired
rawKeystring | nullrequired
Example
{
"id": "string",
"organizationId": "string",
"userId": "string",
"prefix": "string",
"description": "string",
"tier": 0,
"issuedByUserId": "string",
"createdAt": "string",
"expiresAt": "string",
"revokedAt": "string",
"rawKey": "string"
}post
https://api.merkl.xyz/v4/organizations//api-keyscurl -X POST "https://api.merkl.xyz/v4/organizations/{organizationId}/api-keys"Live request: this will call https://api.merkl.xyz/ for real.