Skip to content
Get API access

Public API overview

The Grona Public API v1 is part of Grona Embed. It lets your backend run website campaigns from your own product. You can create a campaign, open it in the Grona visual editor, preview it, set it live and check that the Grona Embed snippet is installed, all over HTTPS. Use it when campaigns should start in your systems rather than in the Grona Embed dashboard.

The Public API works with the Grona Embed snippet, not the script on the Website pages. Campaigns you create through the API run through that snippet, and the verify-script call looks only for it. See Install the Grona Embed snippet.

Every request goes to this base URL, and the paths on these pages are relative to it:

https://services.grona.ai/api/public/v1

So GET /campaigns is a request to https://services.grona.ai/api/public/v1/campaigns.

Request bodies are JSON, sent with Content-Type: application/json. The version in the path changes only for breaking changes, as described in Versioning and deprecation.

Every call carries your workspace secret key, either as Authorization: Bearer gro_ed_<keyId>_<secret> or as X-API-Key: gro_ed_<keyId>_<secret>. The key decides which workspace the call acts on, so the workspace never appears in a URL or a request body.

Call the API from your servers only. A secret key in a browser page or a mobile app can be read by anyone who opens it. Authentication covers how to get a key and how to keep it safe.

Every Public API response uses the same envelope. A successful call returns data and meta:

{
"data": { "id": "671a3c90e4b0a1f2c3d40011", "status": "paused" },
"meta": { "workspaceId": "65e8a1c47d2f9b03e6a15c42" }
}

meta.workspaceId is the workspace resolved from your key. List responses add meta.count. A failed call returns error with a stable code and a human-readable message:

{
"error": {
"code": "conflict",
"message": "`externalId` \"CMP-1024\" is already used by another campaign in this workspace."
}
}

Branch on error.code and the HTTP status, never on the message. A 5xx from a gateway in front of the API may not use this envelope. Errors lists every code and how to fix it.

Resource Endpoints What you do with it
Campaigns Create, list, get, update, set status, delete Create website campaigns, A/B tests and multi-page campaigns, then set them live or pause them.
Editor links Create a link, check a link Open a variation in the Grona visual editor from your product.
Websites Verify script Check that the Grona Embed snippet is on a page.
Mobile grants Fetch grants Fetch signed grants for a shopper and hand them to your app. This is a separate API on api.grona.ai, available on request and not part of Grona Embed.

The endpoint reference has every field, status code and a code sample for each operation.

The same reference is available as an OpenAPI 3.1 file for code generation and API clients: grona-api.yaml.

The API has no endpoint for campaign results.

Three calls take a campaign from nothing to live: check the snippet, create the campaign, then set it live once you have edited and previewed it. The quickstart runs each call with curl and shows its response.