LinksList links

List links

List short links for the authenticated location, ordered by newest first. Each link is enriched with a click_count sourced from Tinybird.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/links?location_id=example_string&enabled=true&search=example_string&limit=50&offset=0" \
  -H "Content-Type: application/json" \
  -H "X-Location-Id: example_string" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": [
    {
      "id": "4f9a2c1e-8b3d-4e7a-9c2f-1a2b3c4d5e6f",
      "location_id": "acme-retail",
      "slug": "summer-sale",
      "destination_url": "https://acme-retail.com/summer-sale",
      "title": "Summer Sale Campaign",
      "redirect_type": 302,
      "enabled": true,
      "utm_passthrough": true,
      "metadata": {},
      "expires_at": "2024-12-25T10:00:00Z",
      "created_at": "2024-06-01T12:00:00.000Z",
      "updated_at": "2024-06-15T08:30:00.000Z",
      "click_count": 1247
    }
  ],
  "count": 25
}
GET
/links
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Client API key as a bearer token. Use an agency key (ak_..., read-write) or a location secret key (sk_..., read-only). Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need links:read or links:write. See Using an mcp_ key over HTTP.

Client API key as a bearer token. Use an agency key (ak_..., read-write) or a location secret key (sk_..., read-only). Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need links:read or links:write. See Using an mcp_ key over HTTP.
query
location_idstring

Target location (client) id. Required when authenticating with an agency key (ak_); alternative to the X-Location-Id header. Ignored for secret keys, which resolve their own location.

query
enabledstring

Filter by enabled state. Pass true or false.

Options: true, false
query
limitinteger

Maximum results. Default 50, max 500.

Max: 500
query
offsetinteger

Number of results to skip. Default 0.

header
X-Location-Idstring

Target location (client) id. Required when authenticating with an agency key (ak_); alternative to the location_id query parameter. Ignored for secret keys.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Client API key as a bearer token. Use an agency key (ak_..., read-write) or a location secret key (sk_..., read-only). Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need links:read or links:write. See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Target location (client) id. Required when authenticating with an agency key (ak_); alternative to the X-Location-Id header. Ignored for secret keys, which resolve their own location.

enabledstring

Filter by enabled state. Pass true or false.

Allowed values:truefalse
limitinteger

Maximum results. Default 50, max 500.

offsetinteger

Number of results to skip. Default 0.

Headers

X-Location-Idstring

Target location (client) id. Required when authenticating with an agency key (ak_); alternative to the location_id query parameter. Ignored for secret keys.

Responses

successboolean
dataarray
countinteger

Number of links returned in this page.