POST
/
jwt-templates
Create JWT Template
curl --request POST \
  --url https://api.wacht.dev/jwt-templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "claims": {},
  "ttl": 15768030,
  "is_default": true
}'
{
  "id": "<string>",
  "name": "Default JWT Template",
  "description": "<string>",
  "claims": {
    "sub": "{{user.id}}",
    "email": "{{user.email}}",
    "org_id": "{{user.organization_id}}"
  },
  "ttl": 3600,
  "is_default": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication using the Authorization header

Body

application/json

Response

JWT template created successfully

The response is of type object.