DevZero Logo

DevZero

Create personal access token for user

POST
/users/{user_id}/pat

Path Parameters

user_idstring

ID of user

Header Parameters

Authorizationstring

sub claim pulled from JWT

create pat for user body

expiryinteger

number of days this pat shall be valid for

Range0 <= value <= 36500
namestring

Name of Token

Length1 <= length

Response Body

curl -X POST "https://api.devzero.io/backend/v0/users/string/pat" \
  -H "Authorization: string" \
  -H "Content-Type: application/json" \
  -d '{
    "expiry": 36500,
    "name": "string"
  }'
{
  "content": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "expiry": "2019-08-24T14:15:22Z",
  "id": "string",
  "lasted_used": "2019-08-24T14:15:22Z",
  "name": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}