# Back-in-stock request (/api-reference/public-api/backInStock)

`POST /v1/back-in-stock`

Base URL: `https://api.bitelio.com`

Record that a storefront visitor wants to be told when an out-of-stock Shopify variant returns.

Authenticated with your **public** key, because it is meant to be called from a storefront widget. Rate-limited to 20 requests a minute per caller.

A back-in-stock request is **not** marketing consent: the contact is created unsubscribed, exactly as a contact created by the transactional API is. Ask for consent separately.

Returns **404** when the variant is not one of your project's.

## Request body

- `email`: string (email) (required) — The visitor's email address. Created as a contact if new, unsubscribed.
- `shopifyVariantId`: string (required) — Shopify variant, either the bare numeric id or the full `gid://shopify/ProductVariant/…`.

Example:

```json
{
  "email": "user@example.com",
  "shopifyVariantId": "45123456789012"
}
```

## Responses

### `202` — Request recorded

- `subscribed`: boolean

```json
{
  "subscribed": false
}
```

### `400` — The body failed validation

### `404` — No such variant in this project

## Example request

```bash
curl -X POST 'https://api.bitelio.com/v1/back-in-stock' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"email":"user@example.com","shopifyVariantId":"45123456789012"}'
```
