Skip to navigation

Update a user

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

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Path parameters

customer_identifierstringRequired
Your unique identifier for this user.

Query parameters

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

Request

This endpoint expects an object.
emailstring or nullOptional
User email address.
namestring or nullOptional
User display name.
metadataobjectOptional

Custom key-value metadata.

period_budgetdouble or nullOptional
Spending budget per period in USD.
budget_durationenumOptional
Budget renewal period.
Allowed values:
total_budgetdouble or nullOptional
Total lifetime spending budget in USD.
period_startdatetimeOptional
Optional custom budget period start.
period_enddatetime or nullOptional
Optional custom budget period end.
markup_percentagedoubleOptional
Markup percentage applied to usage reports for this user.

Response

Updated user details.
idstringOptional
User identifier.
namestring or nullOptional
User display name.
emailstring or nullOptional
User email address.
customer_identifierstringOptional
Your unique identifier for the user.
environmentenumOptional
User environment.
Allowed values:
total_budgetdouble or nullOptional
Lifetime spending budget in USD.
period_budgetdouble or nullOptional
Current period budget in USD.
organization_namestring or nullOptional
Owning organization name.
total_period_usagedoubleOptional
Usage in the current budget period in USD.
period_startdatetimeOptional
Start of the current budget period.
period_enddatetime or nullOptional
End of the current budget period.
budget_durationenumOptional
Budget renewal period.
Allowed values:
updated_atdatetimeOptional
Last update timestamp.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error