Skip to main content
POST
/
tokens
Create Token
curl --request POST \
  --url http://localhost:8080/tokens \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "id": 123,
  "name": "<string>",
  "prefix": "<string>",
  "is_active": true,
  "created_at": "2023-11-07T05:31:56Z",
  "token": "<string>",
  "description": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "last_used_at": "2023-11-07T05:31:56Z",
  "last_used_ip": "<string>",
  "created_by": "<string>"
}

Body

application/json
name
string
required
description
string | null
expires_at
string<date-time> | null

Response

Successful Response

id
integer
required
name
string
required
prefix
string
required

Первые символы токена для идентификации

is_active
boolean
required
created_at
string<date-time>
required
token
string
required

Полное значение токена (возвращается один раз)

description
string | null
updated_at
string<date-time> | null
expires_at
string<date-time> | null
last_used_at
string<date-time> | null
last_used_ip
string | null
created_by
string | null