Pular para o conteúdo principal
PATCH
/
api
/
v1
/
api-keys
/
{id}
/
toggle
Alternar status ativo da API key
curl --request PATCH \
  --url https://6827d740d717.ngrok-free.app/api/v1/api-keys/{id}/toggle \
  --header 'Authorization: <api-key>'
{
  "id": "ak_1694024400000_xyz123456",
  "name": "Production API Key",
  "isActive": true,
  "createdAt": "2023-09-06T20:00:00.000Z",
  "lastUsedAt": "2023-09-06T20:00:00.000Z"
}

Autorizações

Authorization
string
header
obrigatório

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

Parâmetros de caminho

id
string
obrigatório

Resposta

Status da API key alterado

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"

lastUsedAt
string<date-time>

Data de último uso

Exemplo:

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