credits

Create credit spend policy

Changed on
post/billing/credits/spend-policies

Request

  • Base URL
    https://api.schematichq.com
  • URL
    https://api.schematichq.com/billing/credits/spend-policies
  • Auth
    API key in header X-Schematic-Api-Key

Request body

billing_credit_idstring required
company_idstring nullable

The company the cap applies in. Alone, it caps the whole company. With user_id, it caps that user's spend in this company. Required with user_id when the user belongs to more than one company.

labelstring nullable
max_per_drawnumber double nullable

The largest number of credits a single draw may spend. Set either this or window_amount.

user_idstring nullable

The user the cap applies to. The user must belong to company_id, and with no company_id, to exactly one company.

window_amountnumber double nullable

The number of credits the company or user may spend in one window. Set either this or max_per_draw.

window_unit'hour' | 'day' | 'week' | 'month' | 'billing_period'

Response

Created

paramsobject required

Input parameters

Changes

    • warning

      added the new month enum value to the ///// response property for the response status

    • warning

      added the new week enum value to the ///// response property for the response status

    • info

      added the new month enum value to the request property ////

    • info

      added the new week enum value to the request property ////

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property became nullable

    • info

      the request property became optional

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the required property / to the response with the status