SendLit logoSendLit Docs
API ReferenceTeamsTeamidKeys

Create a new API key for a team

The response's `key` field is the full secret and is only ever returned once — store it securely. Subsequent listings only expose the key's prefix.

POST
/teams/{teamId}/keys

The response's key field is the full secret and is only ever returned once — store it securely. Subsequent listings only expose the key's prefix.

x-sendlit-apikey<token>

In: header

Path Parameters

teamId*string

Request Body

application/json

Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.sendlit.dev/teams/string/keys" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "keyId": "string",
  "keyPrefix": "string",
  "name": "string",
  "expiresAt": "string",
  "lastUsedAt": "string",
  "revokedAt": "string",
  "createdAt": "string",
  "key": "string"
}
{
  "error": "string"
}