4e064cf81dae

latestOpenAPI 3.1.02026-08-131831,331960.0 KB
users

Update a customer

Update customer profile and budget settings. Customers are created automatically from usage; use this endpoint to configure budgets or update profile fields after creation.

patch/api/users/{customer_identifier}/

Path parameters

customer_identifierstring required

Your unique identifier for this customer.

Query parameters

environment'prod' | 'test'

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

Headers

Authorizationstring required

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.

Request body

emailstring nullable

Customer email address.

namestring nullable

Customer display name.

metadataApiUsersCustomerIdentifierPatchRequestBodyContentApplicationJsonSchemaMetadata

Custom key-value metadata.

period_budgetnumber double nullable

Spending budget per period in USD.

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

Budget renewal period.

total_budgetnumber double 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 double

Markup percentage applied to usage reports for this customer.

Response

Updated customer details.

idstring

Customer identifier used by the detail serializer.

namestring nullable

Customer display name.

emailstring nullable

Customer email address.

customer_identifierstring

Your unique identifier for the customer.

environment'prod' | 'test'

Customer environment.

total_budgetnumber double nullable

Lifetime spending budget in USD.

period_budgetnumber double nullable

Current period budget in USD.

organization_namestring nullable

Owning organization name.

total_period_usagenumber double

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.