Users

Users are created automatically from usage. Use this endpoint to set budgets or update profile fields after creation.

patch/api/users/{customer_identifier}/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/users/{customer_identifier}/
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

customer_identifierstring required

Your unique identifier for this user.

Query parameters

environment'prod' | 'test'

Optional environment filter. If omitted, the backend uses the environment implied by your auth context when applicable.

Request body

emailstring nullable

User email address.

namestring nullable

User display name.

metadataobject

Custom key-value metadata.

period_budgetnumber nullable

Spending budget per period in USD.

budget_duration'daily' | 'weekly' | 'monthly'

Budget renewal period.

total_budgetnumber nullable

Total lifetime spending budget in USD.

period_startstring date-time

Optional custom budget period start.

period_endstring date-time nullable

Optional custom budget period end.

markup_percentagenumber

Markup percentage applied to usage reports for this user.

Example request

{
  "email": "alice@example.com",
  "name": "Alice",
  "metadata": {
    "plan": "pro",
    "team": "engineering"
  },
  "period_budget": 100,
  "budget_duration": "monthly",
  "total_budget": 1000,
  "period_start": "2025-12-01T00:00:00Z",
  "period_end": "2025-12-31T23:59:59Z",
  "markup_percentage": 20
}

Response

Updated user details.

idstring

User identifier.

namestring nullable

User display name.

emailstring nullable

User email address.

customer_identifierstring

Your unique identifier for the user.

environment'prod' | 'test'

User environment.

total_budgetnumber nullable

Lifetime spending budget in USD.

period_budgetnumber nullable

Current period budget in USD.

organization_namestring nullable

Owning organization name.

total_period_usagenumber

Usage in the current budget period in USD.

period_startstring date-time

Start of the current budget period.

period_endstring date-time nullable

End of the current budget period.

budget_duration'daily' | 'weekly' | 'monthly'

Budget renewal period.

updated_atstring date-time

Last update timestamp.

Changes

    • breaking

      request body became required

    • breaking

      the request property type changed from number null to number, and format from double to no format

    • breaking

      the request property type changed from number null to number, and format from double to no format

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response's property type changed from number null to number, and format from double to no format for status

    • breaking

      the response's property type changed from number null to number, and format from double to no format for status

    • breaking

      the response's property format changed from double to no format for status

    • info

      api operation id users_updateUser removed and replaced with updateUser

    • info

      the endpoint scheme security DashboardJwt was added to the API

    • info

      api tag Users added

    • info

      api tag users removed

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property format was generalized from double to no format

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status