---
title: "Get a template"
description: "Read one back-in-stock notification's email and SMS copy. key is \"signup_thank_you\" (sent right after a customer signs up), \"restock_alert\" (sent when the product restocks) or \"reminder\" (the follow-up). ?locale= picks t"
url: https://docs.stoqapp.com/v2-reference/back-in-stock-templates/get-a-template/
api: "API v2 reference"
method: GET
path: "/back_in_stock/templates/{key}"
---

# Get a template

`GET https://app.stoqapp.com/api/v2/external/back_in_stock/templates/{key}`

Read one back-in-stock notification's email and SMS copy. key is &quot;signup_thank_you&quot; (sent right after a customer signs up), &quot;restock_alert&quot; (sent when the product restocks) or &quot;reminder&quot; (the follow-up). ?locale= picks the language of the copy (omit it for the shop default); the response names it in `locale`. Whether it sends, and when, is [`GET /back_in_stock/notification_settings`](https://docs.stoqapp.com/v2-reference/back-in-stock-notification-settings/list-notification-settings/).

**Note:** Copy holds Liquid variables such as `{{product.title_incl_variant}}` and `{{shop.name}}`, filled in for each shopper. A language with no translation of its own returns the default copy. When `email.integration` or `sms.integration` is set (Klaviyo, Postscript or Shopify Flow), that integration sends the channel's alerts, and the `*_flow_verified` fields come from [`POST /back_in_stock/templates/:key/verify_flow`](https://docs.stoqapp.com/v2-reference/back-in-stock-templates/verify-a-templates-flow/). A key the shop has no notification for gives 404 `not_found`. Edit with [`PATCH /back_in_stock/templates/:key`](https://docs.stoqapp.com/v2-reference/back-in-stock-templates/update-a-template/); preview with POST .../send_test.

## Path parameters

- `key` (string, required): Which notification's template: signup_thank_you, restock_alert or reminder. One of: `signup_thank_you`, `restock_alert`, `reminder`.

## Query parameters

- `locale` (string): Language tag of the copy, e.g. &quot;fr&quot; or &quot;pt-BR&quot;. Omit it for the shop's default language.

## Returns

The [template object](https://docs.stoqapp.com/v2-reference/back-in-stock-templates/).

Rate limit: this call costs 1 point ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Examples

### Get a template

```sh
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/templates/{key}" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

### Get a template filtered by locale

```sh
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/templates/{key}?locale=fr" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

## 200

Success: example response shown.

```json
{
  "key": "restock_alert",
  "locale": "en",
  "email": {
    "subject": "{{product.title_incl_variant}} is back in stock!",
    "preheader": null,
    "heading": "{{product.title_incl_variant}} is available now!",
    "body": "Limited stock only at {{shop.name}}. Click 'Buy now' & grab yours before it goes out of stock again!",
    "footer": "Questions? Just reply to this email.",
    "button": {
      "text": "Buy now",
      "destination": "checkout",
      "background_color": "#202223",
      "text_color": "#ffffff",
      "radius": 4
    },
    "colors": {
      "background": "#f9f9f9",
      "section": "#ffffff",
      "text": "#202223"
    },
    "radius": 6,
    "css": null,
    "html": {
      "enabled": false,
      "template": null
    },
    "reviews": {
      "enabled": false,
      "count": 2,
      "min_rating": 4,
      "title": "What customers are saying"
    },
    "social": {
      "facebook": null,
      "instagram": null,
      "pinterest": null,
      "twitter": null,
      "tiktok": null,
      "whatsapp": null,
      "youtube": null,
      "icon_color": "#000000"
    },
    "unsubscribe_text": "Unsubscribe",
    "consent_text": "You're getting this because you asked {{shop.name}} to let you know when {{product.title_incl_variant}} is back in stock (signed up {{signup_date}}).",
    "klaviyo_flow_name": "Back in stock alert (STOQ)",
    "klaviyo_flow_verified": false,
    "integration": null
  },
  "sms": {
    "body": "{{product.title_incl_variant}} is back in stock at {{shop.name}}! Buy yours now - {{product.purchase_link}}",
    "link_destination": "checkout",
    "klaviyo_flow_name": null,
    "klaviyo_flow_verified": false,
    "postscript_flow_verified": false,
    "integration": null
  }
}
```

## 401

Missing or invalid `X-Auth-Token`.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "auth_invalid",
  "details": [
    {
      "code": "auth_invalid",
      "message": "Invalid API key",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 404

The resource does not exist for this shop, or the action path is not registered.

```json
{
  "errors": [
    "Offer not found"
  ],
  "code": "not_found",
  "details": [
    {
      "code": "not_found",
      "message": "Offer not found",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 422

The request failed validation.

```json
{
  "errors": [
    "name is required"
  ],
  "code": "validation_failed",
  "details": [
    {
      "code": "validation_failed",
      "message": "name is required",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check `Retry-After`.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited",
  "details": [
    {
      "code": "rate_limited",
      "message": "Rate limit exceeded",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

