For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDashboard
Getting StartedAPI ReferenceRoadmapBlog
Getting StartedAPI ReferenceRoadmapBlog
    • Resources
    • Authentication
    • Pagination
    • Rate limiting
  • API Keys
    • GETList api keys
    • GETGet api key
    • POSTCreate api key
    • PUTUpdate api key
    • DELDelete api key
  • Environments
    • POSTCreate environment
    • PUTUpdate environment
    • DELDelete environment
  • Plans
    • The Plan object
    • GETList plans
    • GETGet plan
    • POSTCreate plan
    • PUTUpdate plan
    • DELDelete plan
  • Companies
    • The Company object
    • GETList companies
    • POSTUpsert company
    • GETLookup company
    • DELDelete company
    • POSTDelete company by keys
    • GETList company memberships
    • POSTGet or create company membership
    • DELDelete company membership
    • POSTUpsert company trait
  • Users
    • The User object
    • GETList users
    • GETLookup user
    • POSTUpsert user
    • DELDelete user
    • POSTDelete user by keys
    • POSTUpsert user trait
  • Events
    • The Event object
    • GETList events
    • POSTCreate event
    • POSTCreate event batch
    • GETGet event
  • Features
    • The Feature object
    • GETList features
    • GETGet feature
    • POSTCreate feature
    • PUTUpdate feature
    • DELDelete feature
  • Flags
    • The Flag object
    • GETList flags
    • GETGet flag
    • POSTCreate flag
    • PUTUpdate flag
    • DELDelete flag
    • PUTUpdate flag rules
    • POSTCheck flag
    • POSTCheck flags
  • Entitlements
    • GETList company overrides
    • GETGet company override
    • POSTCreate company override
    • PUTUpdate company override
    • DELDelete company override
    • GETList plan entitlements
    • GETGet plan entitlement
    • POSTCreate plan entitlement
    • PUTUpdate plan entitlement
    • DELDelete plan entitlement
  • Feature Usage
    • GETList feature usage
  • Billing Credits
    • GETList credits
    • POSTCreate credit
    • GETGet credit
    • PUTUpdate credit
    • DELDelete credit
    • GETList credit bundles
    • POSTCreate credit bundle
    • GETGet credit bundle
    • PUTUpdate credit bundle
    • DELDelete credit bundle
    • POSTGrant credits to company
    • GETList company credit grants
    • GETList credit grants
    • PUTZero out credit grant
    • GETList plan credit grants
    • POSTCreate plan credit grant
    • DELDelete plan credit grant
    • GETGet credit ledger
  • Account Members
    • GETList account members
    • GETGet account member
LogoLogo
SupportDashboard
Billing Credits

Update credit

PUT
https://api.schematichq.com/billing/credits/:credit_id
PUT
/billing/credits/:credit_id
1import { SchematicClient } from "@schematichq/schematic-typescript-node";
2
3async function main() {
4 const client = new SchematicClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.credits.updateBillingCredit("credit_id", {
8 description: "Credit for premium API usage",
9 name: "Premium API Credit",
10 });
11}
12main();
1{
2 "data": {
3 "burn_strategy": "expiration_priority",
4 "cost_editable": true,
5 "created_at": "2024-01-15T09:30:00Z",
6 "currency_prices": [
7 {
8 "currency": "USD",
9 "price": {
10 "currency": "USD",
11 "external_price_id": "price_123abc",
12 "id": "price_001",
13 "interval": "day",
14 "interval_count": 1,
15 "price": 100,
16 "provider_type": "metronome",
17 "scheme": "per_unit",
18 "nickname": "Daily API Credit Price",
19 "price_decimal": "1.00"
20 }
21 }
22 ],
23 "default_expiry_unit": "billing_periods",
24 "default_rollover_policy": "expire",
25 "description": "Credit used for accessing premium API endpoints with daily limits",
26 "id": "credit_789xyz",
27 "name": "Premium API Credit",
28 "updated_at": "2024-01-15T09:30:00Z",
29 "default_expiry_unit_count": 1,
30 "icon": "credit_icon",
31 "plural_name": "Premium API Credits",
32 "price": {
33 "currency": "USD",
34 "external_price_id": "price_123abc",
35 "id": "price_001",
36 "interval": "day",
37 "interval_count": 1,
38 "price": 100,
39 "provider_type": "metronome",
40 "scheme": "per_unit",
41 "nickname": "Daily API Credit Price",
42 "price_decimal": "1.00"
43 },
44 "product": {
45 "account_id": "acct_456def",
46 "created_at": "2024-01-15T09:30:00Z",
47 "environment_id": "env_prod_001",
48 "external_id": "prod_789xyz",
49 "is_active": true,
50 "name": "API Credit Product",
51 "price": 1,
52 "product_id": "prod_001",
53 "provider_type": "metronome",
54 "quantity": 100,
55 "updated_at": "2024-01-15T09:30:00Z",
56 "price_decimal": "1.00",
57 "currency": "USD"
58 },
59 "singular_name": "Premium API Credit"
60 },
61 "params": {}
62}
Was this page helpful?
Previous

Delete credit

Next
Built with

Authentication

X-Schematic-Api-Keystring
API Key authentication via header

Path parameters

credit_idstringRequired

credit_id

Request

This endpoint expects an object.
descriptionstringRequired<=1024 characters
namestringRequired<=255 characters
burn_strategyenum or nullOptional
Allowed values:
currency_priceslist of objects or nullOptional
default_expiry_unitenum or nullOptional
Allowed values:
default_expiry_unit_countlong or nullOptional>=1
default_rollover_policyenum or nullOptional
Allowed values:
iconstring or nullOptional<=64 characters
per_unit_pricelong or nullOptional>=1
per_unit_price_decimalstring or nullOptional
plural_namestring or nullOptional<=512 characters
singular_namestring or nullOptional<=512 characters

Response

OK
dataobject
paramsobject
Input parameters

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error