App user provisioning

Create Authorization

Generate a Bearer token for a user. Use this to authenticate users for API access. Requires your app secret key in the secret-key header. Provide: external_user_id (your unique user identifier) and email. Returns a JWT token valid for 1 year. If the user was previously cancelled, this reactivates them.

post/v2/auth/tokens

Request

  • Base URL: https://api.village.ai
  • URL: https://api.village.ai/v2/auth/tokens
  • Auth: API key in header secret-key

Request body

external_user_idstring required

Unique identifier for the user in your system

emailstring email required

Email address of the user

grant'full' | 'public'

Token grant level. 'full' enables sync, paths, and all platform features (billed per user). 'public' enables API-only access like search and enrich (no sync, no user creation).

Example request

{
  "external_user_id": "user_123",
  "email": "user@example.com",
  "grant": "full"
}

Response

Token created successfully

Example response

{
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "expires_in": 31536000,
    "expires_at": 1764739200,
    "token_type": "Bearer"
  }
}

Changes

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