Auth

Generate Token

Use this API to generate authentication JWT token for users to access Velt features. The token contains user information and permissions for specific resources.

  • JWT token expires in 48 hours
  • Can specify permissions for different resource types (organization, folder, document)

Access Control: Set accessRole to viewer (read-only) or editor (read/write) for each resource.

post/auth/generate_token

Request

  • Base URL
    https://api.velt.dev/v2
  • Auth
    API key in header x-velt-api-key and API key in header x-velt-auth-token

Request body

userIdstring required

Unique identifier for the user

Example request

{
  "userId": "user123",
  "userProperties": {
    "name": "John Doe",
    "email": "john@example.com"
  },
  "permissions": {
    "resources": [
      {
        "type": "organization",
        "id": "org_123",
        "organizationId": "org_123",
        "accessRole": "editor",
        "expiresAt": 1640995200
      }
    ]
  }
}

Response

Token generated successfully

Changes

No recorded changes to this operation across all 1 revision of this API.