Create a new 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"
}
JWT Bearer token authentication using the Authorization header
JWT template created successfully
The response is of type object
.
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"
}