Pular para o conteúdo principal
POST
/
api
/
v1
/
api-keys
Criar nova API key
curl --request POST \
  --url https://6827d740d717.ngrok-free.app/api/v1/api-keys \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Production API Key"
}
'
{
  "id": "ak_1694024400000_xyz123456",
  "name": "Production API Key",
  "isActive": true,
  "createdAt": "2023-09-06T20:00:00.000Z",
  "key": "zapback_1694024400000_abc123def456ghi789",
  "lastUsedAt": "2023-09-06T20:00:00.000Z"
}

Autorizações

Authorization
string
header
obrigatório

API Key de autenticação - usar ApiKey {sua-api-key}

Corpo

application/json
name
string
obrigatório

Nome da API Key

Required string length: 3 - 50
Exemplo:

"Production API Key"

Resposta

API key criada com sucesso

id
string
obrigatório

ID da API Key

Exemplo:

"ak_1694024400000_xyz123456"

name
string
obrigatório

Nome da API Key

Exemplo:

"Production API Key"

isActive
boolean
obrigatório

Status ativo da API Key

Exemplo:

true

createdAt
string<date-time>
obrigatório

Data de criação

Exemplo:

"2023-09-06T20:00:00.000Z"

key
string

Chave da API (apenas retornada na criação)

Exemplo:

"zapback_1694024400000_abc123def456ghi789"

lastUsedAt
string<date-time>

Data de último uso

Exemplo:

"2023-09-06T20:00:00.000Z"