ApiKeys
Update an API key
Updates an API key's settings and returns the updated key. A field left out keeps its value.
PATCH
Updates an API key's settings and returns the updated key. A field left out keeps its value.
apiKeyheader
x-api-key<token>id*stringMatch
^key_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
name?|nulldescription?string|nullmailboxes?|Changes the mailbox send mode of a key that holds mailbox access. Only a person can change it; the change applies to the key's next request.
ApiKey
application/json- response
id*stringname*stringkey?string|nullstart*string|nullend*string|nulldescription?string|nullcreatedAt*stringexpiresAt*string|nulllastUsedAt*string|nullisActive*booleanaccess*|owner*|nullimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.apiKeys.update({ "id": "example"});Example Response
{ "id": "string", "name": "string", "key": "string", "start": "string", "end": "string", "description": "string", "createdAt": "string", "expiresAt": "string", "lastUsedAt": "string", "isActive": true, "access": { "mode": "full" }, "owner": { "id": "string", "name": "string", "email": "string" }}Related documentation
Rotate an API key
Issues a replacement with the same owner, name, and access, then deactivates the existing key. Returns the new key, including the plaintext secret.
Assign a personal mailbox
Assigns a personal address to an existing member. Only organization owners and admins may assign it; the member receives the sole user grant.