Skip to main content
POST
/
v1
/
roles
curl -X POST https://api.truthlocks.com/v1/roles \
  -H "X-API-Key: tlk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "attestation_minter",
    "description": "Can mint and view attestations for specific issuers"
  }'
{
  "id": "880e8400-e29b-41d4-a716-446655440000",
  "tenant_id": "440e8400-e29b-41d4-a716-446655440000",
  "name": "attestation_minter",
  "description": "Can mint and view attestations for specific issuers",
  "is_system": false,
  "created_at": "2026-04-14T10:00:00Z",
  "updated_at": "2026-04-14T10:00:00Z"
}
Creates a new custom role within your tenant. Custom roles let you define access permissions tailored to your team structure. After creating a role, assign it to users with the assign role endpoint. See RBAC & permissions for the full list of available permissions and guidance on role design.

Parameters

name
string
required
A descriptive name for the role (for example, "attestation_minter" or "compliance_officer").
description
string
A brief explanation of what the role is for.

Responses

{
  "id": "880e8400-e29b-41d4-a716-446655440000",
  "tenant_id": "440e8400-e29b-41d4-a716-446655440000",
  "name": "attestation_minter",
  "description": "Can mint and view attestations for specific issuers",
  "is_system": false,
  "created_at": "2026-04-14T10:00:00Z",
  "updated_at": "2026-04-14T10:00:00Z"
}
curl -X POST https://api.truthlocks.com/v1/roles \
  -H "X-API-Key: tlk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "attestation_minter",
    "description": "Can mint and view attestations for specific issuers"
  }'