---
title: "Get an A/B template"
method: GET
path: "/ab-templates/{name}"
tags: ["A/B Templates"]
---

# Get an A/B template

`GET /ab-templates/{name}`

## Request

- Base URL: `https://gajo.io/api/v1`
- URL: `https://gajo.io/api/v1/ab-templates/{name}`
- Auth: API key in header `x-api-key`

**Requires a Pro plan.** Returns one A/B template by name.

## Response `200`

The template.

- AbTemplateResult: 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: An abstract A/B split template: variant names and percentages only, no URLs.
    - `name` string, required
    - `description` string, nullable, required
    - `active` boolean, required
    - `createdDate` string, date-time, required
    - `updatedDate` string, date-time, nullable, required
    - `variants` object[], required
      - `variantName` string, required
      - `splitPercentage` integer, required
      - `priority` integer, required: Position in the template (0-based, request order).

## 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 A/B template with this name.
- `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)
