Skip to main content
POST
/
v1
/
customers.list
Typescript (SDK)
import { Autumn } from 'autumn-js'

const autumn = new Autumn()

const result = await autumn.customers.list({});
{
  "list": [
    {
      "id": "2ee25a41-0d81-4ad2-8451-ec1aadaefe58",
      "name": "Patrick",
      "email": "patrick@useautumn.com",
      "createdAt": 1771409161016,
      "fingerprint": null,
      "stripeId": "cus_U0BKxpq1mFhuJO",
      "env": "sandbox",
      "metadata": {},
      "sendEmailReceipts": false,
      "subscriptions": [
        {
          "planId": "pro_plan",
          "autoEnable": true,
          "addOn": false,
          "status": "active",
          "pastDue": false,
          "canceledAt": null,
          "expiresAt": null,
          "trialEndsAt": null,
          "startedAt": 1771431921437,
          "currentPeriodStart": 1771431921437,
          "currentPeriodEnd": 1771999921437,
          "quantity": 1
        }
      ],
      "purchases": [],
      "balances": {
        "messages": {
          "featureId": "messages",
          "granted": 100,
          "remaining": 0,
          "usage": 100,
          "unlimited": false,
          "overageAllowed": false,
          "maxPurchase": null,
          "nextResetAt": 1773851121437,
          "breakdown": [
            {
              "id": "cus_ent_39qmLooixXLAqMywgXywjAz96rV",
              "planId": "pro_plan",
              "includedGrant": 100,
              "prepaidGrant": 0,
              "remaining": 0,
              "usage": 100,
              "unlimited": false,
              "reset": {
                "interval": "month",
                "resetsAt": 1773851121437
              },
              "price": null,
              "expiresAt": null
            }
          ]
        }
      }
    }
  ],
  "has_more": false,
  "offset": 0,
  "total": 1,
  "limit": 10
}

Body Parameters

Response

{
  "list": [
    {
      "id": "2ee25a41-0d81-4ad2-8451-ec1aadaefe58",
      "name": "Patrick",
      "email": "patrick@useautumn.com",
      "createdAt": 1771409161016,
      "fingerprint": null,
      "stripeId": "cus_U0BKxpq1mFhuJO",
      "env": "sandbox",
      "metadata": {},
      "sendEmailReceipts": false,
      "subscriptions": [
        {
          "planId": "pro_plan",
          "autoEnable": true,
          "addOn": false,
          "status": "active",
          "pastDue": false,
          "canceledAt": null,
          "expiresAt": null,
          "trialEndsAt": null,
          "startedAt": 1771431921437,
          "currentPeriodStart": 1771431921437,
          "currentPeriodEnd": 1771999921437,
          "quantity": 1
        }
      ],
      "purchases": [],
      "balances": {
        "messages": {
          "featureId": "messages",
          "granted": 100,
          "remaining": 0,
          "usage": 100,
          "unlimited": false,
          "overageAllowed": false,
          "maxPurchase": null,
          "nextResetAt": 1773851121437,
          "breakdown": [
            {
              "id": "cus_ent_39qmLooixXLAqMywgXywjAz96rV",
              "planId": "pro_plan",
              "includedGrant": 100,
              "prepaidGrant": 0,
              "remaining": 0,
              "usage": 100,
              "unlimited": false,
              "reset": {
                "interval": "month",
                "resetsAt": 1773851121437
              },
              "price": null,
              "expiresAt": null
            }
          ]
        }
      }
    }
  ],
  "has_more": false,
  "offset": 0,
  "total": 1,
  "limit": 10
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2.1
required

Body

application/json
offset
integer
default:0

Number of items to skip

Required range: 0 <= x <= 9007199254740991
limit
integer
default:10

Number of items to return. Default 10, max 1000.

Required range: 1 <= x <= 1000
plans
object[]

Filter by plan ID and version. Returns customers with active subscriptions to this plan.

subscription_status
enum<string>

Filter by customer product status. Defaults to active and scheduled

Available options:
active,
scheduled

Search customers by id, name, or email

Response

200 - application/json

OK

list
object[]
required

Array of items for current page

has_more
boolean
required

Whether more results exist after this page

offset
number
required

Current offset position

limit
number
required

Limit passed in the request

total
number
required

Total number of items returned in the current page