End users

Create or replace an end user's execution policy

Workspace owner/admin session or a secret key with tokens:manage. Admission, counters, the credit hold, and the reservation commit atomically. Amounts use the tenant's exact credit denomination.

put/credits/end-users/{externalUserId}/policy

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/end-users/{externalUserId}/policy
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

externalUserIdstring required

Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.

Request body

mode'ask' | 'bounded' | 'unlimited' required
budgetPeriod'hour' | 'day' | 'week' | 'month' | 'null' nullable
budgetCreditsstring

Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

maxChargeCreditsstring

Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

allowProvidersstring[] nullable
denyProvidersstring[] nullable
allowEndpointsstring[] nullable
denyEndpointsstring[] nullable
allowModelsstring[] nullable
denyModelsstring[] nullable
maxConcurrentReservationsinteger nullable
maxCallsPerPeriodinteger nullable
maxCallsPerLoopinteger nullable

Response

Policy applied

successunknown required
externalUserIdstring required

Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.

Changes

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