Custom Objects Limits

The Custom Objects API implements limits on all the standard create endpoints. The restriction is on the total number of object records and relationship records that can be created based on the plan.

For example, when an application exceeds the limit for the object records endpoint, the API returns a HTTP 429 "Too Many Requests" response code. The following error is returned in the response body:

{
  "errors": [
    {
      "code": "TooManyRequests",
      "status": "429",
      "title": "Too Many Requests",
      "message": "You have exceeded the maximum number of resources for this account"
    }
  ]
}

To avoid hitting the limits, you can use the limits endpoint to understand the limit and usage for your account.

JSON Format

A limit record consists of an object named data with the following properties.

Name Type Writable Required Comment
key string no no The limit key defines the limit type and record type
limit integer no no The maximum count of records that can be created for the key
count integer no no The current count of records stored in Custom Objects for the account for the key
Example
{
  "data": [
    {
      "key": "resources",
      "limit": 1000000,
      "count": 0
    }
  ]
}

List Limits for the Account

GET /api/sunshine/limits

Returns the current limits of the account.

Allowed For
  • Agents
Using cURL
curl https://{subdomain}.zendesk.com/api/sunshine/limits \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "data": [
    {
      "key": "resources",
      "limit": 1000000,
      "count": 0
    },
    {
      "key": "relationships",
      "limit": 1000000,
      "count": 0
    },
    {
      "key": "resource_types",
      "limit": 50,
      "count": 0
    },
    {
      "key": "relationship_types",
      "limit": 50,
      "count": 0
    }
  ]
}