Docs

Agoo Links quick start

Make an organisation's agoo.click short link with a secret key, change where it goes, pause or revoke it, read its history and tallies, list your pages, and receive its webhooks.

Preview· P9For developers at organisations on Agoo

This is a published preview. Names and fields may still change before general availability; changes will be listed in the changelog.

This walkthrough makes a short link for Coastline Consult's open day poster, points it somewhere new without reprinting the poster, and reads what happened. An organisation's keys reach only the organisation's own Agoo Links. A person's own pages and links are never reachable with a key.

What You Need

  • A secret key from Console → Settings → Developers → API keys with the scopes links:read and links:write. A test key works the same way.
  • curl. Every request goes to https://api.agoohq.com/v1 with your key as a bearer token:
export AGOO_API_KEY="agoo_sk_test_…"   # paste your full key

POST /links/short-links (create-short-link). Send an Idempotency-Key, so a retried request makes one link, not two.

curl -X POST https://api.agoohq.com/v1/links/short-links \
  -H "Authorization: Bearer $AGOO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: open-day-poster-1" \
  -d '{"name": "Open day poster", "destination": "https://coastline.example/open-day", "utm": {"utm_source": "poster"}}'

The answer is the ShortLink, with 201:

{
  "id": "slink_01m6k4d6f8h0k2m4p6r8t0v2xz",
  "code": "7KQ2XP4",
  "url": "https://agoo.click/7KQ2XP4",
  "name": "Open day poster",
  "destination": "https://coastline.example/open-day",
  "product_source": "standalone",
  "state": "live",
  "safety": { "verdict": "ok" },
  "has_passphrase": false,
  "scans": 0,
  "pending_approval": false,
  "version": 1,
  "created_at": "2026-11-28T09:00:00Z",
  "updated_at": "2026-11-28T09:00:00Z"
}

Only destination is required. You can also send campaign_id, starts_at, expires_at, max_scans, product_source and product_record_id. The destination is checked first: an unsafe one is refused with validation_failed (422), and a few are made but held for Agoo's safety team, with state: safe_hold.

Change Where It Goes

PATCH /links/short-links/{short_link_id}?version=1 (update-short-link). Name the version you read: if it changed since, the answer is version_stale (409).

curl -X PATCH "https://api.agoohq.com/v1/links/short-links/slink_01m6k4d6f8h0k2m4p6r8t0v2xz?version=1" \
  -H "Authorization: Bearer $AGOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destination": "https://coastline.example/open-day/register"}'

The poster's QR code follows the new destination at once. The new destination is checked again. If the key's role can draft but not approve, pending_approval is true and the change waits for someone who can.

Pause, Resume or Revoke It

POST /links/short-links/{short_link_id}/state (set-short-link-state) with to: paused, live or revoked, and an optional reason.

curl -X POST https://api.agoohq.com/v1/links/short-links/slink_01m6k4d6f8h0k2m4p6r8t0v2xz/state \
  -H "Authorization: Bearer $AGOO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: open-day-pause-1" \
  -d '{"to": "paused"}'

A pause or a revoke stops the link everywhere at once, printed codes included. Revoked is for good.

Read Its History and Tallies

  • GET /links/short-links/{short_link_id}/revisions (list-short-link-revisions): every change as it was made, newest first, with before and limit. The history never changes.
  • GET /links/short-links/{short_link_id}/analytics?from=2026-11-01&to=2026-11-28 (get-short-link-analytics): totals, days, countries, devices and referrers, with people counted apart from link previews and robots, and retention_days for how long the organisation's level keeps them. Up to 400 days a request. No one's address is ever kept.
  • GET /links/short-links (list-short-links), newest first, with state, cursor and limit (up to 100).
  • GET /links/short-links/{short_link_id} (get-short-link).
  • GET /links/pages (list-links-pages) and GET /links/pages/{page_id} (get-links-page): each page's slug (empty for the profile at agoolinks.com/@handle), kind, title, state, visibility and when it was published. The page itself is on agoo.link.

Lists return data, next_cursor and has_more; pass next_cursor as cursor for the next page.

Webhooks

Subscribe an endpoint to any of these, as with every webhook:

EventWhen
short_link.createdA short link was made
short_link.updatedIts destination or settings changed
short_link.state_changedIt was paused, resumed, revoked or held
links_page.publishedA page was published: a new version is live at agoolinks.com
links_page.unpublishedA page was paused or archived

A short link event's data.object has id, code, url, state and version, and destination and campaign_id when they apply. A page event's has id and state, with slug, kind and revision.

Errors to Expect

CodeStatusWhy
validation_failed422The destination was refused
version_stale409The link changed after you read it
invalid_state409A revoked or held link can't change
plan_required403This month's new links are used up for the level
scope_missing403The key needs links:read or links:write

See errors for the problem details every error carries.

On this page