Aglyn REST API
The Aglyn REST API gives you programmatic access to your organization's data — datasets and records, contacts, sites and their form submissions, your store's orders and products, and your media library. Use it to sync content from another system, push orders into accounting, record shipments from a 3PL or warehouse system, feed a catalog to a marketplace, sync a CRM's contacts in, back up records, or build an integration.
The REST API is included on the Business and Advanced plans. Create keys from Organization → Settings → API keys.
Base URL
https://app.aglyn.com/api/v1
All requests are over HTTPS and every response is JSON. The version lives in the path; there's no version header.
Quick start
Check your key and see what it can do:
curl https://app.aglyn.com/api/v1/me \
-H "Authorization: Bearer aglyn_sk_your_key_here"
{
"object": "api_key",
"org": "org_abc123",
"scopes": ["datasets:read", "datasets:write"]
}
Then read some data — here, the first page of a dataset's records:
curl "https://app.aglyn.com/api/v1/datasets" \
-H "Authorization: Bearer aglyn_sk_your_key_here"
curl "https://app.aglyn.com/api/v1/datasets/ds_team/records?limit=100" \
-H "Authorization: Bearer aglyn_sk_your_key_here"
In JavaScript
const res = await fetch('https://app.aglyn.com/api/v1/datasets/ds_team/records', {
headers: { Authorization: `Bearer ${process.env.AGLYN_API_KEY}` },
})
if (!res.ok) {
const { error } = await res.json()
throw new Error(`${error.type}: ${error.message}`)
}
const { data, next_cursor, has_more } = await res.json()
Paging through everything
Lists are ordered by id and paged with an opaque cursor, so a full sync is a loop:
let cursor = null
const all = []
do {
const url = new URL('https://app.aglyn.com/api/v1/datasets/ds_team/records')
url.searchParams.set('limit', '100')
if (cursor) url.searchParams.set('cursor', cursor)
const page = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.AGLYN_API_KEY}` },
}).then((r) => r.json())
all.push(...page.data)
cursor = page.next_cursor
} while (cursor)
Read ordering before you assume page 1 holds the newest records — it doesn't.
Service endpoints
Three endpoints need no scope; any valid key can call them.
GET /v1
What this API is and what it serves.
{
"object": "api",
"name": "Aglyn REST API",
"version": "v1",
"documentation": "https://docs.aglyn.com/api",
"resources": ["datasets", "contacts", "sites", "media"]
}
This lists only top-level resources. Form submissions, orders
and products all live under a site
(/v1/sites/{siteId}/…) and are deliberately absent, so a client that walks this list
never builds a path that 404s. media is here because
/v1/media — the organization library — really is a top-level
path; each site's own files are additionally at /v1/sites/{siteId}/media.
GET /v1/me
Introspect the key you're calling with — useful for verifying a key after rotation, or for failing fast at startup with a clear message.
{
"object": "api_key",
"org": "org_abc123",
"scopes": ["datasets:read", "datasets:write"]
}
GET /v1/usage
Where you stand against every plan band this month — requests, contacts, datasets and dataset storage — and, for each, whether crossing it bills or refuses. See Usage.
{
"object": "usage",
"month": "2026-08",
"apiRequests": { "used": 18422, "included": 100000, "remaining": 81578, "metered": true }
}
Resources
| Resource | Description |
|---|---|
| Datasets & records | Create, read, update, and delete datasets and the records inside them — the one resource the API can provision from nothing. |
| Contacts | Read your organization's contacts, add the people your own systems own, and edit their name, tags and notes. |
| Sites | List sites and read their details. |
| Form submissions | Read a site's form submissions, mark them read as you process them, and delete them after export. |
| Orders | Read a site's store orders — line items, totals, refunds, disputes — and record shipments against them. |
| Products | Read a site's catalog — variants, prices, stock levels. |
| Media | List files in the organization library and in each site's media. |
Orders and products need a plan that includes commerce, in addition to their scope — see each page's plan note.
For event-driven integrations, see Webhooks — push instead of poll.
Everything you need to know
- Authentication — API keys and scopes.
- Rate limits & usage — 120 requests/minute per key, and how the monthly quota bills.
- Conventions — pagination, ordering, errors, and idempotency.