Skip to main content
PATCH
/
tokens
/
{tokenId}
/
reactivate
Reativar Token
curl --request PATCH \
  --url https://api.example.com/tokens/{tokenId}/reactivate \
  --header 'Authorization: <authorization>'
{
  "tokenId": "019525fd-f5cc-7dc1-c9e5-1f3a5b7d9e1b",
  "name": "Response Token",
  "description": "LLM response token",
  "type": "RESPONSE",
  "value": "0.01",
  "currency": "USD",
  "status": "ACTIVE",
  "createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "updatedAt": "2026-03-25T14:30:00.000Z"
}
Requer permissao token:reactivate.

Headers

Authorization
string
required
Bearer token.

Parametros de Path

tokenId
string
required
UUID do token.

Resposta

tokenId
string
UUID do token.
name
string
Nome do token.
description
string
Descricao do token.
type
string
Token type.
value
string
Decimal value per unit.
currency
string
Codigo da moeda.
status
string
Status do token.
createdBy
string
Identificador do criador.
createdAt
string
Timestamp de criacao.
updatedBy
string
Identificador do ultimo atualizador.
updatedAt
string
Timestamp da ultima atualizacao.
{
  "tokenId": "019525fd-f5cc-7dc1-c9e5-1f3a5b7d9e1b",
  "name": "Response Token",
  "description": "LLM response token",
  "type": "RESPONSE",
  "value": "0.01",
  "currency": "USD",
  "status": "ACTIVE",
  "createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "updatedAt": "2026-03-25T14:30:00.000Z"
}

Exemplos de Codigo

curl -X PATCH https://api.awsales.io/admin/tokens/019525fd-f5cc-7dc1-c9e5-1f3a5b7d9e1b/reactivate \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Codigos de Erro

StatusCodigoDescricao
400validation_errorEntrada invalida ou campos obrigatorios ausentes
401unauthorizedAutenticacao ausente ou invalida
403forbiddenPermissoes insuficientes
404token.not_foundToken nao encontrado
422token.cannot_reactivateToken nao pode ser reativado em seu estado atual
500internal_server_errorOcorreu um erro inesperado