Pairs API

Use the Pairs API to send Delivr the consented pairs of hashed email and mobile advertising ID that your app observes. You can also withdraw pairs and check what Delivr holds. Delivr stores each accepted pair with its consent evidence and honors withdrawals and verified deletion requests.

Available by agreement. Contact your Delivr representative.

You call the API from your backend with an API key and secret. In a test, you send one request with a test key and read a result for every item. This takes under 30 minutes.

Before you start

  • Your Delivr representative enables Pairs for your organization and records an agreement for your project. The agreement lists the platforms and scope modes you can send.
  • Create a project-scoped API key for that project. Choose Test as the environment for your first requests.
  • Keep API secret required on for the key. The route refuses a key whose secret is optional.
  • Keep the key and the secret on your backend. Do not ship them in the app.

A test key runs the same checks as a live key, including access and agreement. Ask your representative to confirm both before you test.

Send a test request

The routes are on https://api.delivr.ai. The two POST routes take a JSON body. The GET route takes no body.

RoutePurpose
POST /api/v1/pairsSend pairs.
POST /api/v1/pairs/withdrawalsWithdraw pairs.
GET /api/v1/pairs/summaryCheck what Delivr holds for your project. See Check what is stored.

This request sends one iOS item and one Android item. With a test key, Delivr checks both items and stores neither.

curl -X POST "https://api.delivr.ai/api/v1/pairs" \
  -H "X-Api-Key: YOUR_TEST_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Idempotency-Key: 9f4b2c1e-6d3a-4a58-b7c0-2e1d0f9a8b7c" \
  -H "Content-Type: application/json" \
  -d '{
    "schema_version": "1",
    "items": [
      {
        "item_key": "ios-0001",
        "hem_sha256": "b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514",
        "hem_normalization": "uid2_v1",
        "maid": "8d6a3f1e-2b4c-4d5e-9f10-a1b2c3d4e5f6",
        "maid_type": "idfa",
        "platform": "ios",
        "att_status": "authorized",
        "consent": {
          "gpc": false,
          "gpp_string": "DBABL~BVQqAAAAAgA.QA",
          "gpp_sid": [7]
        },
        "session_evidence": {
          "publisher_user_ref": "user-48213",
          "email_verified": true,
          "verified_at": "2026-11-22T17:58:02Z"
        },
        "scope_mode": "scoped",
        "app": {
          "bundle_id": "com.example.app",
          "app_version": "4.12.0",
          "store_id": "1234567890"
        },
        "observed_at": "2026-11-22T18:04:11Z"
      },
      {
        "item_key": "android-0002",
        "hem_sha256": "d6117306485ed0e50afab3ac871e98f81699151f30281527d63ff5f233656c69",
        "hem_normalization": "uid2_v1",
        "maid": "3f2b9c1a-7d4e-4a68-8b05-c9e1d2f3a4b5",
        "maid_type": "aaid",
        "platform": "android",
        "ad_id_opt_out": false,
        "android_linkage_consent": {
          "granted": true,
          "granted_at": "2026-11-20T09:15:30Z",
          "text_version": "2026-10"
        },
        "consent": {
          "gpc": false,
          "gpp_string": "DBABL~BVQqAAAAAgA.QA",
          "gpp_sid": [7]
        },
        "session_evidence": {
          "publisher_user_ref": "user-90177",
          "email_verified": true,
          "verified_at": "2026-11-22T16:40:00Z"
        },
        "scope_mode": "scoped",
        "app": {
          "bundle_id": "com.example.app",
          "app_version": "4.12.0"
        },
        "observed_at": "2026-11-22T18:05:40Z"
      }
    ]
  }'

Change observed_at to a time within the last 72 hours, or both items come back as pair_stale_observation.

The response has "test": true and a null receipt_id. Check the test field in the body. Pairs does not send the X-Delivr-Mode: test header that other test-key routes send.

{
  "receipt_id": null,
  "test": true,
  "accepted": 2,
  "rejected": 0,
  "items": [
    { "item_key": "ios-0001", "status": "accepted" },
    { "item_key": "android-0002", "status": "accepted" }
  ]
}

To go live, switch to a live key and keep the same request structure. Send only your own observations from the last 72 hours, with the consent evidence you recorded for each. Do not send the sample items above with a live key: Delivr would store them as real pairs. Use a new Idempotency-Key for each new batch.

Request rules

All three routes refuse a query string. Any query string returns 400 with pairs.query_not_allowed. The rules below apply to the two POST routes only. The GET summary takes no body and no Idempotency-Key.

RuleValue
HeadersX-Api-Key, X-Api-Secret, Idempotency-Key, and Content-Type: application/json.
Body size1 MiB at most.
JSONStrict. An unknown field, at any level, returns 400.
schema_versionThe string "1".
items1 to 500 items.
item_key1 to 128 bytes, unique in the batch. Echoed in the result.

The gateway sets the key's environment from the key. You cannot choose it in a request.

Idempotency

This section applies to the two POST routes. Idempotency-Key is required, 1 to 255 bytes. Use a UUID. The key is scoped to your project and the route.

  • If you resend the same key with the same body, you get the stored response with the same receipt_id. Nothing is stored twice.
  • If you resend the same key with a different body, you get 409.
  • Delivr compares the body byte for byte. A change in whitespace or key order counts as a different body.
  • A request that fails with 429, 500 or 503 stores nothing, so you can retry it with the same key.
  • A key replays the whole stored result, including rejected items. To resend a corrected item, put it in a new batch with a new key.

Test keys do not read or store idempotency keys.

Ingest item fields

Every item needs these fields. A missing field gives a per-item code, not a 400. A field of the wrong JSON type gives 400.

FieldValue
item_keyYour reference for the item.
hem_sha256SHA-256 of the normalized email, as 64 hex characters. Delivr stores it in lower case.
hem_normalizationuid2_v1 or base_v1. See Hash the email.
maidThe advertising ID, as an 8-4-4-4-12 hex UUID. Delivr stores it in lower case. The all-zero ID is rejected.
maid_typeidfa for iOS or aaid for Android.
platformios or android. idfa needs ios, and aaid needs android.
att_statusiOS only. Must be authorized.
ad_id_opt_outAndroid only. Must be present and false.
android_linkage_consentAndroid only. granted: true, granted_at as a timestamp, and a non-empty text_version.
consentgpc, gpp_string and gpp_sid. See Consent.
session_evidencepublisher_user_ref (1 to 256 bytes), email_verified: true, and verified_at as a timestamp.
scope_modescoped or pooled. Your agreement lists the modes you can send. pooled on Android also needs the clearance recorded in your agreement.
appbundle_id and app_version, both non-empty. store_id is optional and not checked.
observed_atWhen you observed the pair. At most 72 hours old and at most 5 minutes ahead.

Timestamps use RFC 3339, such as 2026-11-22T18:04:11Z. Delivr stores them to the microsecond.

Fields for the other platform are ignored. An iOS item can carry ad_id_opt_out and nothing happens.

Items in one batch that share the same hem_sha256, maid and scope_mode are stored as one pair. Each item still gets its own result.

Hash the email

Delivr checks that hem_sha256 is 64 hex characters. It does not recompute your hash, so a wrong normalization is not caught. Tell Delivr which one you used in hem_normalization.

ValueNormalization before SHA-256
base_v1Remove all leading and trailing whitespace, including tabs and line breaks. Then lower-case the ASCII letters A to Z in the whole address. Leave every other character unchanged.
uid2_v1Do base_v1. Then, for gmail.com and googlemail.com addresses, remove every dot and any +tag from the part before the at sign.

Hash the normalized text as UTF-8 and write the digest as hex. For an address that is not at gmail.com or googlemail.com, both values give the same hash.

Input:       [email protected]
Normalized:  [email protected]
SHA-256:     b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514

Input:       [email protected]
base_v1:     [email protected]
             5f0d1df1fc49e30424381b57b1d4c73e067772a4267dde043a19b026935602c8
uid2_v1:     [email protected]
             d6117306485ed0e50afab3ac871e98f81699151f30281527d63ff5f233656c69

For a withdrawal, send the same hash you ingested. Upper-case and lower-case hex match the same pair. Delivr does not apply an email normalization again, so a hash of a differently normalized address matches nothing.

Consent

gpp_sid lists the GPP sections that apply to the user. Delivr reads gpp_string and checks each section.

  • Every id in gpp_sid must be in gpp_string.
  • Every id in gpp_sid must be a supported US section: US Privacy v1 (id 6), US National (id 7), or a US state section with an id from 8 to 23.
  • A gpp_string that carries a US state section with an id above 23 rejects the item as pair_consent_missing, even when gpp_sid does not list that id. Delivr does not read those sections.
  • Each of those sections must say the user has not opted out of sale, sharing or targeted advertising. A value of "not applicable" does not count.
  • An opt-out in any section Delivr can decode rejects the item as pair_opt_out_signal. This includes a section that is not in gpp_sid.
  • TCF section ids (1, 2 and 5) in gpp_sid reject the item as not_eligible.
  • A missing or unparseable gpp_string rejects the item as pair_consent_missing. So does an empty gpp_sid, an id that is not in the string, or a section Delivr cannot read.
  • consent.gpc: true rejects the item as pair_opt_out_signal. A GPC flag set inside a section's GPC subsection is also an opt-out. If you omit gpc, Delivr reads it as false.

Item results

Delivr applies the rules in the order below. The first rule an item breaks sets its code.

OrdercodeWhat it meansWhat to do
1pair_invalid_hemhem_sha256 is not 64 hex characters, or hem_normalization is not uid2_v1 or base_v1.Fix the value. Send the item in a new batch.
2pair_invalid_maidmaid is not an 8-4-4-4-12 hex UUID, or maid_type is not idfa or aaid.Fix the value. Send the item in a new batch.
3pair_zero_maidmaid is the all-zero ID.Do not send the item. The device has no usable ID.
4pair_platform_mismatchidfa is not on ios, or aaid is not on android.Fix platform or maid_type.
5pair_att_not_authorizediOS att_status is not authorized.Do not send the item.
6pair_ad_id_opt_outAndroid ad_id_opt_out is missing or true.Do not send the item.
7pair_linkage_consent_missingAndroid linkage consent is not granted, has no valid granted_at, or has no text_version.Send the item only with a recorded grant.
8pair_opt_out_signalconsent.gpc is true.Do not send the item.
9pair_consent_missing, not_eligible or pair_opt_out_signalThe GPP rules in Consent.Fix gpp_string and gpp_sid, or do not send the item.
10pair_session_evidence_missingverified_at is not a valid timestamp, email_verified is not true, or publisher_user_ref is empty or over 256 bytes.Send the item after the user verifies the email.
11pair_scope_mode_not_permittedscope_mode is not scoped or pooled, or your agreement does not permit it.Send a mode your agreement lists. Contact your representative to change the agreement.
12pair_platform_not_permittedYour agreement does not cover the platform.Contact your representative.
13pair_invalid_appapp.bundle_id or app.app_version is empty.Send both.
14pair_stale_observationobserved_at is not a valid timestamp, is over 72 hours old, or is over 5 minutes ahead.Send pairs within 72 hours. Check your server clock.
After 14not_eligibleThe hashed email is on a Delivr suppression list. Or the advertising ID is on California's DROP device deletion list. Or the item has a withdrawal that is not older than observed_at.Do not retry.

not_eligible has four causes, and the response does not say which one applied. A TCF section id, a suppression list match, a listed device and a withdrawal all return the same code. Treat it as final for that item.

Delivr checks each advertising ID against the DROP device deletion list when the item arrives. Delivr also deletes stored pairs whose advertising ID is on the list. Delivr runs this deletion hourly, as it does for hashed emails on Delivr's suppression list. A pass skips a list that Delivr cannot read.

A withdrawal blocks an item when its withdrawn_at is at or after the item's observed_at. This applies to the item's hashed email and to its advertising ID. Delivr accepts the pair again only when observed_at is after withdrawn_at.

Responses

Each POST response lists one result per item, in request order. The GET summary has its own response, described in Check what is stored.

FieldMeaning
receipt_idIdentifies the stored batch. null for a test key.
testtrue when a test key ran the checks and stored nothing.
accepted, rejectedThe item counts.
items[].statusaccepted or rejected.
items[].codeThe reason for a rejection. Absent when accepted.
items[].removedWithdrawals only. The number of stored pairs the item deleted.

The status is 200 when every item is accepted. It is 207 when at least one item is rejected. A batch where every item is rejected also returns 207, with accepted at 0. Read the item results, not only the status.

{
  "receipt_id": "5b0c1f7e-3d2a-4c8e-9a41-7e6f2d1b0c93",
  "test": false,
  "accepted": 1,
  "rejected": 1,
  "items": [
    { "item_key": "ios-0001", "status": "accepted" },
    { "item_key": "android-0002", "status": "rejected", "code": "pair_ad_id_opt_out" }
  ]
}

A replayed response has "test": false and the stored receipt_id.

Withdraw pairs

Send a withdrawal when a user withdraws consent or asks you to delete their data. Name a hashed email, an advertising ID, or both.

A withdrawal removes matching pairs only in the project your API key is bound to. If you sent the same user's pairs under more than one project, send the withdrawal with a key for each project. If you sent more than one hash for the same user, for example both a base_v1 and a uid2_v1 hash, send a withdrawal item for each hash.

curl -X POST "https://api.delivr.ai/api/v1/pairs/withdrawals" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Idempotency-Key: 2c7e5a90-1b3d-4f68-a4e2-8d9c0b1a2f3e" \
  -H "Content-Type: application/json" \
  -d '{
    "schema_version": "1",
    "items": [
      {
        "item_key": "wd-0001",
        "hem_sha256": "b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514",
        "withdrawn_at": "2026-11-23T09:30:00Z"
      },
      {
        "item_key": "wd-0002",
        "maid": "3f2b9c1a-7d4e-4a68-8b05-c9e1d2f3a4b5",
        "withdrawn_at": "2026-11-23T09:30:00Z"
      }
    ]
  }'
{
  "receipt_id": "0e9d8c7b-6a5f-4e3d-8c2b-1a0f9e8d7c6b",
  "test": false,
  "accepted": 2,
  "rejected": 0,
  "items": [
    { "item_key": "wd-0001", "status": "accepted", "removed": 1 },
    { "item_key": "wd-0002", "status": "accepted", "removed": 0 }
  ]
}

Each item uses these rules. The first rule it breaks sets its code.

codeWhat it means
pair_invalid_subjectThe item has neither hem_sha256 nor maid.
pair_invalid_hemhem_sha256 is not 64 hex characters.
pair_invalid_maidmaid is not an 8-4-4-4-12 hex UUID.
pair_zero_maidmaid is the all-zero ID.
pair_invalid_withdrawn_atwithdrawn_at is not a valid timestamp, or is over 5 minutes ahead.
  • withdrawn_at can be any time in the past, and at most 5 minutes ahead.
  • If an item names both a hashed email and an advertising ID, it deletes the stored pairs that match either one.
  • removed counts stored pairs, one for each combination of hashed email, advertising ID and scope mode. It is 0 when nothing matched. A 0 is still an accepted withdrawal, and it still blocks older observations.
  • Delivr honors withdrawals when ingest is not enabled for your organization. It also honors them after your agreement ends. A project that never had an agreement gets pairs.no_agreement.
  • A test key validates the items and removes nothing. Accepted items carry no removed.

Check what is stored

Use GET /api/v1/pairs/summary as a check on your project's activity. It shows what Delivr holds, the daily budget you have used, and the most common reject codes.

The summary does not confirm one batch, because different batches can give the same numbers. To confirm a batch, read the response to the live POST request and its receipt_id.

curl "https://api.delivr.ai/api/v1/pairs/summary" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET"
{
  "test": false,
  "agreement": {
    "in_force": true,
    "scope_modes": ["scoped"],
    "platforms": ["ios", "android"],
    "effective_from": "2026-10-01T00:00:00Z",
    "effective_to": null
  },
  "stored": {
    "pairs": 1652,
    "by_scope_and_platform": [
      { "scope_mode": "scoped", "platform": "android", "pairs": 640 },
      { "scope_mode": "scoped", "platform": "ios", "pairs": 1012 }
    ]
  },
  "daily_budget": {
    "limit": 5000,
    "accepted_today": 212,
    "resets_at": "2026-11-27T00:00:00Z"
  },
  "last_30_days": {
    "ingest": {
      "requests": 14,
      "items": 1840,
      "accepted": 1792,
      "rejected": 48,
      "reject_codes": [
        { "code": "pair_stale_observation", "items": 31 },
        { "code": "pair_ad_id_opt_out", "items": 12 },
        { "code": "not_eligible", "items": 5 }
      ]
    },
    "withdrawals": {
      "requests": 3,
      "items": 5,
      "accepted": 5
    }
  },
  "last_received_at": "2026-11-26T14:22:09Z"
}

The route follows these rules:

  • Send X-Api-Key and X-Api-Secret. Send no body, no Idempotency-Key and no query string. Any query string returns 400 with pairs.query_not_allowed.
  • Use a key bound to one project, with API secret required on. The summary covers that project only.
  • The project needs any agreement it has ever had. A project that never had one gets 403 with pairs.no_agreement. An ended agreement still works.
  • The summary works when ingest is not enabled for your organization.
  • A test key and a live key return the same real numbers for the project. A test key does not return sample data. Check test to see which key you used.
  • The route shares the rate limit of 2 requests per second for each organization with the two POST routes.
FieldMeaning
testtrue for a test key, false for a live key.
agreement.in_forcetrue when the agreement is in effect now. If none is in effect, the response shows your newest agreement with false.
agreement.scope_modes, agreement.platformsThe scope modes and platforms the agreement lets you send.
agreement.effective_from, agreement.effective_toWhen the agreement starts and ends. effective_to is null when it has no end date.
stored.pairsThe number of pairs stored for the project. One pair is one combination of hashed email, advertising ID and scope mode.
stored.by_scope_and_platformThe same count by scope_mode and platform, sorted by scope mode and then platform. The list is empty when nothing is stored.
daily_budget.limitThe daily limit on accepted ingest items.
daily_budget.accepted_todayThe items accepted since 00:00 UTC. This counts your whole organization, not only this project.
daily_budget.resets_atThe next 00:00 UTC.
last_30_days.ingestThe requests and items of the stored live ingest requests of your project in the last 30 days. rejected is items minus accepted.
last_30_days.ingest.reject_codesEach reject code and its item count for those requests, with the highest count first. The list is empty when no item was rejected.
last_30_days.withdrawalsThe requests, items and accepted items of the stored live withdrawal requests of your project in the last 30 days.
last_received_atWhen Delivr last stored a send or withdrawal request from your project. This is not limited to 30 days. It is null if there is none.

The 30-day numbers count only requests that Delivr stored. A test request stores nothing, and a replay of an earlier request does not count twice. A request refused before Delivr stores it, such as one over the daily budget, is not counted.

StatuscodeFix
400pairs.query_not_allowedRemove the query string.
401See Errors.Send a valid key and secret.
403pairs.project_binding_required, pairs.secret_required, pairs.no_agreementSee Errors.
429See Limits.Wait for Retry-After.
500internalRetry the request.

How your pairs are used

Delivr uses the pairs you send to add device IDs to your own audience deliveries. It delivers to DelivrDSP device ID lists and to The Trade Desk. Pairs are never used for another project.

DelivrDSP is being replaced by The Trade Desk. DelivrDSP delivery works as described here until then.

To use your pairs, export one of your audiences from your project. See Activate an Audience in DelivrDSP and Send an Audience to The Trade Desk.

DestinationWhen a withdrawn pair or an ended agreement removes the device ID
DelivrDSPOn the next export that updates the list.
The Trade DeskWithin 7 days of the device ID's last refresh, once no export sends that device ID from an eligible pair in your project to the same segment with The Trade Desk accepting that device ID.

DelivrDSP

  • Select maid as the only identifier to use cumulative or regenerative mode.
  • If the export lists several identifiers that include maid, use regenerative mode. A cumulative export with several identifiers takes no pairs.

Each export run follows these rules:

  • Delivr adds advertising IDs from your pairs to the device IDs it already finds for the audience. It adds an ID when your pair's hashed email belongs to a person in the audience who has not opted out.
  • A regenerative export uses the audience as it is at the run. A cumulative export also looks up pairs for the hashed emails it kept from earlier runs, for people who have not opted out.
  • Delivr uses only pairs stored in the same project as the export, under an agreement that is in force. Your pairs never enter another project's list or Delivr's shared identity data.
  • If you withdraw a pair, the next successful export removes its advertising ID when only your withdrawn pairs supplied it. Removal is not instant.
  • If your agreement ends, the next successful export removes the advertising IDs that only your pairs supplied.
  • Delivr's own identity data can supply the same advertising ID. In that case the ID stays in the list after a withdrawal or after the agreement ends. The DelivrDSP minimum of 1,000 device IDs still applies to the list.
  • DelivrDSP needs at least 1,000 device IDs in a list. If the list has fewer, Delivr does not create it.
  • If a list that already exists falls below 1,000 device IDs, Delivr empties it. The list stays attached to the campaign and matches no device. If the new total is between 1 and 999, the run also reports that the list is below the minimum.
  • If the audience has no people and Delivr cannot confirm that it is empty, the run leaves the existing list as it was.
  • If a run cannot read the whole audience or all of your pairs, Delivr leaves the list as it was and tries again.
  • If a list reaches its size cap, the export stays active and the next run still updates the list.

The Trade Desk

When you send one of your audiences to The Trade Desk, Delivr also sends the device IDs from your own pairs. Delivr adds them to the same segment as the UID2 and TDID members.

  • Delivr uses only your project's own pairs, under an agreement that is in force. People who opted out are left out.
  • Delivr uploads each device ID with a time to live of 7 days at most. Each run sends it again, and The Trade Desk refreshes each device ID it accepts. A device ID that The Trade Desk rejects can expire after its last accepted upload, even when the export completes.
  • Once no eligible pair in your project supplies a device ID, Delivr stops refreshing it. The device ID then expires within 7 days of its last refresh. A segment belongs to one audience and one advertiser, so a second export of the same audience to the same advertiser uploads to it too. Another export refreshes the device ID only when it sends that device ID from an eligible pair to the same segment and The Trade Desk accepts that device ID. That pair's hashed email must be in the audience of that upload. Withdrawing one pair therefore does not always remove the device ID.
  • Schedule the export daily. A device ID can expire if more than 7 days pass between accepted refreshes, and a weekly schedule can pass that limit.
  • Pair device IDs add reach only. They do not change the number of people in a run or the quantity billed for partner data. Delivr bills the impressions The Trade Desk reports for the synced segment, under your agreement. More reach can add billed impressions.
  • If Delivr cannot look up your pairs, the regular upload continues. Delivr stops looking up pairs for the rest of that run. Pair device IDs that earlier batches in the run refreshed stay in the segment. The next run looks them up again.
  • If a spend limit pauses an export, Delivr queues the removal of its audience from The Trade Desk. It clears the device IDs it can still find, and it retries a failed removal with a growing delay. Any pair device IDs it cannot find can still serve impressions until they expire, up to 7 days after their last refresh.
  • If you delete an export, Delivr queues no removal. Its device IDs expire within 7 days of their last refresh. Another export refreshes a device ID only when it sends that device ID from an eligible pair to the same segment and The Trade Desk accepts that device ID.

Audiences sold or shared with other parties are not built. These are also not built: pooled mode into Delivr's shared identity data, delivery to other destinations, revenue share and statements. Only maid device ID lists take pairs in DelivrDSP. Segment exports to DelivrDSP take none.

Limits

LimitValueWhen you exceed it
Items per POST request500413, code pairs.too_many_items.
POST body size1 MiB413, code pairs.body_too_large.
Request rate2 requests per second for each organization, across all three routes. Test and live keys share it.429 with Retry-After.
Daily accepted items5,000 for each organization, counted from 00:00 UTC.429, code pairs.daily_budget_exceeded.

The daily budget counts accepted ingest items. Rejected items, withdrawals, replays and test requests do not count. A batch that would pass the budget is refused whole and stores nothing. Retry it after 00:00 UTC, or ask your representative about a higher budget.

The rate limit applies per organization, so all of your keys share one allowance of 2 requests per second. A response to a request that passed authentication also carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. A 401 does not.

Errors

Errors from Pairs use one JSON body. Branch on code, not on message. help_url is an empty string for these errors. Quote request_id when you contact support.

{
  "message": "This project has no publisher agreement that permits this request.",
  "type": "forbidden",
  "code": "pairs.no_agreement",
  "help_url": "",
  "request_id": "d4b1f0a2-5c3e-4e8a-9b7d-1a2b3c4d5e6f"
}

The body and idempotency codes, 404, 409, 413, 503 and the daily budget 429 apply to the POST routes only. The GET summary returns only pairs.query_not_allowed, the 403 codes, 500 and the gateway errors below.

StatuscodeFix
400request.invalidThe body is not valid JSON, has an unknown field, or has a field of the wrong type. A wrong type adds a fields list.
400pairs.idempotency_key_invalidSend Idempotency-Key with 1 to 255 bytes.
400pairs.query_not_allowedRemove the query string.
400pairs.schema_version_unsupportedSend "schema_version": "1" as a string.
400pairs.items_requiredSend at least one item.
400pairs.item_key_invalidGive every item an item_key of 1 to 128 bytes.
400pairs.item_key_duplicateMake every item_key unique in the batch.
403pairs.project_binding_requiredUse a key bound to one project.
403pairs.secret_requiredUse a key whose API client requires its secret.
403pairs.no_agreementThe project has no agreement for this request. Sending pairs needs an agreement in force. Withdrawals and the summary need any agreement the project has had. Contact your representative.
404nonePairs is not enabled for your organization. The body is the text 404 page not found, not JSON. Contact your representative.
409pairs.idempotency_conflictYou used this key with a different body. Send the batch with a new key.
413pairs.too_many_items, pairs.body_too_largeSplit the batch.
429pairs.daily_budget_exceededRetry after 00:00 UTC.
500internalRetry a POST with the same Idempotency-Key. Retry a GET as it is.
503pairs.suppression_unavailableDelivr could not read a suppression list, so it refused the whole batch. Retry with the same Idempotency-Key.

A 503 with pairs.suppression_unavailable stores nothing. It applies to a new ingest request in which at least one item passes the earlier item rules. It covers the hashed email suppression list and the DROP device deletion list. A test key gets it too. A replay of a stored request returns the stored response. A batch in which every item fails an earlier rule returns 207, because Delivr needs no list for those items.

A 404 on POST /api/v1/pairs means your organization is not enabled. The same path does not return 404 for a project without an agreement. That case returns 403. The withdrawal and summary routes never return this 404.

The gateway answers before Pairs does. It returns these in a different JSON shape, with error, code and help_url.

StatuscodeFix
401api_key_required, api_key_invalid_format, api_key_invalid, api_key_inactive, api_key_expired, api_key_disabledSee Authentication.
401api_secret_required, api_secret_invalidSend the secret that was issued with the key.
429noneYou passed the request rate limit. The body is {"error": "Rate limit exceeded"}. Wait for Retry-After.
503auth_unavailableWait for Retry-After, then retry.

Two different 429 responses exist. The rate limit body has only error. The daily budget body has code and no Retry-After header.


Did this page help you?