Skip to content
AI Inbx
Esc
navigateopen⌘Jpreview

Retrieve the pacing queue

Returns a snapshot of everything pacing is currently holding: a sample of queued messages, the rules in effect, and per-rule counts of how many messages each matched and how many it is holding. The per-rule counts are the fastest way to identify which rule is responsible.

GET/pacing-queue
Authorization
AuthorizationBearer token (API key) · headerrequired
Pass an AI Inbx API key as a Bearer token.
Query parameters
limitinteger
Maximum queued emails to return.
min 1 · max 2000 · default: 100
Responses
200Success.
dataobject[]required
Show properties
Array of object
email_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
space_idstring | anyrequired
Which space a resource is in. Null is the workspace itself — what every resource of a workspace that has no spaces says.
Show properties
Any of:
string
string
any
any
fromstring<email>required
matches ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
tostring<email>[]required
subjectstringrequired
queued_atstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
totalintegerrequired
min 0 · max 9007199254740991
sampledintegerrequired
min 0 · max 9007199254740991
as_ofstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
spreadintegerrequired
min 0 · max 100
rulesobject[]required
Show properties
Array of object
One of:
object
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
namestringrequired
space_idstring | anyrequired
Which space a resource is in. Null is the workspace itself — what every resource of a workspace that has no spaces says.
Show properties
Any of:
string
string
any
any
enabledbooleanrequired
matchobject[]required
Show properties
Array of object
fieldstringrequired
Allowed:fromtoeither
patternstringrequired
min length 1 · max length 320
created_atstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
kindstringrequired
scheduleobjectrequired
Show properties
timezonestringrequired
min length 1
windowsobject[]required
Show properties
Array of object
daysinteger[]required
start_minuteintegerrequired
min 0 · max 1440
end_minuteintegerrequired
min 0 · max 1440
object
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
namestringrequired
space_idstring | anyrequired
Which space a resource is in. Null is the workspace itself — what every resource of a workspace that has no spaces says.
Show properties
Any of:
string
string
any
any
enabledbooleanrequired
matchobject[]required
Show properties
Array of object
fieldstringrequired
Allowed:fromtoeither
patternstringrequired
min length 1 · max length 320
created_atstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
kindstringrequired
limitobjectrequired
Show properties
scopestringrequired
Allowed:rulefrom_addressfrom_domainto_addressto_domain
amountintegerrequired
min 1 · max 1000000
per_secondsintegerrequired
min 1 · max 2678400
rule_countsobject[]required
Show properties
Array of object
rule_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
matchesintegerrequired
min 0 · max 9007199254740991
heldintegerrequired
min 0 · max 9007199254740991
400The request is invalid.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
401The API key is missing or invalid.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
403The API key does not have the required scope.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
404The requested resource does not exist.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
409The request conflicts with the resource's current state.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
413The request body or attachments are too large.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
415The request body is not JSON.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
422The request body failed validation.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
429The organisation's request budget is spent (`too_many_requests`), or an upstream mail provider is throttling (`rate_limited`).
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
500An internal error occurred.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
502An upstream mail provider failed.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
503The service is temporarily unavailable.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
Request
curl -X GET "https://api.aiinbx.com/api/v2/pacing-queue" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "data": [
    {
      "email_id": "string",
      "space_id": "string",
      "from": "user@example.com",
      "to": [
        "user@example.com"
      ],
      "subject": "string",
      "queued_at": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 9007199254740991,
  "sampled": 9007199254740991,
  "as_of": "2019-08-24T14:15:22Z",
  "spread": 100,
  "rules": [
    {
      "id": "string",
      "name": "string",
      "space_id": "string",
      "enabled": true,
      "match": [
        {
          "field": "from",
          "pattern": "string"
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "kind": "hours",
      "schedule": {
        "timezone": "string",
        "windows": [
          {
            "days": [
              6
            ],
            "start_minute": 1440,
            "end_minute": 1440
          }
        ]
      }
    }
  ],
  "rule_counts": [
    {
      "rule_id": "string",
      "matches": 9007199254740991,
      "held": 9007199254740991
    }
  ]
}