Free Month for new users Learn more
Developers

API and integrations

A small REST API with personal keys — the same one the Mac and iPhone apps use — plus signed webhooks for Zapier, Make, n8n, Slack or your own server.

BASEhttps://shared.do/api/v1

Keys

Create a key under Apps & API and send it with every request:

Authorization: Bearer shr_your_key

Every endpoint lives under https://shared.do/api/v1 and answers in JSON. Apps can also exchange an email and password for a key of their own:

POST/api/v1/auth/login
{"email": "[email protected]", "password": "…", "device": "Jason's MacBook", "code": "123456"}
→ {"key": "shr_…", "user": {"plan": {…}, "features": {…}, "limits": {…}, "domains": […]}}

Leave out code unless the account uses two-factor sign-in; you'll get totp_required if it's needed. GET /api/v1/me returns the same user object.

The other account endpoints the apps use — all open to any client:

GET/api/v1

No key needed. Says who the server is and which ways in it offers: signups (open/invite/closed), auth.apple, auth.forgot and the pages links.

POST/api/v1/auth/register
{"name": "Sam", "email": "[email protected]", "password": "…", "agree": true, "device": "Sam's iPhone"}
→ 201 {"key": "shr_…", "user": {…}}

agree confirms the Terms of Service and Privacy Policy; show them next to your sign-up button. Only works while sign-ups are open.

POST/api/v1/auth/forgot

{"email": "…"} emails a password-reset link. The answer is the same whether or not the address has an account.

POST/api/v1/auth/apple

{"identity_token": "…", "name": "…", "device": "…"} — Sign in with Apple for native apps. The server verifies Apple's token (its audience must be one of the bundle IDs in Admin → Settings → Sign-ups), finds the linked account — or an account with the same confirmed email, or creates one — and answers like login, plus created. 403 apple_off when the site has it switched off.

DELETE/api/v1/account

Deletes the signed-in account and everything it owns, and cancels its subscription. Confirm with {"password": "…"} — or {"confirm": "the account's email"} for accounts without a password (Sign in with Apple). POST /api/v1/account/delete does the same where DELETE bodies are awkward. The only admin of a site can't be deleted this way.

GET/api/v1/billing/apple

Whether this server sells plans through Apple's In-App Purchase, and the mapped products: {"enabled": true, "products": [{"id", "plan", "cycle", "name"}], "source": "apple"|"stripe"|null}.

POST/api/v1/billing/apple

{"jws": "…"} — a StoreKit 2 signed transaction (its jwsRepresentation). The server verifies Apple's signature and certificate chain, maps the product to a plan and switches the account over; the answer carries the refreshed user. Used by the apps for purchases, restores and renewals.

A key can be limited when you make it: read only, or just some areas (links, domains, uploads, webhooks and pixels, conversions). A request outside the key's permissions answers 403 with insufficient_scope and a needs field naming the missing one.

Quick shorten

GET/api/v1/shorten?url=…&format=text
curl -H "Authorization: Bearer $KEY" "https://shared.do/api/v1/shorten?format=text&url=https://example.com"
https://shared.do/k7pm2q
POST/api/v1/links
{
  "url": "https://example.com/spring",
  "slug": "spring",                       // optional
  "domain": "go.yourbrand.com",           // optional: host or id
  "title": "Spring sale", "tags": ["campaign"], "notes": "…",
  "utm": {"source": "instagram", "medium": "social", "campaign": "spring"},
  "og_title": "…", "og_description": "…", "og_image": "https://…",
  "ios_url": "https://apps.apple.com/…", "android_url": "https://play.google.com/…",
  "geo": [{"country": "DE", "url": "https://example.de"}],
  "password": "…", "expires_at": "2026-12-31T23:59:00Z", "max_clicks": 1000, "expired_url": "https://…",
  "starts_at": "2026-12-01T09:00:00Z",    // not live before this
  "variants": [{"url": "https://example.com/b", "weight": 50}], "weight": 50,   // A/B test
  "deep_link": true,                      // open the app on phones
  "dayparts": {                           // routing by the clock; time rules win over device & country
    "tz": "America/New_York",
    "rules": [{"days": [1,2,3,4,5], "from": "11:00", "to": "15:00", "url": "https://example.com/lunch"}]
  },
  "pixels": [3, 7],                       // ids from /pixels
  "folder_id": 12
}

Answers 201 with the link: id, short_url, clicks, qr_svg and every field above — plus stats_share_url when the link's stats page is shared (that's turned on from the link's page on the website).

GET/api/v1/links?q=&tag=&sort=new|clicks|recent|old&folder_id=&scope=mine|team&page=1&per_page=50
GET/api/v1/links/{id}
PATCH/api/v1/links/{id}

Send only what changes. archived and disabled are true/false.

DELETE/api/v1/links/{id}
GET/api/v1/tags
GET/api/v1/meta?url=…

Reads a page's title, description and preview image.

Link templates

Templates save UTM tags and settings people use a lot (Links → Templates). Pass one by name or id when making a link, and it fills in whatever the request leaves out:

GET/api/v1/templates
POST /api/v1/links   {"url": "https://example.com/post", "template": "Newsletter"}
→ the link, with the template's utm_source, utm_medium, tags and so on applied

Stats

GET/api/v1/links/{id}/stats?days=7|30|90|365
GET/api/v1/stats?days=30
{"total": 1204, "unique": 911, "previous": 830, "qr": 140,
 "series": [{"day": "2026-10-01", "clicks": 40, "unique": 31}, …],
 "countries": [{"key": "US", "label": "United States", "clicks": 602}, …],
 "cities": […], "devices": […], "os": […], "browsers": […], "referrers": […], "sources": […]}
GET/api/v1/clicks?limit=25&link_id=41the latest clicks, newest first

Conversions

With conversion tracking on (Integrations → Conversions), every click carries a short sh_cid code to the landing page. Report the sale from your server with a key that can report conversions:

POST/api/v1/conversions
{"cid": "k3x9p2m7q4wa", "event": "purchase", "value": 49.00, "currency": "USD", "order_id": "1001"}
→ {"conversion": {"id": 7, "link_id": 41, "event": "purchase", "value": 49, …}, "duplicate": false}

An order_id is counted once, so retries are safe. Conversions count for 30 days after the click. From the browser, the /t.js script posts to POST /api/v1/track with your public tracking key instead — no API key in the page.

GET/api/v1/conversions?limit=25

QR codes

GET/api/v1/links/{id}/qr?format=svg|png|pdf

Uses the link's saved design (colours, dots, corners, logo). Override for one image with fg, bg, eye (hex without #), dots=square|rounded|dots, corners=square|rounded|circle, logo=0; PNG size with px (128–4096). PDF needs the QR design feature.

Domains

GET/api/v1/domains
POST/api/v1/domains
POST/api/v1/domains/{id}/verify
DELETE/api/v1/domains/{id}

Uploads

For plans that include uploads. Each file becomes a short link. Small files can go up in one request:

curl -H "Authorization: Bearer $KEY" -F [email protected] -F slug=q3-report "https://shared.do/api/v1/uploads?format=text"

Large files go up in pieces, so any size works and a dropped connection only costs one piece. Start with the name and size, send the bytes with PUT, then finish. If a piece lands in the wrong place, the answer is 409 with uploaded: carry on from there.

POST/api/v1/uploads{"name": "clip.mp4", "size": 73400320, "type": "video/mp4"} → {"id", "chunk_bytes"}
PUT/api/v1/uploads/{id}?offset=0raw bytes, at most chunk_bytes → {"uploaded"}
POST/api/v1/uploads/{id}/complete{"sha256", "slug", "domain_id", "tags"} → {"upload", "link"}
GET/api/v1/uploads
PATCH/api/v1/uploads/{id}{"name": "new name"} renames the file; its extension stays
DELETE/api/v1/uploads/{id}deletes the file and its link

Where files are kept (this site, your own server or your S3 bucket):

GET/api/v1/storage
PATCH/api/v1/storage{"method": "shared|server|s3", "server_url", "s3": {"endpoint", "region", "bucket", "key", "secret", "prefix", "public_url", "path_style"}}
POST/api/v1/storage/check
GET/api/v1/storage/receiverthe PHP receiver file for your server

Each upload has three addresses: file_url is the file page with a viewer (what the short link opens), raw_url is the file itself, and download_url always downloads.

/api/v1/me includes an uploads object (largest file, space, chunk size) only when the plan includes uploads.

Folders and bulk changes

GET/api/v1/folders
POST/api/v1/folders{"name", "team": false}
PATCH/api/v1/folders/{id}{"name"}
DELETE/api/v1/folders/{id}its links stay, outside any folder
POST/api/v1/links/bulk
{"ids": [41, 42, 43], "action": "edit",          // or archive, restore, pause, resume, delete
 "tags_mode": "add", "tags": ["spring"],          // add | remove | set
 "folder_id": 12, "domain_id": 3, "starts_at": "2026-12-01T09:00:00Z", "expires_at": ""}
→ {"ok": true, "updated": [41, 42, 43], "failed": []}

Webhooks

Set them up under Integrations → Webhooks, or with the API (this is also how Zapier and Make "REST hook" triggers subscribe):

GET/api/v1/webhooks
POST/api/v1/webhooks{"url", "events": ["link.created", "link.clicked"], "format": "json|slack|discord"} → {"id", "secret"}
DELETE/api/v1/webhooks/{id}

Events: link.created, link.updated, link.deleted, link.clicked, conversion.created. Each is a POST sent right after it happens:

{"event": "link.clicked", "created_at": "2026-10-24T18:02:11Z",
 "link": {"id": 41, "short_url": "https://shared.do/spring", "url": "https://example.com/spring", …, "owner": {"id": 7, "email": "…"}},
 "click": {"country": "US", "city": "Boston", "device": "mobile", "os": "iOS", "browser": "Safari", "referrer": "instagram.com", "via": "link", "variant": null}}

Check it came from us: the X-Shared-Signature header is sha256= followed by the HMAC-SHA256 of {X-Shared-Timestamp}.{raw body}, keyed with the webhook's secret. Reply with any 2xx. Failed deliveries are retried after 1, 5 and 30 minutes, then 2 and 6 hours; after 20 failures in a row the webhook switches off and the owner gets an email. Click events are capped at 1,000 an hour per webhook.

$expected = 'sha256=' . hash_hmac('sha256', $_SERVER['HTTP_X_SHARED_TIMESTAMP'] . '.' . file_get_contents('php://input'), $secret);
hash_equals($expected, $_SERVER['HTTP_X_SHARED_SIGNATURE']) or exit;

Pixels and bio pages

GET/api/v1/pixels
POST/api/v1/pixels{"kind": "meta|google|gtm|tiktok|linkedin|x|pinterest|snapchat", "pixel_id", "name"}
DELETE/api/v1/pixels/{id}
GET/api/v1/bioyour bio pages, with views and clicks for 30 days

SSO and SCIM

Single sign-on: any OpenID Connect provider (Okta, Microsoft Entra, Google Workspace, Keycloak, Authentik). Set it up in Admin → Settings → Sign-ups: create a Web app in the provider with the redirect URL https://shared.do/auth/sso/callback and paste the issuer, client ID and secret. A "Continue with…" button appears on the sign-in page; people get accounts on first sign-in (even with sign-ups closed), limited to the email domains you list, and can land on a team automatically.

SCIM 2.0 provisioning lets the identity provider create, rename, deactivate and delete accounts here on its own. Point it at:

GET/scim/v2/Users?filter=userName eq "…"&startIndex=&count=
POST/scim/v2/Users{"userName", "name", "externalId", "active"}
GET/scim/v2/Users/{id}
PATCH/scim/v2/Users/{id}Okta's and Entra's patch shapes both work; active false suspends
PUT/scim/v2/Users/{id}
DELETE/scim/v2/Users/{id}removes the account and everything it owns

Authenticate with Authorization: Bearer and the SCIM token from Admin → Settings → Sign-ups. userName is the email address. Only Users is implemented — point group assignments at the SSO team setting instead.

Errors and limits

{"error": {"code": "upgrade_required", "message": "Branded domains is part of the Pro plan."}}

unauthorized 401, upgrade_required 402, not_found 404, conflict 409 (back-half taken), invalid 422, rate_limited 429. Each key can make 120 requests a minute.

Zapier, Make and n8n

To make links, add a Webhooks by Zapier step (Make: HTTP, n8n: HTTP Request): POST https://shared.do/api/v1/links, header Authorization: Bearer shr_…, JSON body with url. Use short_url from the response in the next step.

To react to new links or clicks, start the Zap with Webhooks by Zapier → Catch Hook (Make: Custom webhook, n8n: Webhook) and paste its address into a webhook.

Slack

With the Slack app installed (Integrations → Slack), /shorten https://… [back-half] makes a link on your account from any channel, and /shorten stats back-half answers with its numbers. Each person connects their own account the first time.

There's a proper Zapier app too — search for Share in Zapier: instant triggers for new links, clicks and conversions, plus create, find and stats actions. (Self-hosting? Its source ships in integrations/zapier.)

Shortcuts, Raycast and Alfred

The Share app for iPhone, iPad and Mac adds its own Shortcuts actions — Shorten Link, Upload File, Get Link Clicks and Find Links — and Siri phrases like "Shorten a link with Share".

Anything that can open a URL works too. In Apple Shortcuts without the app: Get Contents of URL with https://shared.do/api/v1/shorten?format=text&url= plus the input and an Authorization header, then Copy to Clipboard.