Skip to main content
POST
/
jwt-templates
Create JWT template
curl --request POST \
  --url https://api.wacht.dev/jwt-templates \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "token_lifetime": 123,
  "allowed_clock_skew": 123,
  "template": {},
  "custom_signing_key": {
    "enabled": true,
    "key": "<string>",
    "algorithm": "<string>"
  }
}
'
{
  "id": "<string>",
  "name": "<string>",
  "token_lifetime": 123,
  "allowed_clock_skew": 123,
  "custom_signing_key": {
    "enabled": true,
    "key": "<string>",
    "algorithm": "<string>"
  },
  "template": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication (format: Bearer {api_key})

Body

application/json
name
string
required
token_lifetime
integer
required

Token lifetime in seconds

allowed_clock_skew
integer
required

Allowed clock skew in seconds

template
object
required

JWT template claims

custom_signing_key
object

Response

200 - application/json

JWT template created

id
string
name
string
token_lifetime
integer

Token lifetime in seconds

allowed_clock_skew
integer

Allowed clock skew in seconds

custom_signing_key
object
template
object
created_at
string<date-time>
updated_at
string<date-time>