---
title: "Get a recipe template"
method: GET
path: "/api/v3.1/automated-recipe-templates/{template_id}/"
tags: ["Automated Recipes"]
---

# Get a recipe template

`GET /api/v3.1/automated-recipe-templates/{template_id}/`

## Request

- Base URL: `https://embedded.improvado.io`
- URL: `https://embedded.improvado.io/api/v3.1/automated-recipe-templates/{template_id}/`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `dts_session_id`
- TypeScript: <https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/docs/api/v3.1/automated-recipe-templates/:template_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns one recipe template with the templates it is built on and the columns of the table a recipe from it produces. Use it to check a template before you deploy it: `output_columns` is available without deploying anything, and an empty `output_columns` means the schema could not be read, not that the table has no columns.

`template_id` is an integer. A value that is not a positive integer answers 404 `not_found`, the same as a template that does not exist, belongs to another agency or cannot be deployed through the API.

## Path parameters

- `template_id` integer, required

## Response `200`

The recipe template

- RecipeTemplateDetailV31: A single recipe template with its dependency tree and the schema of the table it produces. Everything in the list item is here as well.
  - `id` integer: Template identifier. Pass it as `template_id` when you create a recipe.
  - `title` string: Template name. It can be changed in the interface, and the name in force when a recipe is created decides the name of that recipe's output table.
  - `description` string: Template description, as entered in the interface. Can be empty.
  - `data_sources` object[]: Data sources this template supports. The `data_sources` you send when you configure a recipe must be taken from this list.
    - `name` string: Data source name, for example `facebook`. Use this value in requests.
    - `title` string: Display name of the data source.
  - `categories` object[]: Categories the template is filed under in the interface, in display order. Empty when the template has none.
    - `name` string: Category name.
    - `title` string: Display name of the category.
  - `origin` 'improvado' | 'agency': Who the template comes from. `improvado` - a template we provide; `agency` - a template your agency created by promoting one of its own recipes. Agency templates are the ones the interface shows as custom. New values can be added, so tolerate unknown ones.
  - `build_mode` 'progressive' | 'atomic': How a recipe from this template builds when one data source delivers no data. `progressive` - that data source is left out, the rest is built and the recipe becomes `ready_to_work` with `degraded: true`; if every data source fails, the recipe fails. `atomic` - a single failing data source fails the whole recipe. In both modes individual accounts that did not deliver never fail the recipe on their own. New values can be added, so tolerate unknown ones.
  - `level` integer: Depth of this template in its own tree; 0 for a template you can deploy.
  - `children` AutomatedRecipeTemplateTreeNode[]: Templates this one is built on, nested to any depth. A recipe created from this template builds every node of the tree.
    - `id` integer: Template ID
    - `title` string: Template title
    - `level` integer: Depth in the tree, 0 for the template you requested
    - `parent_id` integer: Parent template ID. Present on every node inside `children`; the root object of the detail response carries no `parent_id` key at all.
    - `children` AutomatedRecipeTemplateTreeNode[]: Direct children of this node, nested recursively to any depth
  - `dependencies_count` integer: How many templates this one depends on, counted over the whole tree.
  - `output_columns` AutomatedRecipeTemplateOutputColumn[]: Columns of the table a recipe from this template produces, available before you deploy anything. An empty list means the schema could not be read - treat it as unknown, not as "no columns".
    - `name` string: Column name in the output table
    - `type` 'string' | 'number' | 'bool' | 'date' | 'datetime': Physical column type
    - `user_kind` 'dimension' | 'metric' | 'date_key': How the column is used in reporting. Derived from `type`: string and datetime are dimensions, number and bool are metrics, date is the date key.
  - `created_at` string, date-time: When the template was created.
  - `updated_at` string, date-time: When the template was last changed.

## Other responses

- `400`: The request could not be processed. `bad_request` is the catch-all code for a 4xx that has no code of its own, so the same envelope can arrive with another 4xx status, for example 415.
- `401`: The bearer token is missing, invalid or expired
- `403`: The caller is authenticated but this operation is not available to them
- `404`: No such template for this agency. The same answer covers a template of another agency, a template that cannot be deployed through the API and a `template_id` that is not a positive integer.
- `405`: The HTTP method is not supported on this path
- `500`: Something failed on our side. The request was not served; retry later.
- `503`: Temporarily unavailable. The response carries the header `Retry-After: 30`, so wait 30 seconds and repeat the request.

---

[API](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3.md) - [All operations](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/revisions/a881099bd6c4?raw)
