ShopEazydevelopers
API referenceMerchant API BetaCampaigns

Who an email would reach

Beta
Credentials
  • OAuth access token
Scopes
messages:send
Add-on
Marketing plus
GET
/v1/merchant/stores/{storeId}/campaigns/audiences

How many customers each audience would reach by email (only those who said yes to marketing), what one campaign to it costs in credits (1 per 10 people), the credits left and the recent campaigns. With audience, also how many of that audience have not opted in.

Plan: Marketing Plus (included with Growth and Scale), else 403 plan_limit.

Access: OAuth scope messages:send; not write-gated. Comes with Growth.

Authorization

merchantOAuth messages:send
headerAuthorizationBearer <token>

OAuth 2.1 (authorization code + PKCE S256, public clients, dynamic registration) for connected AI apps. Effective power is scopes granted AND the person's role today AND the plan. orders:refund, billing:write and team:write are opt-in on the consent screen. Write implies read for marketing:read and messages:read, so a grant holding marketing:write passes a marketing:read check, and messages:send passes messages:read.

Scope: messages:send

Path Parameters

storeId*string

A store the person can reach. Any other id answers 404, never 403.

Query Parameters

audience?string
Value in"all""best""repeat""one_time""lapsed""new""never_ordered"

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X GET 'https://api.shopeazy.co/v1/merchant/stores/<storeId>/campaigns/audiences' \  -H 'Authorization: Bearer <access_token>'
Example Response
{  "data": {    "audiences": [      {        "id": "all",        "name": "string",        "blurb": "string",        "reach": 0,        "credits": 0      }    ],    "chosen": null,    "creditsLeft": 0,    "recent": [      {        "subject": "string",        "audienceId": "all",        "sent": 0,        "sentAt": 0      }    ]  }}