---
title: "Get a link's binding"
method: GET
path: "/urls/{code}/binding"
tags: ["Bindings"]
---

# Get a link's binding

`GET /urls/{code}/binding`

## Request

- Base URL: `https://gajo.io/api/v1`
- URL: `https://gajo.io/api/v1/urls/{code}/binding`
- Auth: API key in header `x-api-key`

**Requires a Pro plan.** Returns the link's template binding and its endpoints, or `{"shortCode": ..., "bound": false}` when the link is not bound.

## Response `200`

The binding.

- BindingResult: Envelope shared by every response.
  - `success` true, required: `true` when the request succeeded.
  - `message` string, nullable: Human-readable status or error message. Often `null` on reads.
  - `data` object, required: A link's template binding. When `bound` is `false`, only `shortCode` and `bound` are returned.
    - `shortCode` string
    - `bound` boolean, required
    - `routingType` 'Device' | 'AbTest': `Device` routes by device class; `AbTest` splits traffic by percentage.
    - `templateName` string, nullable: Name of the bound route or A/B template, or `null` if it was deleted (the link then uses its original destination).
    - `routeTemplateId` integer, nullable: Numeric ID of the bound route template (`null` for A/B bindings). Deprecated: use `templateName`.
    - `abTemplateId` integer, nullable: Numeric ID of the bound A/B template (`null` for Device bindings). Deprecated: use `templateName`.
    - `createdDate` string, date-time
    - `endpoints` Endpoint[]
      - `slotKey` string, required: Device slot (Device bindings) or variant name (A/B bindings).
      - `targetType` 'Url' | 'RouteTemplate', required: `Url` (default) sends the slot to `targetUrl`. `RouteTemplate` is reserved for chaining an A/B variant to a route template; this is not fully supported yet, so use `Url` targets.
      - `targetUrl` string, nullable, required
      - `fallbackUrl` string, nullable, required: Web fallback when `targetUrl` is an app deep link and the app is not installed.
      - `routeTemplateName` string, nullable, required: Name of the chained route template when `targetType` is `RouteTemplate` (`null` otherwise, or if it was deleted).
      - `routeTemplateId` integer, nullable, required: Numeric ID of the chained route template when `targetType` is `RouteTemplate`. Deprecated: use `routeTemplateName`.
      - `endpointName` string, nullable, required: Optional label.

## Other responses

- `401`: The `x-api-key` header is missing, or the key is unknown or revoked.
- `403`: Your plan is not Pro (the message names the Pro feature).
- `404`: No link with this code exists on your account.
- `429`: Per-minute rate limit exceeded. Wait `Retry-After` seconds.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/gajo/apis/gajo-api.md) · [All operations](https://skmtc.dev/gajo/apis/gajo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gajo/apis/gajo-api/revisions/de6fe920cc26?raw)
