SapaganDocs sapagan.com

API reference

Stores

Marketplace workspaces only. Stores, their policies, health, audiences, flows and reports. Own-brand workspaces answer 404.

Marketplace workspaces only. Stores, their policies, health, audiences, flows and reports. Own-brand workspaces answer 404.

GET /v1/flow-reviews#

Store flow content waiting for review, oldest first (workspace keys and console sessions)

The newest version of each flow, in review; aiReview is null while the AI has not answered, otherwise a person decides.

Accepted keys Server key

Parameters

NameInTypeNotes
limitqueryinteger
curl -X GET "$SAPAGAN_URL/v1/flow-reviews" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "items": [
    {
      "versionId": "<versionId>",
      "key": "post_purchase",
      "version": 1,
      "status": "in_review",
      "content": {
        "title": "Pesanan dikirim",
        "body": "Pesanan #1042 sedang dalam perjalanan.",
        "destination": {}
      },
      "delayMinutes": 1,
      "submittedAt": "<submittedAt>",
      "submittedBy": "<submittedBy>",
      "store": {
        "id": "user-42",
        "name": "order_placed",
        "trustTier": "red"
      },
      "aiReview": {
        "verdict": "<verdict>",
        "flags": [
          "<flags>"
        ],
        "reason": "Checked with the owner",
        "confidence": 1,
        "createdAt": "<createdAt>"
      }
    }
  ]
}

GET /v1/flow-reviews/{id}#

One version of a store's flow content, with the AI's review

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/flow-reviews/user-42" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "versionId": "<versionId>",
  "key": "post_purchase",
  "version": 1,
  "status": "in_review",
  "content": {
    "title": "Pesanan dikirim",
    "body": "Pesanan #1042 sedang dalam perjalanan.",
    "imageUrl": "<imageUrl>",
    "destination": {}
  },
  "delayMinutes": 1,
  "submittedAt": "<submittedAt>",
  "submittedBy": "<submittedBy>",
  "store": {
    "id": "user-42",
    "name": "order_placed",
    "trustTier": "red"
  },
  "aiReview": {
    "verdict": "<verdict>",
    "flags": [
      "<flags>"
    ],
    "reason": "Checked with the owner",
    "confidence": 1,
    "createdAt": "<createdAt>"
  }
}

GET /v1/flow-reviews/{id}/image#

The flow content's image as Sapagan fetches it, with its SHA-256 (for the reviewer)

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/flow-reviews/user-42/image" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found, 409 Conflict. Errors use the error body.

Example response 200

{
  "url": "https://example.com",
  "contentType": "<contentType>",
  "sha256": "<sha256>",
  "size": 1,
  "dataBase64": "<dataBase64>"
}

GET /v1/scope-appeals#

Open appeals against store blocks, oldest first (workspace keys only; the review queue's appeal entries)

Accepted keys Server key

Parameters

NameInTypeNotes
limitqueryinteger
curl -X GET "$SAPAGAN_URL/v1/scope-appeals" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "appeals": [
    {
      "id": "user-42",
      "scopeId": "<scopeId>",
      "blockId": "<blockId>",
      "message": "<message>",
      "status": "open",
      "submittedBy": "<submittedBy>",
      "submittedAt": "<submittedAt>",
      "decidedAt": "<decidedAt>",
      "decidedBy": "<decidedBy>",
      "decisionNote": "<decisionNote>",
      "block": {
        "id": "user-42",
        "scopeId": "<scopeId>",
        "category": "spam",
        "reason": "Checked with the owner",
        "startsAt": "<startsAt>",
        "endsAt": "<endsAt>",
        "permanent": true,
        "createdBy": "<createdBy>",
        "endedAt": "<endedAt>",
        "endReason": "<endReason>",
        "endedBy": "<endedBy>",
        "endNote": "<endNote>"
      }
    }
  ]
}

POST /v1/scope-appeals/{id}/decision#

Grant (lifts the block) or deny an appeal (workspace keys only); the note is shown to the seller; audited

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required

Request body

FieldTypeNotes
decision required"grant" | "deny"
note requiredstringmin 1, max 2000
curl -X POST "$SAPAGAN_URL/v1/scope-appeals/user-42/decision" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "decision": "grant",
    "note": "Looks good"
  }'

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found, 409 Conflict. Errors use the error body.

Example response 200

{
  "appeal": {
    "id": "user-42",
    "scopeId": "<scopeId>",
    "blockId": "<blockId>",
    "message": "<message>",
    "status": "open",
    "submittedBy": "<submittedBy>",
    "submittedAt": "<submittedAt>",
    "decidedAt": "<decidedAt>",
    "decidedBy": "<decidedBy>",
    "decisionNote": "<decisionNote>"
  },
  "block": {
    "id": "user-42",
    "scopeId": "<scopeId>",
    "category": "spam",
    "reason": "Checked with the owner",
    "startsAt": "<startsAt>",
    "endsAt": "<endsAt>",
    "permanent": true,
    "createdBy": "<createdBy>",
    "endedAt": "<endedAt>",
    "endReason": "<endReason>",
    "endedBy": "<endedBy>",
    "endNote": "<endNote>"
  }
}

GET /v1/scope-health-appeals#

Open appeals against automatic pauses, oldest first (workspace keys only; the review queue's entries)

Accepted keys Server key

Parameters

NameInTypeNotes
limitqueryinteger
curl -X GET "$SAPAGAN_URL/v1/scope-health-appeals" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "appeals": [
    {
      "id": "user-42",
      "scopeId": "<scopeId>",
      "pauseId": "<pauseId>",
      "message": "<message>",
      "status": "open",
      "submittedBy": "<submittedBy>",
      "submittedAt": "<submittedAt>",
      "decidedAt": "<decidedAt>",
      "decidedBy": "<decidedBy>",
      "decisionNote": "<decisionNote>",
      "pause": {
        "id": "user-42",
        "scopeId": "<scopeId>",
        "reasons": [
          "complaint_rate"
        ],
        "signals": {},
        "stepBefore": 1,
        "stepAfter": 1,
        "trustBefore": "<trustBefore>",
        "trustAfter": "<trustAfter>",
        "pausedAt": "<pausedAt>",
        "alertedAt": "<alertedAt>",
        "endedAt": "<endedAt>",
        "endReason": "resumed",
        "endedBy": "<endedBy>",
        "endNote": "<endNote>"
      }
    }
  ]
}

POST /v1/scope-health-appeals/{id}/decision#

Grant (ends the automatic pause and resumes the store) or deny an appeal against an automatic pause; operator sessions only (reviewer role; a workspace key is 403 operator_required); the note is shown to the seller; audited

A store an operator paused again by hand since the automatic pause stays paused when the appeal is granted: only the automatic pause ends.

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required

Request body

FieldTypeNotes
decision required"grant" | "deny"
note requiredstringmin 3, max 2000
curl -X POST "$SAPAGAN_URL/v1/scope-health-appeals/user-42/decision" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "decision": "grant",
    "note": "Looks good"
  }'

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found, 409 Conflict. Errors use the error body.

Example response 200

{
  "appeal": {
    "id": "user-42",
    "scopeId": "<scopeId>",
    "pauseId": "<pauseId>",
    "message": "<message>",
    "status": "open",
    "submittedBy": "<submittedBy>",
    "submittedAt": "<submittedAt>",
    "decidedAt": "<decidedAt>",
    "decidedBy": "<decidedBy>",
    "decisionNote": "<decisionNote>"
  },
  "pause": {
    "id": "user-42",
    "scopeId": "<scopeId>",
    "reasons": [
      "complaint_rate"
    ],
    "signals": {},
    "stepBefore": 1,
    "stepAfter": 1,
    "trustBefore": "<trustBefore>",
    "trustAfter": "<trustAfter>",
    "pausedAt": "<pausedAt>",
    "alertedAt": "<alertedAt>",
    "endedAt": "<endedAt>",
    "endReason": "resumed",
    "endedBy": "<endedBy>",
    "endNote": "<endNote>"
  }
}

GET /v1/scope/audience#

The store's own audiences: total, reachable, reach cap and exclusions (scope keys and tokens)

Accepted keys Store key Store token

Parameters

NameInTypeNotes
kindquery"buyers" | "followers" | "buyers_and_followers" | "followers_not_buyers" | "buyers_repeat" | "buyers_one_time" | "buyers_lapsed" | "birthday" | "product_viewers" | "abandoned_cart" | "seller_segment"
daysqueryinteger
windowquery"today" | "next_7_days" | "this_month"
productIdquerystring
segmentIdquerystring
channelquery"push" | "email"
curl -X GET "$SAPAGAN_URL/v1/scope/audience" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 400 Invalid request, 403 Forbidden. Errors use the error body.

Example response 200

{
  "channel": "push",
  "asOf": "<asOf>",
  "audiences": [
    {
      "available": true,
      "spec": {
        "kind": "buyers"
      },
      "key": "<key>",
      "label": "Order service",
      "channel": "push",
      "reason": "source_unavailable",
      "total": 1,
      "reachable": 1,
      "cap": 1,
      "willSend": 1,
      "overCap": 1,
      "excluded": {
        "optedOut": 1,
        "unreachable": 1
      }
    }
  ],
  "unavailableKinds": [
    {
      "kind": "<kind>",
      "label": "Order service",
      "reason": "source_unavailable"
    }
  ]
}

GET /v1/scope/block#

Whether the store is blocked, why, until when, and its appeal (reachable while blocked)

Accepted keys Store key Store token

curl -X GET "$SAPAGAN_URL/v1/scope/block" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "blocked": true,
  "block": {
    "category": "spam",
    "reason": "Checked with the owner",
    "startsAt": "<startsAt>",
    "endsAt": "<endsAt>",
    "permanent": true,
    "appeal": {
      "id": "user-42",
      "status": "open",
      "submittedAt": "<submittedAt>",
      "decidedAt": "<decidedAt>",
      "decisionNote": "<decisionNote>"
    },
    "appealsLeft": 1,
    "canAppeal": true
  }
}

POST /v1/scope/block/appeals#

Ask for a review of the store's block (reachable while blocked); lands in the review queue

Accepted keys Store key Store token

Request body

FieldTypeNotes
message requiredstringmin 1, max 2000
curl -X POST "$SAPAGAN_URL/v1/scope/block/appeals" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "<message>"
  }'

Responses

201 Created, 400 Invalid request, 403 Forbidden, 409 Conflict. Errors use the error body.

Example response 201

{
  "id": "user-42",
  "status": "open",
  "submittedAt": "<submittedAt>"
}

GET /v1/scope/email-sender#

The store's own email From address and display name (scope keys and tokens)

Accepted keys Store key Store token

curl -X GET "$SAPAGAN_URL/v1/scope/email-sender" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "localPart": "<localPart>",
  "address": "<address>",
  "displayName": "<displayName>",
  "domain": "<domain>"
}

GET /v1/scope/flows#

The store's automatic flows: thank you after a purchase and welcome new followers (scope keys and tokens)

Each flow's switch, state (off, in_review, live, paused, rejected with the reason), the content and delay as last saved, the newest and the approved version, and its figures over 30 days (entered, sent, opened, orders; withheld below 5 pushes sent). 404 in an own-brand workspace.

Accepted keys Store key Store token

curl -X GET "$SAPAGAN_URL/v1/scope/flows" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "flows": [
    {
      "key": "post_purchase",
      "enabled": true,
      "status": "off",
      "statusReason": "<statusReason>",
      "content": {
        "title": "Pesanan dikirim",
        "body": "Pesanan #1042 sedang dalam perjalanan.",
        "destination": {}
      },
      "delayMinutes": 1,
      "delay": {
        "min": 1,
        "max": 1,
        "default": 1,
        "choices": [
          1
        ]
      },
      "draftVersion": 1,
      "latest": {
        "version": 1,
        "status": "in_review",
        "content": {
          "title": "Pesanan dikirim",
          "body": "Pesanan #1042 sedang dalam perjalanan.",
          "destination": {}
        },
        "delayMinutes": 1,
        "submittedAt": "<submittedAt>",
        "decidedAt": "<decidedAt>",
        "note": "Looks good"
      },
      "approved": {
        "version": 1,
        "status": "in_review",
        "content": {
          "title": "Pesanan dikirim",
          "body": "Pesanan #1042 sedang dalam perjalanan.",
          "destination": {}
        },
        "delayMinutes": 1,
        "submittedAt": "<submittedAt>",
        "decidedAt": "<decidedAt>",
        "note": "Looks good"
      },
      "planAllows": true,
      "updatedAt": "<updatedAt>",
      "stats": {
        "days": 1,
        "entered": 1,
        "withheld": true,
        "sent": 1,
        "opened": 1,
        "orders": 1,
        "revenue": 1
      }
    }
  ]
}

PUT /v1/scope/flows/{key}#

Switch a flow on or off, or change its push and delay (scope keys and tokens); a change goes to review

content is a store's push (title, body, optional imageUrl on an allowed host, destination: store, catalog, product or voucher). delayMinutes within the flow's bounds. A changed content or delay is a new version for review: until it is approved the flow takes nobody new and sends nothing. Switching on needs a plan with flows (409 plan_required). expectedDraftVersion (the draftVersion read) refuses a lost update with 409 flow_changed.

Accepted keys Store key Store token

Parameters

NameInTypeNotes
keypathstring required

Request body

FieldTypeNotes
enabledboolean
contentany
delayMinutesinteger
expectedDraftVersionintegermin 0
curl -X PUT "$SAPAGAN_URL/v1/scope/flows/welcome" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "content": null,
    "delayMinutes": 1,
    "expectedDraftVersion": 0
  }'

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found, 409 Conflict. Errors use the error body.

Example response 200

{
  "flow": {
    "key": "post_purchase",
    "enabled": true,
    "status": "off",
    "statusReason": "<statusReason>",
    "content": {
      "title": "Pesanan dikirim",
      "body": "Pesanan #1042 sedang dalam perjalanan.",
      "imageUrl": "<imageUrl>",
      "destination": {}
    },
    "delayMinutes": 1,
    "delay": {
      "min": 1,
      "max": 1,
      "default": 1,
      "choices": [
        1
      ]
    },
    "draftVersion": 1,
    "latest": {
      "version": 1,
      "status": "in_review",
      "content": {
        "title": "Pesanan dikirim",
        "body": "Pesanan #1042 sedang dalam perjalanan.",
        "destination": {}
      },
      "delayMinutes": 1,
      "submittedAt": "<submittedAt>",
      "decidedAt": "<decidedAt>",
      "note": "Looks good"
    },
    "approved": {
      "version": 1,
      "status": "in_review",
      "content": {
        "title": "Pesanan dikirim",
        "body": "Pesanan #1042 sedang dalam perjalanan.",
        "destination": {}
      },
      "delayMinutes": 1,
      "submittedAt": "<submittedAt>",
      "decidedAt": "<decidedAt>",
      "note": "Looks good"
    },
    "planAllows": true,
    "updatedAt": "<updatedAt>",
    "stats": {
      "days": 1,
      "entered": 1,
      "withheld": true,
      "sent": 1,
      "opened": 1,
      "orders": 1,
      "revenue": 1
    }
  }
}

GET /v1/scope/health#

Whether the store is paused for its health, why, its appeal, and its ramp progress (scope keys and tokens)

Aggregates of the store's own sends only: rates rounded to 0.1 percentage point, every number withheld (withheld) below 5 sends. Never a buyer.

Accepted keys Store key Store token

curl -X GET "$SAPAGAN_URL/v1/scope/health" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "autoPaused": true,
  "pause": {
    "reasons": [
      "complaint_rate"
    ],
    "pausedAt": "<pausedAt>",
    "windowDays": 1,
    "withheld": true,
    "signals": [
      {
        "signal": "complaint_rate",
        "value": 1,
        "threshold": 1
      }
    ],
    "stepBefore": 1,
    "stepAfter": 1,
    "appeal": {
      "id": "user-42",
      "status": "open",
      "submittedAt": "<submittedAt>",
      "decidedAt": "<decidedAt>",
      "decisionNote": "<decisionNote>"
    },
    "appealsLeft": 1,
    "canAppeal": true
  },
  "ramp": {
    "step": 1,
    "campaigns": 1,
    "campaignsNeeded": 1,
    "held": true
  }
}

POST /v1/scope/health/appeals#

Ask for a review of the store's automatic pause; lands in the review queue

Accepted keys Store key Store token

Request body

FieldTypeNotes
message requiredstringmin 1, max 2000
curl -X POST "$SAPAGAN_URL/v1/scope/health/appeals" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "<message>"
  }'

Responses

201 Created, 400 Invalid request, 403 Forbidden, 409 Conflict. Errors use the error body.

Example response 201

{
  "id": "user-42",
  "status": "open",
  "submittedAt": "<submittedAt>"
}

GET /v1/scope/policy#

The store's own policy: tier, reach cap, quotas, trust tier, ramp step, pause state (scope keys and tokens)

quietHours is the window in which marketing is not sent (wall clock in timeZone, the workspace's): a broadcast scheduled inside it moves to its end (P1-06).

Accepted keys Store key Store token

curl -X GET "$SAPAGAN_URL/v1/scope/policy" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "scopeId": "<scopeId>",
  "stored": true,
  "planCode": "<planCode>",
  "tier": "free",
  "trustTier": "red",
  "rampStep": 1,
  "reachCap": 1,
  "effectiveReachCap": 1,
  "fullReachCap": 1,
  "quotas": {},
  "monthlyQuota": {
    "push": 1,
    "email": 1,
    "inapp": 1
  },
  "dailyMax": 1,
  "effectiveDailyMax": 1,
  "campaignsPerWeek": 1,
  "allowedChannels": [
    "push"
  ],
  "frequencyCap": {},
  "segmentCooldownHours": 1,
  "contactAccess": "masked",
  "status": "<status>",
  "paused": true,
  "pausedReason": "<pausedReason>",
  "pausedAt": "<pausedAt>",
  "updatedAt": "<updatedAt>",
  "quietHours": {
    "start": "<start>",
    "end": "<end>",
    "timeZone": "<timeZone>"
  }
}

GET /v1/scope/products#

Search the store's own products (scope keys and tokens)

The credential's own store only: there is no store parameter, and another store's product id in ids is simply absent. Archived and deleted listings are left out. Products come from the Toco connector's product sync (a few minutes behind Toco).

Accepted keys Store key Store token

Parameters

NameInTypeNotes
qquerystringWords of the product's name, anywhere in it, any case.
idsquerystringComma-separated listing ids (at most 50): exactly these, when they are the store's own and live.
cursorquerystring
limitqueryinteger
curl -X GET "$SAPAGAN_URL/v1/scope/products" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "products": [
    {
      "id": "user-42",
      "name": "order_placed",
      "imageUrl": "<imageUrl>",
      "price": 1,
      "specialPrice": 1,
      "stock": 1,
      "sold": 1,
      "updatedAt": "<updatedAt>"
    }
  ],
  "nextCursor": "<nextCursor>"
}

GET /v1/scope/reports#

The store's own report: sent, opened, clicked, orders and revenue per campaign and per day, week or month (store credentials)

Campaigns dispatched from from to to (days in the workspace's time zone, both included; default the last 30 days, at most 366), optionally one channel. A campaign counts in the period it was dispatched, with every open, click and order attributed to it. Each campaign is P1-10's store view: fewer than 5 sent, every number null and the campaign left out of the sums; 1 to 4 not sent, sent rounded. flows holds the store's automatic flows per flow and period (the same withheld rule; a flow's numbers count on the day they happened; its orders are never a campaign's). Aggregates only: no person, recipient or reason. A range holding more than 2,000 campaigns is 400 too_many_campaigns (never cut); 429 past 30 reports a minute per store; 503 report_timeout when a statement runs past 5 seconds.

Accepted keys Store key Store token

Parameters

NameInTypeNotes
fromquerystring
toquerystring
granularityquery"day" | "week" | "month"
channelquery"push" | "email" | "inapp"
curl -X GET "$SAPAGAN_URL/v1/scope/reports" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 400 Invalid request, 403 Forbidden, 429 Rate limited, 503 Unavailable. Errors use the error body.

Example response 200

{
  "timeZone": "<timeZone>",
  "from": "<from>",
  "to": "<to>",
  "granularity": "day",
  "channel": "push",
  "currency": "<currency>",
  "opensTracked": true,
  "totals": {
    "campaigns": 1,
    "withheldCampaigns": 1,
    "roundedCampaigns": 1,
    "sent": 1,
    "opened": 1,
    "clicked": 1,
    "orders": 1,
    "revenue": 1,
    "openRate": 1,
    "clickRate": 1
  },
  "periods": [
    {
      "campaigns": 1,
      "withheldCampaigns": 1,
      "roundedCampaigns": 1,
      "sent": 1,
      "opened": 1,
      "clicked": 1,
      "orders": 1,
      "revenue": 1,
      "openRate": 1,
      "clickRate": 1,
      "start": "<start>"
    }
  ],
  "campaigns": [
    {
      "id": "user-42",
      "name": "order_placed",
      "channel": "push",
      "dispatchedAt": "<dispatchedAt>",
      "period": "<period>",
      "withheld": true,
      "rounded": true,
      "sent": 1,
      "opened": 1,
      "clicked": 1,
      "orders": 1,
      "revenue": 1,
      "openRate": 1,
      "clickRate": 1
    }
  ],
  "flows": {
    "totals": {
      "rows": 1,
      "withheldRows": 1,
      "sent": 1,
      "opened": 1,
      "orders": 1,
      "revenue": 1,
      "openRate": 1
    },
    "periods": [
      {
        "rows": 1,
        "withheldRows": 1,
        "sent": 1,
        "opened": 1,
        "orders": 1,
        "revenue": 1,
        "openRate": 1,
        "start": "<start>"
      }
    ],
    "rows": [
      {
        "flow": "post_purchase",
        "period": "<period>",
        "withheld": true,
        "sent": 1,
        "opened": 1,
        "orders": 1,
        "revenue": 1
      }
    ]
  }
}

GET /v1/scope/usage#

The store's own campaign usage this calendar month (workspace time zone)

Accepted keys Store key Store token

Parameters

NameInTypeNotes
atquerystring (date-time)
curl -X GET "$SAPAGAN_URL/v1/scope/usage" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "scopeId": "<scopeId>",
  "period": "<period>",
  "timeZone": "<timeZone>",
  "dailyMax": 1,
  "channels": [
    {
      "channel": "push",
      "used": 1,
      "extra": 1,
      "credits": 1,
      "quota": 1,
      "remaining": 1
    }
  ]
}

GET /v1/scopes#

The workspace's stores with tier, pause and block state (workspace keys only); blocked first, then paused, then by name

Accepted keys Server key

Parameters

NameInTypeNotes
qquerystring
filterquery"all" | "blocked" | "paused"
limitqueryinteger
offsetqueryinteger
curl -X GET "$SAPAGAN_URL/v1/scopes" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "total": 1,
  "scopes": [
    {
      "id": "user-42",
      "type": "<type>",
      "externalId": "user-42",
      "name": "order_placed",
      "status": "<status>",
      "shortName": "<shortName>",
      "tier": "<tier>",
      "trustTier": "<trustTier>",
      "pausedReason": "<pausedReason>",
      "blocked": true,
      "blockEndsAt": "<blockEndsAt>",
      "blockCategory": "<blockCategory>"
    }
  ]
}

GET /v1/scopes/{id}#

Read a scope

Accepted keys Server key Store key Store token

Parameters

NameInTypeNotes
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 404 Not found. Errors use the error body.

Example response 200

{
  "id": "user-42",
  "type": "<type>",
  "externalId": "user-42",
  "name": "order_placed",
  "status": "<status>",
  "shortName": "<shortName>"
}

GET /v1/scopes/{id}/audience#

A store's audiences with the full exclusion waterfall (workspace keys only)

Accepted keys Server key

Parameters

NameInTypeNotes
kindquery"buyers" | "followers" | "buyers_and_followers" | "followers_not_buyers" | "buyers_repeat" | "buyers_one_time" | "buyers_lapsed" | "birthday" | "product_viewers" | "abandoned_cart" | "seller_segment"
daysqueryinteger
windowquery"today" | "next_7_days" | "this_month"
productIdquerystring
segmentIdquerystring
channelquery"push" | "email" | "inapp"
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42/audience" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "channel": "push",
  "asOf": "<asOf>",
  "audiences": [
    {
      "available": true,
      "spec": {
        "kind": "buyers"
      },
      "key": "<key>",
      "label": "Order service",
      "channel": "push",
      "reason": "source_unavailable",
      "detail": "<detail>",
      "total": 1,
      "reachable": 1,
      "cap": 1,
      "willSend": 1,
      "overCap": 1,
      "excluded": {
        "unsubscribed": 1,
        "no_consent": 1,
        "seller_optout": 1,
        "suppressed": 1,
        "no_address": 1
      },
      "dropped": {
        "profileGone": 1
      }
    }
  ],
  "unavailableKinds": [
    {
      "kind": "<kind>",
      "label": "Order service",
      "reason": "source_unavailable",
      "detail": "<detail>"
    }
  ]
}

POST /v1/scopes/{id}/block#

Block a store for wrong activity, for some days or permanently (workspace keys only); audited

While blocked: the store's scope keys and tokens get 403 store_blocked except on GET /v1/scope/block and POST /v1/scope/block/appeals; nothing is sent (sendGate scope_blocked); scheduled broadcasts are cancelled and flows paused by the block hooks.

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required

Request body

FieldTypeNotes
category required"spam" | "misleading_offers" | "prohibited_products" | "harassment" | "other"
reason requiredstringmin 3, max 2000
daysintegermin 1, max 365
permanenttrue
curl -X POST "$SAPAGAN_URL/v1/scopes/user-42/block" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "spam",
    "reason": "Checked with the owner"
  }'

Responses

201 Created, 400 Invalid request, 403 Forbidden, 404 Not found, 409 Conflict. Errors use the error body.

Example response 201

{
  "id": "user-42",
  "scopeId": "<scopeId>",
  "category": "spam",
  "reason": "Checked with the owner",
  "startsAt": "<startsAt>",
  "endsAt": "<endsAt>",
  "permanent": true,
  "createdBy": "<createdBy>",
  "endedAt": "<endedAt>",
  "endReason": "<endReason>",
  "endedBy": "<endedBy>",
  "endNote": "<endNote>"
}

GET /v1/scopes/{id}/blocks#

A store's blocks, newest first, with their appeals (workspace keys only)

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42/blocks" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "blocks": [
    {
      "id": "user-42",
      "scopeId": "<scopeId>",
      "category": "spam",
      "reason": "Checked with the owner",
      "startsAt": "<startsAt>",
      "endsAt": "<endsAt>",
      "permanent": true,
      "createdBy": "<createdBy>",
      "endedAt": "<endedAt>",
      "endReason": "<endReason>",
      "endedBy": "<endedBy>",
      "endNote": "<endNote>",
      "appeals": [
        {
          "id": "user-42",
          "scopeId": "<scopeId>",
          "blockId": "<blockId>",
          "message": "<message>",
          "status": "open",
          "submittedBy": "<submittedBy>",
          "submittedAt": "<submittedAt>",
          "decidedAt": "<decidedAt>",
          "decidedBy": "<decidedBy>",
          "decisionNote": "<decisionNote>"
        }
      ]
    }
  ]
}

GET /v1/scopes/{id}/email-sender#

A store's email From address (workspace keys only)

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42/email-sender" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "localPart": "<localPart>",
  "address": "<address>",
  "displayName": "<displayName>",
  "domain": "<domain>"
}

PUT /v1/scopes/{id}/email-sender#

Set or clear a store's From local part (workspace keys only); audited

localPart is 3 to 40 lowercase letters and digits, not a reserved role address (postmaster, abuse, noreply, ...), and unique in the workspace: another store's (or the workspace's own) local part answers 409 local_part_taken. null clears it (the store then sends no email).

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required

Request body

FieldTypeNotes
localPart requiredstring or nullmax 100
reasonstringmax 500
curl -X PUT "$SAPAGAN_URL/v1/scopes/user-42/email-sender" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "localPart": "<localPart>"
  }'

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found, 409 Conflict. Errors use the error body.

Example response 200

{
  "localPart": "<localPart>",
  "address": "<address>",
  "displayName": "<displayName>",
  "domain": "<domain>"
}

GET /v1/scopes/{id}/health#

A store's health: the latest evaluation, the thresholds, ramp evidence and automatic pauses with their appeals (workspace keys only)

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42/health" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "scopeId": "<scopeId>",
  "health": {
    "evaluatedAt": "<evaluatedAt>",
    "windowDays": 1,
    "status": "healthy",
    "counts": {},
    "findings": [
      {
        "signal": "complaint_rate",
        "level": "watch",
        "value": 1,
        "threshold": 1
      }
    ],
    "ramp": {}
  },
  "thresholds": {
    "windowDays": 1,
    "unsubscribeAttributionHours": 1,
    "rejectionWindowDays": 1,
    "unsubscribePauseMinRevokers": 1,
    "promotionMinCampaignSends": 1,
    "thresholds": {
      "complaint_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "bounce_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "unsubscribe_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "invalid_token_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "failure_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "review_rejections": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "open_rate_drop": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      }
    },
    "promotion": {
      "1": {
        "campaigns": 1,
        "minSent": 1,
        "maxComplaintRate": 1,
        "maxUnsubscribeRate": 1
      },
      "2": {
        "campaigns": 1,
        "minSent": 1,
        "maxComplaintRate": 1,
        "maxUnsubscribeRate": 1
      }
    },
    "pauseDropsStep": true,
    "pauseLowersTrust": true,
    "pauseOfficial": true
  },
  "pause": {
    "id": "user-42",
    "scopeId": "<scopeId>",
    "reasons": [
      "complaint_rate"
    ],
    "signals": {},
    "stepBefore": 1,
    "stepAfter": 1,
    "trustBefore": "<trustBefore>",
    "trustAfter": "<trustAfter>",
    "pausedAt": "<pausedAt>",
    "alertedAt": "<alertedAt>",
    "endedAt": "<endedAt>",
    "endReason": "resumed",
    "endedBy": "<endedBy>",
    "endNote": "<endNote>"
  },
  "pauses": [
    {
      "id": "user-42",
      "scopeId": "<scopeId>",
      "reasons": [
        "complaint_rate"
      ],
      "signals": {},
      "stepBefore": 1,
      "stepAfter": 1,
      "trustBefore": "<trustBefore>",
      "trustAfter": "<trustAfter>",
      "pausedAt": "<pausedAt>",
      "alertedAt": "<alertedAt>",
      "endedAt": "<endedAt>",
      "endReason": "resumed",
      "endedBy": "<endedBy>",
      "endNote": "<endNote>",
      "appeals": [
        {
          "id": "user-42",
          "scopeId": "<scopeId>",
          "pauseId": "<pauseId>",
          "message": "<message>",
          "status": "open",
          "submittedBy": "<submittedBy>",
          "submittedAt": "<submittedAt>",
          "decidedAt": "<decidedAt>",
          "decidedBy": "<decidedBy>",
          "decisionNote": "<decisionNote>"
        }
      ]
    }
  ]
}

GET /v1/scopes/{id}/policy#

A store's policy and pause state (workspace keys only)

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42/policy" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "scopeId": "<scopeId>",
  "stored": true,
  "planCode": "<planCode>",
  "tier": "free",
  "trustTier": "red",
  "rampStep": 1,
  "reachCap": 1,
  "effectiveReachCap": 1,
  "fullReachCap": 1,
  "quotas": {},
  "monthlyQuota": {
    "push": 1,
    "email": 1,
    "inapp": 1
  },
  "dailyMax": 1,
  "effectiveDailyMax": 1,
  "campaignsPerWeek": 1,
  "allowedChannels": [
    "push"
  ],
  "frequencyCap": {},
  "segmentCooldownHours": 1,
  "contactAccess": "masked",
  "status": "<status>",
  "paused": true,
  "pausedReason": "<pausedReason>",
  "pausedAt": "<pausedAt>",
  "updatedAt": "<updatedAt>",
  "pausedBy": "<pausedBy>",
  "updatedBy": "<updatedBy>"
}

PUT /v1/scopes/{id}/policy#

Change a store's tier, trust tier, ramp step or overrides (workspace keys only); audited

Absent keys stay as they are; null clears a per-store override back to the tier's value.

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required

Request body

FieldTypeNotes
tier"free" | "starter" | "growth" | "pro"
trustTier"red" | "orange" | "yellow" | "green" | "official"
rampStep1 or 2 or 3
reachCapinteger or nullmin 1, max 100000
quotasobject or null
quotas.pushintegermin 0, max 10000
quotas.emailintegermin 0, max 10000
quotas.inappintegermin 0, max 10000
dailyMaxinteger or nullmin 0, max 1000
allowedChannels"push" | "email" | "inapp"[]up to 3 items
reasonstringmax 2000
curl -X PUT "$SAPAGAN_URL/v1/scopes/user-42/policy" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tier": "free",
    "trustTier": "red",
    "rampStep": 1,
    "reachCap": 1
  }'

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "scopeId": "<scopeId>",
  "stored": true,
  "planCode": "<planCode>",
  "tier": "free",
  "trustTier": "red",
  "rampStep": 1,
  "reachCap": 1,
  "effectiveReachCap": 1,
  "fullReachCap": 1,
  "quotas": {},
  "monthlyQuota": {
    "push": 1,
    "email": 1,
    "inapp": 1
  },
  "dailyMax": 1,
  "effectiveDailyMax": 1,
  "campaignsPerWeek": 1,
  "allowedChannels": [
    "push"
  ],
  "frequencyCap": {},
  "segmentCooldownHours": 1,
  "contactAccess": "masked",
  "status": "<status>",
  "paused": true,
  "pausedReason": "<pausedReason>",
  "pausedAt": "<pausedAt>",
  "updatedAt": "<updatedAt>",
  "pausedBy": "<pausedBy>",
  "updatedBy": "<updatedBy>"
}

GET /v1/scopes/{id}/policy-audit#

A store's policy, pause and block history (workspace keys only)

Accepted keys Server key

Parameters

NameInTypeNotes
limitqueryinteger
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42/policy-audit" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "entries": [
    {
      "id": "user-42",
      "action": "<action>",
      "actor": "<actor>",
      "reason": "Checked with the owner",
      "before": null,
      "after": null,
      "occurredAt": "<occurredAt>"
    }
  ]
}

GET /v1/scopes/{id}/products#

Search one store's products (workspace keys and console sessions)

For the workspace's own campaigns: the store is named in the path and must be a store of this workspace (404 otherwise).

Accepted keys Server key

Parameters

NameInTypeNotes
qquerystringWords of the product's name, anywhere in it, any case.
idsquerystringComma-separated listing ids (at most 50): exactly these, when they are the store's own and live.
cursorquerystring
limitqueryinteger
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42/products" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "products": [
    {
      "id": "user-42",
      "name": "order_placed",
      "imageUrl": "<imageUrl>",
      "price": 1,
      "specialPrice": 1,
      "stock": 1,
      "sold": 1,
      "updatedAt": "<updatedAt>"
    }
  ],
  "nextCursor": "<nextCursor>"
}

POST /v1/scopes/{id}/unblock#

Lift a store's block (workspace keys only); audited

Accepted keys Server key

Parameters

NameInTypeNotes
idpathstring required

Request body

FieldTypeNotes
reason requiredstringmin 1, max 2000
curl -X POST "$SAPAGAN_URL/v1/scopes/user-42/unblock" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Checked with the owner"
  }'

Responses

200 OK, 400 Invalid request, 403 Forbidden, 404 Not found, 409 Conflict. Errors use the error body.

Example response 200

{
  "id": "user-42",
  "scopeId": "<scopeId>",
  "category": "spam",
  "reason": "Checked with the owner",
  "startsAt": "<startsAt>",
  "endsAt": "<endsAt>",
  "permanent": true,
  "createdBy": "<createdBy>",
  "endedAt": "<endedAt>",
  "endReason": "<endReason>",
  "endedBy": "<endedBy>",
  "endNote": "<endNote>"
}

GET /v1/scopes/{id}/usage#

A store's campaign usage this calendar month (workspace keys only)

Accepted keys Server key

Parameters

NameInTypeNotes
atquerystring (date-time)
idpathstring required
curl -X GET "$SAPAGAN_URL/v1/scopes/user-42/usage" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden, 404 Not found. Errors use the error body.

Example response 200

{
  "scopeId": "<scopeId>",
  "period": "<period>",
  "timeZone": "<timeZone>",
  "dailyMax": 1,
  "channels": [
    {
      "channel": "push",
      "used": 1,
      "extra": 1,
      "credits": 1,
      "quota": 1,
      "remaining": 1
    }
  ]
}

GET /v1/workspace/policy-defaults#

The workspace's policy settings: default trust tier, daily maxima by tier, seller ramp, appeals per block, block sets red, contact tiers (workspace keys only)

Accepted keys Server key

curl -X GET "$SAPAGAN_URL/v1/workspace/policy-defaults" \
  -H "Authorization: Bearer $SAPAGAN_KEY"

Responses

200 OK, 403 Forbidden. Errors use the error body.

Example response 200

{
  "defaultTrustTier": "orange",
  "tierDailyMax": {
    "free": 1,
    "starter": 1,
    "growth": 1,
    "pro": 1
  },
  "ramp": {
    "1": {
      "reach": 1,
      "campaignsPerWeek": 0
    },
    "2": {
      "reach": 1,
      "campaignsPerWeek": 0
    },
    "3": {
      "reach": 1,
      "campaignsPerWeek": 0
    }
  },
  "maxAppealsPerBlock": 1,
  "blockSetsTrustRed": true,
  "contactAccessTiers": [
    "free"
  ],
  "health": {
    "windowDays": 1,
    "unsubscribeAttributionHours": 1,
    "rejectionWindowDays": 1,
    "unsubscribePauseMinRevokers": 1,
    "promotionMinCampaignSends": 1,
    "thresholds": {
      "complaint_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "bounce_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "unsubscribe_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "invalid_token_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "failure_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "review_rejections": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "open_rate_drop": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      }
    },
    "promotion": {
      "1": {
        "campaigns": 1,
        "minSent": 1,
        "maxComplaintRate": 1,
        "maxUnsubscribeRate": 1
      },
      "2": {
        "campaigns": 1,
        "minSent": 1,
        "maxComplaintRate": 1,
        "maxUnsubscribeRate": 1
      }
    },
    "pauseDropsStep": true,
    "pauseLowersTrust": true,
    "pauseOfficial": true
  }
}

PUT /v1/workspace/policy-defaults#

Change the workspace's policy settings (workspace keys only); always with a reason; audited

Absent keys stay. Nothing is rewritten retroactively: lowering appeals per block keeps existing appeals; a new default trust tier applies only to stores whose trust tier was never set.

Accepted keys Server key

Request body

FieldTypeNotes
defaultTrustTier"orange" | "yellow" | "green"
tierDailyMaxobject
tierDailyMax.freeintegermin 0, max 1000
tierDailyMax.starterintegermin 0, max 1000
tierDailyMax.growthintegermin 0, max 1000
tierDailyMax.prointegermin 0, max 1000
rampobject
ramp.1object
ramp.1.reach requiredinteger or nullmin 1, max 100000
ramp.1.campaignsPerWeek requiredinteger or nullmin 0, max 100
ramp.2object
ramp.2.reach requiredinteger or nullmin 1, max 100000
ramp.2.campaignsPerWeek requiredinteger or nullmin 0, max 100
ramp.3object
ramp.3.reach requiredinteger or nullmin 1, max 100000
ramp.3.campaignsPerWeek requiredinteger or nullmin 0, max 100
maxAppealsPerBlockintegermin 0, max 20
blockSetsTrustRedboolean
contactAccessTiers"free" | "starter" | "growth" | "pro"[]up to 4 items
healthobject
health.windowDaysintegermin 1, max 30
health.unsubscribeAttributionHoursintegermin 1, max 168
health.rejectionWindowDaysintegermin 1, max 90
health.unsubscribePauseMinRevokersintegermin 1, max 100000
health.promotionMinCampaignSendsintegermin 1, max 100000
health.thresholdsobject
health.thresholds.complaint_rateobject
health.thresholds.bounce_rateobject
health.thresholds.unsubscribe_rateobject
health.thresholds.invalid_token_rateobject
health.thresholds.failure_rateobject
health.thresholds.review_rejectionsobject
health.thresholds.open_rate_dropobject
health.promotionobject
health.promotion.1object
health.promotion.2object
health.pauseDropsStepboolean
health.pauseLowersTrustboolean
health.pauseOfficialboolean
reason requiredstringmin 1, max 2000
curl -X PUT "$SAPAGAN_URL/v1/workspace/policy-defaults" \
  -H "Authorization: Bearer $SAPAGAN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Checked with the owner"
  }'

Responses

200 OK, 400 Invalid request, 403 Forbidden. Errors use the error body.

Example response 200

{
  "defaultTrustTier": "orange",
  "tierDailyMax": {
    "free": 1,
    "starter": 1,
    "growth": 1,
    "pro": 1
  },
  "ramp": {
    "1": {
      "reach": 1,
      "campaignsPerWeek": 0
    },
    "2": {
      "reach": 1,
      "campaignsPerWeek": 0
    },
    "3": {
      "reach": 1,
      "campaignsPerWeek": 0
    }
  },
  "maxAppealsPerBlock": 1,
  "blockSetsTrustRed": true,
  "contactAccessTiers": [
    "free"
  ],
  "health": {
    "windowDays": 1,
    "unsubscribeAttributionHours": 1,
    "rejectionWindowDays": 1,
    "unsubscribePauseMinRevokers": 1,
    "promotionMinCampaignSends": 1,
    "thresholds": {
      "complaint_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "bounce_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "unsubscribe_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "invalid_token_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "failure_rate": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "review_rejections": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      },
      "open_rate_drop": {
        "watch": 1,
        "pause": 1,
        "minVolume": 1,
        "pauseMinVolume": 1
      }
    },
    "promotion": {
      "1": {
        "campaigns": 1,
        "minSent": 1,
        "maxComplaintRate": 1,
        "maxUnsubscribeRate": 1
      },
      "2": {
        "campaigns": 1,
        "minSent": 1,
        "maxComplaintRate": 1,
        "maxUnsubscribeRate": 1
      }
    },
    "pauseDropsStep": true,
    "pauseLowersTrust": true,
    "pauseOfficial": true
  },
  "changed": true
}