# List templates customers can install

**GET** `/api/embed/v1/templates`

Lists the templates you share with every customer, newest first, with the apps and connections each needs.

Needs a partner key: `Authorization: Bearer gre_…`, from [Platform › Partner keys](https://docs.gorunner.io/embed/platform-screens#partner-keys). Call it from your server only.

Embed · Self-hosted with an Embed license

## Parameters

### Query

- `cursor` · Optional · string: The `pagination.nextCursor` of the page before. Left out: the first page.
- `limit` · Optional · integer: Rows a page, 1 to 100. The default is 50.

## Read a row

`key` is what you install by. `connections` lists one slot per service the steps need, with the steps that use it. An account whose app list leaves out one of `pieces` can’t install it.

You share a template from a workflow’s **⋯** in Workflows: **Share with customers…**. See [Templates for customers](https://docs.gorunner.io/embed/templates).

## Responses

- 200 OK

  A page of templates.

- 400 `VALIDATION_ERROR`

  A parameter isn’t valid.

- 500 `INTERNAL_ERROR`

  Something failed on the installation’s side. Try again.

Any call can also answer: [`401 UNAUTHORIZED`](https://docs.gorunner.io/errors#UNAUTHORIZED) · [`403 EMBED_NOT_LICENSED`](https://docs.gorunner.io/errors#EMBED_NOT_LICENSED) · [`403 IP_NOT_ALLOWED`](https://docs.gorunner.io/errors#IP_NOT_ALLOWED) · [`429 RATE_LIMITED`](https://docs.gorunner.io/errors#RATE_LIMITED) · [`503 BUSY`](https://docs.gorunner.io/errors#BUSY). See [Errors](https://docs.gorunner.io/embed/api#errors).

Request

**curl**

```bash
GORUNNER="https://automations.example.com"
GORUNNER_EMBED_KEY="YOUR_PARTNER_KEY"  # gre_…

curl "$GORUNNER/api/embed/v1/templates" \
  -H "Authorization: Bearer $GORUNNER_EMBED_KEY"
```

**JavaScript**

```js
const GORUNNER = "https://automations.example.com";
const KEY = process.env.GORUNNER_EMBED_KEY; // gre_…

const res = await fetch(
  `${GORUNNER}/api/embed/v1/templates`,
  {
    headers: { Authorization: `Bearer ${KEY}` },
  },
);
const { data } = await res.json();
```

**Python**

```python
import os, requests

GORUNNER = "https://automations.example.com"
KEY = os.environ["GORUNNER_EMBED_KEY"]  # gre_…

res = requests.get(
    f"{GORUNNER}/api/embed/v1/templates",
    headers={"Authorization": f"Bearer {KEY}"},
)
data = res.json()["data"]
```

Response · 200 OK

```json
{
  "data": [
    {
      "id": "9c4e2a17-3d5b-4f86-b0e2-8a1c7d3f5e29",
      "key": "orders-to-sheets",
      "name": "New orders to Sheets",
      "description": "Adds each new order as a row.",
      "category": "Sales",
      "triggerType": "webhook",
      "pieces": [
        "webhook",
        "googlesheets"
      ],
      "connections": [
        {
          "key": "c1",
          "pieceId": "googlesheets",
          "steps": [
            "add_row"
          ]
        }
      ]
    }
  ],
  "pagination": {
    "limit": 50,
    "nextCursor": null
  }
}
```

**Every field**

It takes no body.

### Response · 200 OK

- `data` · array of objects
  - `id` · UUID
  - `key` · string: The stable handle to install by.
  - `name` · string
  - `description` · string
  - `category` · string or null
  - `triggerType` · string
  - `pieces` · array of strings: Every app its steps use.
  - `connections` · array of objects: The connections a workflow made from it needs, one slot per service.
    - `key` · string: The slot’s name in this template (`c1`, `c2`, … in the order the steps first use it).
    - `pieceId` · string: The service a connection for this slot must be for.
    - `steps` · array of strings: The steps that use it; `trigger` for the trigger.
- `pagination` · object
  - `limit` · integer
  - `nextCursor` · string or null: The `cursor` of the next page; null on the last page. A page that comes back full can carry a cursor even when nothing follows: the next page is then empty, with null here. Keep going until it is null.

Related: [Install a template](https://docs.gorunner.io/embed/api/workflows/install-workflow) · [Templates for customers](https://docs.gorunner.io/embed/templates)

Source: https://docs.gorunner.io/embed/api/workflows/list-templates
