---
agentTools:
  projectIndex: https://kable.readme.io/llms.txt
---

# get all customers

Retrieve all customers.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v1/customers": {
      "get": {
        "operationId": "getCustomers",
        "summary": "get all customers",
        "description": "Retrieve all customers.",
        "parameters": [
          {
            "name": "Kable-Client-Id",
            "in": "header",
            "description": "Your Kable client ID, found in the dashboard of your Kable account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Kable-Client-Secret",
            "in": "header",
            "description": "Your `LIVE` or `TEST` secret key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Information about all customers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerResponseDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage401"
                }
              }
            }
          },
          "500": {
            "description": "Something went wrong",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage500"
                }
              }
            }
          }
        },
        "tags": [
          "customers"
        ]
      }
    }
  },
  "info": {
    "title": "Kable API",
    "description": "The Kable API allows developers to manage customers, plans, and usage data for their API.\n\n## API Host and Environments\n\nKable is accessible in Live and Test environments for authentication and metering of client API requests. You will have separate API keys to access each environment.\n\nYou should only use Kable's Live environment for your own production data. All other configured environments should use Kable's Test environment.\n\n## API Protocols and Headers\n\nAll requests to the Kable API are made over HTTPS TLS v1.2+ to ensure security. Calls made over HTTP will fail. Any requests without proper authentication will also fail.\n\nThe Kable API uses standard JSON for requests and responses. Be sure to set both the `Content-Type` and `Accept` headers on each request to `application/json`.\n\nEach Kable API response includes a `requestId` as the `X-REQUEST-ID` response header. The `requestId` is included on most responses regardless whether the API request succeeded or failed. You can use this `requestId` to help with debugging or when contacting support regarding a specific API call.\n\n## API Versioning\n\nAll Kable endpoints are versioned. After the host, each API can be found at `/api/vX/...` where X is the API version.\n\nWe strive to ensure that changes to the Kable API are backward compatible. Sometimes, though, we must break from older design paradigms to make the product better. When this happens, a new version of the API is released.\n\nThe current version of the Kable API is `v1`.\n\n",
    "version": "1.0.0",
    "contact": {
      "name": "Kable",
      "url": "https://kable.io",
      "email": "contact@kable.io"
    }
  },
  "servers": [
    {
      "url": "https://live.kable.io",
      "description": "Kable Live"
    },
    {
      "url": "https://test.kable.io",
      "description": "Kable Test"
    }
  ],
  "components": {
    "schemas": {
      "ErrorMessage401": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable error message",
            "example": "Unauthorized"
          }
        },
        "required": [
          "message"
        ]
      },
      "ErrorMessage500": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable error message",
            "example": "Something went wrong"
          }
        },
        "required": [
          "message"
        ]
      },
      "PriceTierResponseDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The tier price type",
            "example": "UNIT",
            "enum": [
              "UNIT",
              "PACKAGE",
              "FLAT",
              "PERCENTAGE",
              "SUBSCRIPTION",
              "MINIMUM",
              "MAXIMUM",
              "DISCOUNT"
            ]
          },
          "amount": {
            "type": "number",
            "description": "The tier price amount",
            "example": 199.99
          },
          "start": {
            "type": "number",
            "description": "The tier start amount",
            "example": 0
          },
          "finish": {
            "type": "number",
            "description": "The tier finish amount (infinity indicated by -1)",
            "example": -1
          },
          "packageSize": {
            "type": "number",
            "description": "The tier package size (only applicable to package price tiers)",
            "example": 1000
          }
        },
        "required": [
          "type",
          "amount"
        ]
      },
      "PlanPriceResponseDto": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "description": "Three-letter ISO currency code",
            "example": "USD",
            "enum": [
              "USD",
              "CAD",
              "MXN",
              "EUR",
              "GBP",
              "JPY",
              "INR",
              "CNY",
              "AUD",
              "NZD",
              "AED"
            ]
          },
          "tiers": {
            "description": "The tiered pricing of the plan",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceTierResponseDto"
            }
          }
        },
        "required": [
          "currency",
          "tiers"
        ]
      },
      "ResourceEntitlementResponseDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the entitlement",
            "example": "Premium Support"
          },
          "entitlementId": {
            "type": "string",
            "description": "A Kable-defined identifier for the entitlement.",
            "example": "ent_a44e148584d0463482c961b7f62f825d"
          },
          "externalId": {
            "type": "string",
            "description": "An identifier for the entitlement as defined by your API.",
            "example": "yourcompany_entitlement789"
          },
          "datatype": {
            "type": "string",
            "description": "The type of data supported by the entitlement.",
            "example": "STRING"
          },
          "description": {
            "type": "string",
            "description": "A description of the entitlement.",
            "example": "Customers have access to 24/7 premium support channels through Slack and email."
          },
          "created": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was first created",
            "example": "2023-03-01T00:00:00.000Z"
          },
          "modified": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was last modified",
            "example": "2023-03-01T00:00:00.000Z"
          },
          "value": {
            "type": "object",
            "description": "The value of the entitlement.",
            "example": true
          }
        },
        "required": [
          "name",
          "entitlementId",
          "externalId",
          "datatype",
          "description",
          "created",
          "modified",
          "value"
        ]
      },
      "PlanResponseDto": {
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "description": "A Kable-defined identifier for the plan.",
            "example": "pln_a23e148584d0463482c961b7f62f824c"
          },
          "name": {
            "type": "string",
            "description": "A human-readable name for the plan, visible on dashboards, invoices, and reports.",
            "example": "Requests Usage Plan"
          },
          "externalId": {
            "type": "string",
            "description": "An identifier for the plan as defined by your API.",
            "example": "yourcompany_plan123"
          },
          "description": {
            "type": "string",
            "description": "A human-readable description for the plan, visible on dashboards, invoices, and reports.",
            "example": "A usage plan based on the number of API requests"
          },
          "nickname": {
            "type": "string",
            "description": "An additional identifier for the plan, defined by you, that is *not* visible to customers. If you have different *Monthly Active Users Plan*s for different cohorts of customers, this is a useful place to differentiate those.",
            "example": "requests_usage_v1"
          },
          "type": {
            "type": "string",
            "description": "The type of plan.",
            "enum": [
              "USAGE",
              "SUBCRIPTION"
            ],
            "example": "USAGE"
          },
          "dimensionId": {
            "type": "string",
            "description": "An identifier of the dimension along which usage is aggregated in this plan, relevant only for usage plans.",
            "example": "dim_c5f32b8cd8934356b5167a3b2c6c6314"
          },
          "aggregation": {
            "type": "string",
            "description": "The aggregation along which usage metrics are calculated in this plan, relevant only for usage plans.",
            "example": "COUNT"
          },
          "interval": {
            "type": "string",
            "description": "The billing interval for the plan.",
            "example": "MONTH",
            "enum": [
              "MONTH"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "Arbitrary key-value pairs to attach to the object that can be useful for controlling functionality inside your API.",
            "example": {
              "foo": "bar"
            }
          },
          "price": {
            "description": "The monthly price of the plan.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanPriceResponseDto"
              }
            ]
          },
          "entitlements": {
            "description": "The entitlements associated with this plan.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceEntitlementResponseDto"
            }
          },
          "created": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was first created",
            "example": "2022-03-01T00:00:00.000Z"
          },
          "modified": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was last modified",
            "example": "2022-03-01T00:00:00.000Z"
          }
        },
        "required": [
          "planId",
          "name",
          "type",
          "dimensionId",
          "interval",
          "price",
          "entitlements",
          "created",
          "modified"
        ]
      },
      "BillingContactRequestDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "Contact's first name.",
            "example": "Bruce"
          },
          "lastName": {
            "type": "string",
            "description": "Contact's last name.",
            "example": "Wayne"
          },
          "email": {
            "type": "string",
            "description": "Contact's email address.",
            "example": "bruce@wayneenterprises.com"
          },
          "phone": {
            "type": "string",
            "description": "Contact's phone number.",
            "example": "555-555-5555"
          },
          "addressLine1": {
            "type": "string",
            "description": "First line of contact's mailing address.",
            "example": "1007 Mountain Drive"
          },
          "addressLine2": {
            "type": "string",
            "description": "Second line of contact's mailing address.",
            "example": "Apt 1"
          },
          "city": {
            "type": "string",
            "description": "City of contact's mailing address.",
            "example": "Gotham"
          },
          "state": {
            "type": "string",
            "description": "State of contact's mailing address.",
            "example": "NY"
          },
          "postalCode": {
            "type": "string",
            "description": "Postal code of contact's mailing address.",
            "example": "10001"
          },
          "country": {
            "type": "string",
            "description": "Country of contact's mailing address.",
            "example": "US"
          }
        }
      },
      "CustomerPlanResponseDto": {
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "description": "A Kable-defined identifier for the plan.",
            "example": "pln_a23e148584d0463482c961b7f62f824c"
          },
          "name": {
            "type": "string",
            "description": "A human-readable name for the plan, visible on dashboards, invoices, and reports.",
            "example": "Requests Usage Plan"
          },
          "externalId": {
            "type": "string",
            "description": "An identifier for the plan as defined by your API.",
            "example": "yourcompany_plan123"
          },
          "description": {
            "type": "string",
            "description": "A human-readable description for the plan, visible on dashboards, invoices, and reports.",
            "example": "A usage plan based on the number of API requests"
          },
          "nickname": {
            "type": "string",
            "description": "An additional identifier for the plan, defined by you, that is *not* visible to customers. If you have different *Monthly Active Users Plan*s for different cohorts of customers, this is a useful place to differentiate those.",
            "example": "requests_usage_v1"
          },
          "type": {
            "type": "string",
            "description": "The type of plan.",
            "enum": [
              "USAGE",
              "SUBCRIPTION"
            ],
            "example": "USAGE"
          },
          "dimensionId": {
            "type": "string",
            "description": "An identifier of the dimension along which usage is aggregated in this plan, relevant only for usage plans.",
            "example": "dim_c5f32b8cd8934356b5167a3b2c6c6314"
          },
          "aggregation": {
            "type": "string",
            "description": "The aggregation along which usage metrics are calculated in this plan, relevant only for usage plans.",
            "example": "COUNT"
          },
          "interval": {
            "type": "string",
            "description": "The billing interval for the plan.",
            "example": "MONTH",
            "enum": [
              "MONTH"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "Arbitrary key-value pairs to attach to the object that can be useful for controlling functionality inside your API.",
            "example": {
              "foo": "bar"
            }
          },
          "price": {
            "description": "The monthly price of the plan.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanPriceResponseDto"
              }
            ]
          },
          "entitlements": {
            "description": "The entitlements associated with this plan.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceEntitlementResponseDto"
            }
          },
          "created": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was first created",
            "example": "2022-03-01T00:00:00.000Z"
          },
          "modified": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was last modified",
            "example": "2022-03-01T00:00:00.000Z"
          },
          "addedDate": {
            "format": "date-time",
            "type": "string"
          },
          "endedDate": {
            "format": "date-time",
            "type": "string"
          },
          "periodStartDate": {
            "format": "date-time",
            "type": "string"
          },
          "periodEndDate": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "planId",
          "name",
          "type",
          "dimensionId",
          "interval",
          "price",
          "entitlements",
          "created",
          "modified",
          "addedDate"
        ]
      },
      "CustomerBundleResponseDto": {
        "type": "object",
        "properties": {
          "bundleId": {
            "type": "string",
            "description": "A Kable-defined identifier for the bundle.",
            "example": "bun_a23e148584d0463482c961b7f62f824c"
          },
          "name": {
            "type": "string",
            "description": "A human-readable name for the bundle, visible on dashboards, invoices, and reports.",
            "example": "Professional Package"
          },
          "externalId": {
            "type": "string",
            "description": "An identifier for the bundle as defined by your API.",
            "example": "yourcompany_bun123"
          },
          "description": {
            "type": "string",
            "description": "A human-readable description for the bundle, visible on dashboards, invoices, and reports.",
            "example": "The perfect package for scaling businesses"
          },
          "nickname": {
            "type": "string",
            "description": "An additional identifier for the bundle, defined by you, that is *not* visible to customers. If you have different *Monthly Active Users Bundle*s for different cohorts of customers, this is a useful place to differentiate those.",
            "example": "professional_2022"
          },
          "currency": {
            "type": "string",
            "description": "Three-letter ISO currency code",
            "example": "USD",
            "enum": [
              "USD",
              "CAD",
              "MXN",
              "EUR",
              "GBP",
              "JPY",
              "INR",
              "CNY",
              "AUD",
              "NZD",
              "AED"
            ]
          },
          "plans": {
            "description": "The plans included in this bundle.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanResponseDto"
            }
          },
          "metadata": {
            "type": "object",
            "description": "Arbitrary key-value pairs to attach to the object that can be useful for controlling functionality inside your API.",
            "example": {
              "foo": "bar"
            }
          },
          "created": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was first created",
            "example": "2022-03-01T00:00:00.000Z"
          },
          "modified": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was last modified",
            "example": "2022-03-01T00:00:00.000Z"
          }
        },
        "required": [
          "bundleId",
          "name",
          "currency",
          "created",
          "modified"
        ]
      },
      "CustomerResponseDto": {
        "type": "object",
        "properties": {
          "kableClientId": {
            "type": "string",
            "description": "Your Kable client ID, found in the dashboard of your Kable account",
            "example": "kci_3c90e9ac92c64f31ae8ed84d21e18740"
          },
          "customerId": {
            "type": "string",
            "description": "A Kable-defined identifier for the customer.",
            "example": "cus_8276e1ac8ed84d21c64f31ae0082fe"
          },
          "clientId": {
            "type": "string",
            "description": "A unique identifier for the customer, defined by you.",
            "example": "yourcompanyuser_1234567890"
          },
          "companyName": {
            "type": "string",
            "description": "The name of the customer.",
            "example": "Awesome Corp"
          },
          "currency": {
            "type": "string",
            "description": "Three-letter ISO currency code",
            "example": "USD",
            "enum": [
              "USD",
              "CAD",
              "MXN",
              "EUR",
              "GBP",
              "JPY",
              "INR",
              "CNY",
              "AUD",
              "NZD",
              "AED"
            ]
          },
          "status": {
            "type": "string",
            "description": "The status of the customer.",
            "example": "ACTIVE",
            "enum": [
              "ACTIVE",
              "CANCELLED"
            ]
          },
          "nextInvoiceDate": {
            "format": "date-time",
            "type": "string",
            "description": "The date at which the customer's next invoice will occur.",
            "example": "2022-05-12T00:00:00.000Z"
          },
          "billingContact": {
            "description": "A point of contact for invoices and other billing-related communications.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingContactRequestDto"
              }
            ]
          },
          "plans": {
            "description": "The customer's plans.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerPlanResponseDto"
            }
          },
          "bundles": {
            "description": "The customer's bundles.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerBundleResponseDto"
            }
          },
          "entitlements": {
            "description": "The customer's entitlements.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceEntitlementResponseDto"
            }
          },
          "created": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was first created",
            "example": "2022-03-01T00:00:00.000Z"
          },
          "modified": {
            "format": "date-time",
            "type": "string",
            "description": "Date at which entity was last modified",
            "example": "2022-03-01T00:00:00.000Z"
          }
        },
        "required": [
          "kableClientId",
          "customerId",
          "clientId",
          "companyName",
          "currency",
          "status",
          "plans",
          "bundles",
          "entitlements",
          "created",
          "modified"
        ]
      }
    }
  },
  "externalDocs": {
    "description": "Kable Documentation",
    "url": "https://docs.kable.io"
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 133,
      "2": 73,
      "3": 91,
      "4": 45,
      "5": 72,
      "6": 119,
      "7": 0,
      "8": 140,
      "9": 125,
      "10": 233,
      "11": 173
    }
  }
}
```