---
title: Preview table template
url: https://anyrow.ai/docs/api/table-templates/project-retrieve
canonical_url: https://anyrow.ai/docs/api/table-templates/project-retrieve
---

# Preview table template

`GET /v1/projects/{project_id}/table-templates/{template_id}`

Read through a cache: usually fresh within 120s, never staler than 600s.

Authentication: `Authorization: ApiKey {your_api_key}`.

Requires `tables:read`.

## Path parameters

- `project_id` (string, required)
- `template_id` (string, required)

## Returns

200 `application/json`.

- `created_at` (integer, required): At least 0.
- `updated_at` (integer, required): At least 0.
- `id` (string, required)
- `category` (string, required)
- `columns_json` (array of objects, required): 1 to 100 items.
  - `currency_code` (string, optional): Exactly 3 characters.
  - `default` (any, optional)
  - `description` (string, optional, nullable): Up to 256 characters.
  - `id` (string, required): 1 to 36 characters.
  - `instruction` (string, optional, nullable): Up to 512 characters.
  - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`.
  - `options` (array of strings, optional): Up to 500 items.
  - `required` (boolean, required): Defaults to `false`.
  - `searchable` (boolean, optional)
  - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`.
- `creator_display_name` (string, required, nullable)
- `creator_user_id` (string, required, nullable)
- `description` (string, required, nullable)
- `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`.
- `instruction` (string, required, nullable)
- `merge_columns_json` (array of strings, required, nullable): At least 1 items.
- `name` (string, required)
- `strictness` (string, required): One of `strict`, `balanced`, `flexible`.
- `usage_count` (integer, required)

## Errors

- 404: `not_found`, `table_not_found`
- 500: `captcha_unavailable`, `internal_server_error`

Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md).

## Request

```bash title="cURL"
curl 'https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}' \
  -H 'Authorization: ApiKey {your_api_key}'
```

```ts title="TypeScript"
import { AnyrowSDK } from "@anyrow/sdk"

const anyrow = new AnyrowSDK({
  baseURL: "https://api.anyrow.ai",
  headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` },
})

const { data, error } = await anyrow.tableTemplate.projectRetrieve({
  params: {
    project_id: "{project_id}",
    template_id: "{template_id}"
  },
})
```

```python title="Python"
import os

from anyrow import SDK, ClientConfig

anyrow = SDK(ClientConfig(
    base_url="https://api.anyrow.ai",
    bearer_token=os.environ["ANYROW_API_KEY"],
    auth_header_prefix="ApiKey ",
))

result = anyrow.tableTemplate.project_retrieve("{project_id}", "{template_id}")
```

```go title="Go"
package main

import (
	"context"
	"fmt"
	"os"

	sdk "github.com/anyrow/sdk-go"
)

func main() {
	anyrow := sdk.NewClient(sdk.Config{
		BaseURL:     "https://api.anyrow.ai",
		BearerToken: os.Getenv("ANYROW_API_KEY"),
	})
	ctx := context.Background()

	result, err := anyrow.TableTemplate.ProjectRetrieve(ctx, "{project_id}", "{template_id}", nil)
	if err != nil {
		panic(err)
	}
	fmt.Println(result)
}
```

```rust title="Rust"
use anyrow::{Client, ClientConfig};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let anyrow = Client::new(ClientConfig {
        base_url: "https://api.anyrow.ai".to_string(),
        bearer_token: std::env::var("ANYROW_API_KEY").ok(),
        ..Default::default()
    });

    let result = anyrow.table_template().project_retrieve("{project_id}", "{template_id}", &Default::default()).await?;
    println!("{result:?}");
    Ok(())
}
```

```csharp title="C#"
using Anyrow;

var anyrow = new AnyrowClient(new ClientConfig
{
    BaseUrl = "https://api.anyrow.ai",
    ApiKey = Environment.GetEnvironmentVariable("ANYROW_API_KEY"),
});

var result = await anyrow.TableTemplate.ProjectRetrieveAsync("{project_id}", "{template_id}");
Console.WriteLine(result);
```

```java title="Java"
import ai.anyrow.AnyrowClient;

public class Example {
    public static void main(String[] args) throws Exception {
        AnyrowClient anyrow = AnyrowClient.builder()
            .baseUrl("https://api.anyrow.ai")
            .apiKey(System.getenv("ANYROW_API_KEY"))
            .build();

        var result = anyrow.tableTemplate().projectRetrieve("{project_id}", "{template_id}");
        System.out.println(result);
    }
}
```

## Response

```json title="200"
{
  "created_at": 1711468800000,
  "updated_at": 1711468800000,
  "id": "ttmpl_01h5a3g8k9m2n4p6q8r0t2v4x6",
  "category": "string",
  "columns_json": [
    {
      "currency_code": "string",
      "description": "string",
      "id": "string",
      "instruction": "string",
      "name": "string",
      "options": [
        "string"
      ],
      "required": false,
      "searchable": true,
      "type": "string"
    }
  ],
  "creator_display_name": "string",
  "creator_user_id": "string",
  "description": "string",
  "insert_mode": "append",
  "instruction": "string",
  "merge_columns_json": [
    "string"
  ],
  "name": "string",
  "strictness": "strict",
  "usage_count": 42
}
```

```json title="404"
{
  "error_key": "not_found",
  "fields": {
    "key": [
      {
        "error_key": "string",
        "message": "string",
        "path": "string"
      }
    ]
  },
  "message": "string",
  "status": 404,
  "status_key": "string",
  "success": false,
  "vars": {
    "key": "string"
  }
}
```

```json title="500"
{
  "error_key": "captcha_unavailable",
  "fields": {
    "key": [
      {
        "error_key": "string",
        "message": "string",
        "path": "string"
      }
    ]
  },
  "message": "string",
  "status": 500,
  "status_key": "string",
  "success": false,
  "vars": {
    "key": "string"
  }
}
```
