REST · JSON

Developer API

Create and manage short links, QR codes, campaigns and more from your own code. Every response is JSON.

Base URLhttps://gocooks.co/api

Authentication

Create a key under Dashboard → API Keys and send it in the Authorization header. Each key is limited to the areas (scopes) you choose, read-only or read & write. Keys act on the workspace they were created in.

Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

For simple GET requests you may also pass ?key=YOUR_API_KEY, but the header is safer because URLs end up in logs.

Create an account to get a key

Rate limits

Each key can make 60 requests per minute. Every response includes these headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1793750400   # Unix time when the window resets

Over the limit you get HTTP 429 with a Retry-After header (seconds).

Errors

Successful responses have "error": 0. Failures have "error": 1, a human-readable "message" and an HTTP status code:

400The body is not valid JSON.
401Missing or unknown API key.
403The key lacks the scope, the account is not active, or the API is disabled.
404The item does not exist or belongs to someone else.
422Validation failed (e.g. alias taken, invalid URL).
429Rate limit exceeded.
{ "error": 1, "message": "This alias is already taken. Please choose another one." }

Link object

{
    "id": 42,
    "alias": "spring",
    "shorturl": "https://gocooks.co/spring",
    "longurl": "https://example.com/spring-sale?utm_source=api",
    "title": "Spring sale",
    "description": "",
    "type": "direct",
    "status": "active",
    "archived": false,
    "clicks": 1280,
    "uniqueclicks": 913,
    "password": false,
    "expires": null,
    "clicklimit": 0,
    "campaign": 0,
    "pixels": [],
    "geotarget": [
        {
            "location": "FR",
            "state": "",
            "link": "https://example.com/fr/soldes"
        }
    ],
    "devicetarget": [],
    "languagetarget": [],
    "parameters": [
        {
            "name": "utm_source",
            "value": "api"
        }
    ],
    "deeplink": {},
    "metatitle": "",
    "metadescription": "",
    "metaimage": "",
    "date": "2026-11-04 09:30:00"
}

Creating a link returns { "error": 0, "id": …, "shorturl": "…", "data": { link object } } with HTTP 201. Lists return "data": [ … ] plus "pagination". The Premium URL Shortener style endpoints GET /urls, POST /url/add, PUT /url/{id}/update and DELETE /url/{id}/delete are also available.

Account

GET /api/account account

Your profile and totals.

curl "https://gocooks.co/api/account" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/account');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/account', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/account",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
GET /api/links links

List links, newest first.

FieldTypeDescription
limitintItems per page, 1–100 (default 20).
pageintPage number (default 1).
orderstringdate (default) or clicks.
qstringSearch alias, title and URL.
curl "https://gocooks.co/api/links" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/links');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/links', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/links",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
POST /api/links links · write

Create a short link.

FieldTypeDescription
url requiredstringDestination URL (http or https).
customstringCustom alias. Random when empty.
domainint|stringDomain id or host name from GET /api/domains. Main domain when empty.
titlestringTitle. Fetched from the page when empty.
descriptionstringNotes / description.
typestringdirect, frame, splash, splash:{id} (custom splash) or overlay:{id} (CTA overlay).
passwordstring|nullProtect the link with a password. null removes it on update.
expirystringExpiry date/time, e.g. 2026-12-31 23:59:00 (UTC).
clicklimitintStop working after this many clicks.
expirationredirectstringWhere to send visitors once the link has expired.
geotargetarray[{"location":"US","state":"","link":"https://…"}]
devicetargetarray[{"device":"iphone|ipad|android|windows|macos|linux|chromeos|mobile|tablet|desktop","link":"https://…"}]
languagetargetarray[{"language":"fr","link":"https://…"}]
advancedtargetarray[{"country":"US","device":"mobile","language":"en","link":"https://…"}] — all set fields must match.
abtestingarray[{"link":"https://…","percent":30}] — the main URL gets the rest.
parametersarray[{"name":"utm_source","value":"api"}] appended to the destination.
forwardparamsboolPass query parameters added to the short link to the destination.
deeplinkobject{"apple":"myapp://…","google":"intent://…","auto":true}
pixelsint[]Pixel ids from GET /api/pixels.
campaignintCampaign id.
channelintChannel id.
metatitle / metadescription / metaimagestringCustom social preview (metaimage is an image URL).
publicboolMake statistics public at the short link followed by +.
blockbots / breakoutboolBlock bots / open in the real browser from in-app browsers.
curl -X POST "https://gocooks.co/api/links" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/spring-sale","custom":"spring","parameters":[{"name":"utm_source","value":"api"}],"geotarget":[{"location":"FR","link":"https://example.com/fr/soldes"}]}'
$ch = curl_init('https://gocooks.co/api/links');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"url":"https://example.com/spring-sale","custom":"spring","parameters":[{"name":"utm_source","value":"api"}],"geotarget":[{"location":"FR","link":"https://example.com/fr/soldes"}]}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/links', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "url": "https://example.com/spring-sale",
    "custom": "spring",
    "parameters": [
      {
        "name": "utm_source",
        "value": "api"
      }
    ],
    "geotarget": [
      {
        "location": "FR",
        "link": "https://example.com/fr/soldes"
      }
    ]
  }),
});
const result = await res.json();
import requests

r = requests.post(
    "https://gocooks.co/api/links",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "url": "https://example.com/spring-sale",
        "custom": "spring",
        "parameters": [{
            "name": "utm_source",
            "value": "api"
        }],
        "geotarget": [{
            "location": "FR",
            "link": "https://example.com/fr/soldes"
        }]
    },
)
print(r.json())
GET /api/links/{id} links

Get one link.

curl "https://gocooks.co/api/links/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/links/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/links/123', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/links/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
PUT /api/links/{id} links · write

Update a link. Only the fields you send change (PATCH works too). Add "archived": true to archive.

FieldTypeDescription
url requiredstringDestination URL (http or https).
customstringCustom alias. Random when empty.
domainint|stringDomain id or host name from GET /api/domains. Main domain when empty.
titlestringTitle. Fetched from the page when empty.
descriptionstringNotes / description.
typestringdirect, frame, splash, splash:{id} (custom splash) or overlay:{id} (CTA overlay).
passwordstring|nullProtect the link with a password. null removes it on update.
expirystringExpiry date/time, e.g. 2026-12-31 23:59:00 (UTC).
clicklimitintStop working after this many clicks.
expirationredirectstringWhere to send visitors once the link has expired.
geotargetarray[{"location":"US","state":"","link":"https://…"}]
devicetargetarray[{"device":"iphone|ipad|android|windows|macos|linux|chromeos|mobile|tablet|desktop","link":"https://…"}]
languagetargetarray[{"language":"fr","link":"https://…"}]
advancedtargetarray[{"country":"US","device":"mobile","language":"en","link":"https://…"}] — all set fields must match.
abtestingarray[{"link":"https://…","percent":30}] — the main URL gets the rest.
parametersarray[{"name":"utm_source","value":"api"}] appended to the destination.
forwardparamsboolPass query parameters added to the short link to the destination.
deeplinkobject{"apple":"myapp://…","google":"intent://…","auto":true}
pixelsint[]Pixel ids from GET /api/pixels.
campaignintCampaign id.
channelintChannel id.
metatitle / metadescription / metaimagestringCustom social preview (metaimage is an image URL).
publicboolMake statistics public at the short link followed by +.
blockbots / breakoutboolBlock bots / open in the real browser from in-app browsers.
curl -X PUT "https://gocooks.co/api/links/123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Spring sale 2026","clicklimit":1000}'
$ch = curl_init('https://gocooks.co/api/links/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"title":"Spring sale 2026","clicklimit":1000}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/links/123', {
  method: 'PUT',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "title": "Spring sale 2026",
    "clicklimit": 1000
  }),
});
const result = await res.json();
import requests

r = requests.put(
    "https://gocooks.co/api/links/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "title": "Spring sale 2026",
        "clicklimit": 1000
    },
)
print(r.json())
DELETE /api/links/{id} links · write

Delete a link and its statistics.

curl -X DELETE "https://gocooks.co/api/links/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/links/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/links/123', {
  method: 'DELETE',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.delete(
    "https://gocooks.co/api/links/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
GET /api/links/{id}/stats stats

Clicks, unique visitors, timeline, countries, cities, devices, browsers, referrers.

FieldTypeDescription
fromdateYYYY-MM-DD (default: 30 days ago)
todateYYYY-MM-DD (default: today)
curl "https://gocooks.co/api/links/123/stats" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/links/123/stats');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/links/123/stats', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/links/123/stats",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())

QR codes

GET /api/qr qr

List QR codes.

FieldTypeDescription
limitintItems per page, 1–100 (default 20).
pageintPage number (default 1).
curl "https://gocooks.co/api/qr" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/qr');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/qr', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/qr",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
POST /api/qr qr · write

Create a QR code. "link" codes are dynamic (trackable, editable) and return an image URL; text, email, phone, sms and wifi codes are static.

FieldTypeDescription
namestringName shown in your dashboard.
type requiredstringlink, text, email, phone, sms, wifi
data requiredobjectlink: {url} · text: {text} · email: {email, subject, body} · phone: {phone} · sms: {phone, message} · wifi: {ssid, password, encryption: WPA|WEP|nopass, hidden}
designobject{"foreground":"#000000","background":"#ffffff"}
custom / domainstringAlias and domain for dynamic codes.
curl -X POST "https://gocooks.co/api/qr" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Menu","type":"link","data":{"url":"https://example.com/menu"},"design":{"foreground":"#1e1b4b"}}'
$ch = curl_init('https://gocooks.co/api/qr');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"name":"Menu","type":"link","data":{"url":"https://example.com/menu"},"design":{"foreground":"#1e1b4b"}}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/qr', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "name": "Menu",
    "type": "link",
    "data": {
      "url": "https://example.com/menu"
    },
    "design": {
      "foreground": "#1e1b4b"
    }
  }),
});
const result = await res.json();
import requests

r = requests.post(
    "https://gocooks.co/api/qr",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "Menu",
        "type": "link",
        "data": {
            "url": "https://example.com/menu"
        },
        "design": {
            "foreground": "#1e1b4b"
        }
    },
)
print(r.json())
GET /api/qr/{id} qr

Get one QR code.

curl "https://gocooks.co/api/qr/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/qr/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/qr/123', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/qr/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
DELETE /api/qr/{id} qr · write

Delete a QR code.

curl -X DELETE "https://gocooks.co/api/qr/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/qr/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/qr/123', {
  method: 'DELETE',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.delete(
    "https://gocooks.co/api/qr/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())

Bio pages

GET /api/bio bio

List link-in-bio pages.

FieldTypeDescription
limitintItems per page, 1–100 (default 20).
pageintPage number (default 1).
curl "https://gocooks.co/api/bio" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/bio');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/bio', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/bio",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
GET /api/bio/{id} bio

Get a bio page with its profile, social links and blocks.

curl "https://gocooks.co/api/bio/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/bio/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/bio/123', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/bio/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())

Campaigns

GET /api/campaigns campaigns

List campaigns.

curl "https://gocooks.co/api/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/campaigns');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/campaigns', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/campaigns",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
POST /api/campaigns campaigns · write

Create a campaign.

FieldTypeDescription
name requiredstring
slugstringRotator path /c/{slug}.
descriptionstring
rotatorboolEnable the rotator link (default true).
publicboolShow on your public profile.
curl -X POST "https://gocooks.co/api/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Black Friday","slug":"bf26"}'
$ch = curl_init('https://gocooks.co/api/campaigns');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"name":"Black Friday","slug":"bf26"}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/campaigns', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "name": "Black Friday",
    "slug": "bf26"
  }),
});
const result = await res.json();
import requests

r = requests.post(
    "https://gocooks.co/api/campaigns",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "Black Friday",
        "slug": "bf26"
    },
)
print(r.json())
PUT /api/campaigns/{id} campaigns · write

Update a campaign.

curl -X PUT "https://gocooks.co/api/campaigns/123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"public":true}'
$ch = curl_init('https://gocooks.co/api/campaigns/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"public":true}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/campaigns/123', {
  method: 'PUT',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "public": true
  }),
});
const result = await res.json();
import requests

r = requests.put(
    "https://gocooks.co/api/campaigns/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "public": True
    },
)
print(r.json())
DELETE /api/campaigns/{id} campaigns · write

Delete a campaign (its links stay).

curl -X DELETE "https://gocooks.co/api/campaigns/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/campaigns/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/campaigns/123', {
  method: 'DELETE',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.delete(
    "https://gocooks.co/api/campaigns/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())

Channels

GET /api/channels channels

List channels.

curl "https://gocooks.co/api/channels" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/channels');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/channels', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/channels",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
POST /api/channels channels · write

Create a channel.

FieldTypeDescription
name requiredstring
colorstring#RRGGBB
descriptionstring
starredbool
curl -X POST "https://gocooks.co/api/channels" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Newsletter","color":"#ec4899"}'
$ch = curl_init('https://gocooks.co/api/channels');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"name":"Newsletter","color":"#ec4899"}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/channels', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "name": "Newsletter",
    "color": "#ec4899"
  }),
});
const result = await res.json();
import requests

r = requests.post(
    "https://gocooks.co/api/channels",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "Newsletter",
        "color": "#ec4899"
    },
)
print(r.json())
PUT /api/channels/{id} channels · write

Update a channel.

curl -X PUT "https://gocooks.co/api/channels/123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"starred":true}'
$ch = curl_init('https://gocooks.co/api/channels/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"starred":true}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/channels/123', {
  method: 'PUT',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "starred": true
  }),
});
const result = await res.json();
import requests

r = requests.put(
    "https://gocooks.co/api/channels/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "starred": True
    },
)
print(r.json())
DELETE /api/channels/{id} channels · write

Delete a channel (its items stay).

curl -X DELETE "https://gocooks.co/api/channels/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/channels/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/channels/123', {
  method: 'DELETE',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.delete(
    "https://gocooks.co/api/channels/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())

Pixels

GET /api/pixels pixels

List tracking pixels.

curl "https://gocooks.co/api/pixels" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/pixels');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/pixels', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/pixels",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
POST /api/pixels pixels · write

Add a pixel.

FieldTypeDescription
provider requiredstringfacebook, gtag, adwords, gtm, linkedin, twitter, bing, snapchat, pinterest, reddit, quora, tiktok, adroll
tag requiredstringPixel / tag ID.
namestring
curl -X POST "https://gocooks.co/api/pixels" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"facebook","tag":"123456789012345","name":"Meta pixel"}'
$ch = curl_init('https://gocooks.co/api/pixels');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"provider":"facebook","tag":"123456789012345","name":"Meta pixel"}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/pixels', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "provider": "facebook",
    "tag": "123456789012345",
    "name": "Meta pixel"
  }),
});
const result = await res.json();
import requests

r = requests.post(
    "https://gocooks.co/api/pixels",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "provider": "facebook",
        "tag": "123456789012345",
        "name": "Meta pixel"
    },
)
print(r.json())
PUT /api/pixels/{id} pixels · write

Update a pixel.

curl -X PUT "https://gocooks.co/api/pixels/123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Main Meta pixel"}'
$ch = curl_init('https://gocooks.co/api/pixels/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"name":"Main Meta pixel"}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/pixels/123', {
  method: 'PUT',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "name": "Main Meta pixel"
  }),
});
const result = await res.json();
import requests

r = requests.put(
    "https://gocooks.co/api/pixels/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "Main Meta pixel"
    },
)
print(r.json())
DELETE /api/pixels/{id} pixels · write

Delete a pixel.

curl -X DELETE "https://gocooks.co/api/pixels/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/pixels/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/pixels/123', {
  method: 'DELETE',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.delete(
    "https://gocooks.co/api/pixels/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())

Domains

GET /api/domains domains

Domains you can use: the main domain (id 0), shared domains and your own.

curl "https://gocooks.co/api/domains" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/domains');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/domains', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/domains",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
POST /api/domains domains · write

Add a branded domain. Point its DNS to this server first.

FieldTypeDescription
domain requiredstringgo.example.com
root_redirectstringWhere the bare domain redirects.
notfound_redirectstringWhere unknown aliases redirect.
curl -X POST "https://gocooks.co/api/domains" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"go.example.com","root_redirect":"https://example.com"}'
$ch = curl_init('https://gocooks.co/api/domains');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"domain":"go.example.com","root_redirect":"https://example.com"}',
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/domains', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "domain": "go.example.com",
    "root_redirect": "https://example.com"
  }),
});
const result = await res.json();
import requests

r = requests.post(
    "https://gocooks.co/api/domains",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "domain": "go.example.com",
        "root_redirect": "https://example.com"
    },
)
print(r.json())
DELETE /api/domains/{id} domains · write

Remove a domain. Its links move to the main domain.

curl -X DELETE "https://gocooks.co/api/domains/123" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/domains/123');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/domains/123', {
  method: 'DELETE',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.delete(
    "https://gocooks.co/api/domains/123",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())

Splash pages & overlays

GET /api/splash splash

List custom splash pages (use the returned type when creating links).

curl "https://gocooks.co/api/splash" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/splash');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/splash', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/splash",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())
GET /api/overlays overlays

List CTA overlays (use the returned type when creating links).

curl "https://gocooks.co/api/overlays" \
  -H "Authorization: Bearer YOUR_API_KEY"
$ch = curl_init('https://gocooks.co/api/overlays');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$result = json_decode(curl_exec($ch), true);
const res = await fetch('https://gocooks.co/api/overlays', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
const result = await res.json();
import requests

r = requests.get(
    "https://gocooks.co/api/overlays",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(r.json())