• Precios
  • Blog
Iniciar sesiónAgendá una demo
Create credit pack POSTDelete credit pack DELETEList credit packs GETPurchase credits POSTUpdate credit pack PATCH
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Update credit pack

Update a credit pack's name, description, credits, price, or active status.

PATCH
/credit-packs/{id}

Update a credit pack's name, description, credits, price, or active status.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Unique key used to safely retry this write for 24 hours without applying it twice.

Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/credit-packs/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "description": "string",  "credits": -9007199254740991,  "price": -9007199254740991,  "isActive": true,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "object": "credit_pack",  "livemode": true}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Purchase credits POST

Purchase a credit pack for a subscription. Charges the customer and adds credits to their balance.

Batch create customers POST

Create up to 100 customers in a single request.

name?string
Length1 <= length <= 100
description?string
Lengthlength <= 255
credits?integer
Range1 <= value <= 9007199254740991
price?integer
Range0 <= value <= 9007199254740991
isActive?boolean