ApiKeys
Get an API key
Returns the API key with the given ID, including its metadata and access. Use this endpoint to get an API key through the Samva email API.
GET
Returns the API key with the given ID, including its metadata and access.
apiKeyheader
x-api-key<token>id*stringMatch
^key_[0-9a-hjkmnp-tv-z]{16,24}$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.get({ "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
Create an API key
Creates a new API key for the organization and returns the created key, including the plaintext secret, with a 201 response.
List API key activity
Returns the sends attributed to an API key, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.