Skip to main content

How to use Alia's public API

Pull your Alia analytics and campaign data into your own tools with a read-only API key.

Written by Rob D

Alia's public API gives read-only access to your store's information, campaigns, and analytics. It covers the same stats, filters, and breakdowns as the analytics in the app, including per-campaign and per-step numbers and answer breakdowns.

Create an API key

  1. Go to Settings > API > API keys.

  2. Select Create API key.

  3. Name the key and choose its scopes (see below).

  4. Copy the key. It's only shown once.

You can change a key's scopes later with Edit scopes. Revoke stops a key working straight away and can't be undone.

💡 Note: You need to be an Admin or Owner, or have the API permission, to manage API keys. If you can't see API keys, ask an Admin or Owner on your team.

Scopes

Scope

Gives access to

read:merchant

Your store's basic information

read:segments

Your campaigns and the popups in each

read:events

Stats, distributions, and answer counts for questions

Give each key only the scopes it needs.

Make requests

  • Base URL: https://api.alia-prod.com/v1

  • Authentication: send your key as a bearer token: Authorization: Bearer <your API key>

The event endpoints take a start date, an end date, and optional filters. They can return totals or a series by minute, hour, day, week, or month. Stats include signups and opt-ins, visitors, popup views, bounce rate, and attributed orders, sales, AOV, LTV, and repurchase rate.

Rate limits

Each request spends tokens from a bucket that refills over time. Your bucket's size and refill rate depend on your plan, and the Billing page shows both. Event queries cost more the more stats and days you ask for, and less when you filter to a campaign or popup. When the bucket is empty, you get a 429 Too Many Requests response with a Retry-After header.

A store needs an active plan to use the API. If your limits seem low for your plan, contact your CSM.

What the API can't do

  • Change anything. The API is read-only. Campaigns, popups, and targeting are edited in the app.

  • Send webhooks. Alia doesn't send its own webhooks. Use the JavaScript SDK events below for real-time activity. Shopify's own customers/create and customers/update webhooks still fire when Alia creates or updates a customer, because Alia writes through Shopify's standard API.

  • List individual attributed orders. There's no API endpoint for this. Use the Attributed orders report in Reports instead. It lists each order with the buyer's email and phone number, and you can export it.

JavaScript SDK events

For real-time activity, Alia fires these browser events on your storefront. Listen for them with document.addEventListener and forward them anywhere, such as Segment, Customer.io, or your own reporting. Alia has no direct Segment integration.

Every event includes popupID, popupTitle, campaignID, and campaignTitle.

Event

When it fires

Extra fields

alia:campaignMatched

A campaign's popup loads for this visitor

None

alia:popupView

A visitor sees a popup

None

alia:popupClose

A visitor closes a popup

None

alia:signup

A visitor submits their email or phone

email, phone

alia:pollAnswered

A visitor answers a question

answers

alia:rewardClaimed

A visitor claims a reward

rewardID, rewardText, discountCode

These six are the full set. Steps, such as each question in a mini quiz, don't fire their own events, but each answered question fires alia:pollAnswered.

Frequently asked questions

I get a 429 error. What does it mean?

You've used up your rate limit for now. Wait for the time in the Retry-After header, then ask for a shorter date range or fewer stats.

Can I connect Alia to Claude or ChatGPT instead?

Yes. The Alia MCP lets an AI assistant answer questions about your Alia data in plain language, without writing code. See Connecting the Alia MCP to Claude, Connecting the Alia MCP to ChatGPT, or Connecting the Alia MCP to other AI assistants.

Still have questions?

Start a chat from inside the Alia app, or use the chat in our Help Center.

Did this answer your question?