Skip to content

API reference

Table Templates

Reusable table schemas: browse, preview and create tables from them.

The Table Template object

  • created_atintegerRequired

    At least 0.

  • updated_atintegerRequired

    At least 0.

  • idstringRequired
  • categorystringRequired
  • columns_jsonarray of objectsRequired

    1 to 100 items.

  • creator_display_namestringRequirednullable
  • creator_user_idstringRequirednullable
  • descriptionstringRequirednullable
The Table Template objectjson
{  "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}

Browse table templates

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

Requirestables:read

Path parameters

  • project_idstringRequired

Query parameters

  • cursorstringoptional

    Opaque cursor for forward pagination. Pass the nextCursor from the previous response with the same order. Takes precedence over page when both are sent.

    Up to 8192 characters.

  • orderstringoptional

    Sort keys, comma-separated, each field[.asc|.desc][.nullsfirst|.nullslast]; at most 3. Sortable: category, created_at, name, updated_at, usage_count. Default: category.desc. Nulls sort last ascending and first descending unless stated.

    Matches
    ^(?:category|created_at|name|updated_at|usage_count)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?(?:,(?:category|created_at|name|updated_at|usage_count)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?){0,2}$

    Up to 200 characters.

  • filterstringoptional

    Filter expression field.op.value; , joins conditions with AND; group with or(...) and and(...). Fields: category (enum: eq, ne, neq, in, nin, is); created_at (number: eq, ne, neq, gt, gte, lt, lte, in, nin, is); id (string: eq, ne, neq, like, ilike, in, nin, is); name (string: eq, ne, neq, like, ilike, in, nin, is). like is case-sensitive and ilike ignores ASCII case; * is the wildcard. in/nin take (a,b); is takes null or notnull, and true or false on a boolean. At most 20 conditions, 3 nested groups, 50 in/nin values per list, 60 values in all, 50 bytes in a like or ilike pattern once escaped, and at most 4608 bytes however a URL or a form encodes it.

    Up to 2048 characters.

  • qstringoptional

    Free-text search over: name, description, creator_display_name. Whitespace-separated terms must all match; at most 8 terms, and at most 600 bytes however a URL or a form encodes it.

    Up to 200 characters.

  • limitintegeroptional

    Maximum number of items per page, in decimal digits. Defaults to 20, capped by the endpoint's maxLimit.

    Default
    20

    Between 1 and 100.

  • pageintegeroptional

    1-based page number for offset pagination, up to the endpoint's maxPage (x-comb); page further by cursor. A page that is no whole number from 1, in decimal digits, is a 400 invalid_page, and one past maxPage a 400 page_too_deep, with or without a cursor. Ignored when cursor is present.

    Between 1 and 10000.

Returns

200application/json

  • countintegerRequirednullable

    At least 0.

  • hasMorebooleanRequired
  • limitintegerRequired

    At least 1.

  • nextCursorstringRequirednullable
  • pageintegerRequirednullable

    At least 1.

  • templatesarray of objectsRequired

Errors

  • 404not_found
  • 500captcha_unavailableinternal_server_error
Errors every endpoint can return
Requestbash
curl 'https://api.anyrow.ai/v1/projects/{project_id}/table-templates' \  -H 'Authorization: ApiKey {your_api_key}'
Responsejson
{  "count": 0,  "hasMore": true,  "limit": 1,  "nextCursor": "string",  "page": 1,  "templates": [    {      "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    }  ]}

Preview table template

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

Requirestables:read

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

Path parameters

  • project_idstringRequired
  • template_idstringRequired

Returns

200application/json

  • created_atintegerRequired

    At least 0.

  • updated_atintegerRequired

    At least 0.

  • idstringRequired
  • categorystringRequired
  • columns_jsonarray of objectsRequired

    1 to 100 items.

  • creator_display_namestringRequirednullable
  • creator_user_idstringRequirednullable
  • descriptionstringRequirednullable
  • insert_modestringRequired
    Allowed values
    appenddedupmergereplace
  • instructionstringRequirednullable
  • merge_columns_jsonarray of stringsRequirednullable

    At least 1 items.

  • namestringRequired
  • strictnessstringRequired
    Allowed values
    strictbalancedflexible
  • usage_countintegerRequired

Errors

  • 404not_foundtable_not_found
  • 500captcha_unavailableinternal_server_error
Errors every endpoint can return
Requestbash
curl 'https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}' \  -H 'Authorization: ApiKey {your_api_key}'
Responsejson
{  "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}

Create table from template

POST/v1/projects/{project_id}/table-templates/{template_id}/use

Requirestables:write

Path parameters

  • project_idstringRequired
  • template_idstringRequired

Request body

application/json

  • namestringRequired

    1 to 128 characters.

  • slugstringoptional

    Stored lowercased: Quarterly Report reads back as quarterly report.

    1 to 50 characters.

Returns

201application/json

  • created_atintegerRequired

    At least 0.

  • deleted_atintegerRequirednullable

    At least 0.

  • updated_atintegerRequired

    At least 0.

  • idstringRequired
  • project_idstringRequired
  • namestringRequired
  • slugstringRequired
  • columns_jsonarray of objectsRequired

    1 to 100 items.

  • instructionstringRequirednullable
  • strictnessstringRequired
    Allowed values
    strictbalancedflexible
  • insert_modestringRequired
    Allowed values
    appenddedupmergereplace
  • merge_columns_jsonarray of stringsRequirednullable

    At least 1 items.

  • default_sortstringRequirednullable
  • row_countintegerRequired
  • usage_countintegerRequired
  • data_versionintegerRequired
  • fts_versionintegerRequired
  • last_used_atintegerRequirednullable

Errors

  • 402api_request_limit_exceededfeature_not_availabletable_plan_limit
  • 404not_foundtable_not_found
  • 409table_project_id_slug_duplicate
  • 500captcha_unavailableinternal_server_errortable_create_failed
Errors every endpoint can return
Requestbash
curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}/use' \  -H 'Authorization: ApiKey {your_api_key}' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "slug": "string"}'
Responsejson
{  "created_at": 1711468800000,  "deleted_at": 1711468800000,  "updated_at": 1711468800000,  "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6",  "project_id": "string",  "name": "string",  "slug": "string",  "columns_json": [    {      "currency_code": "string",      "description": "string",      "id": "string",      "instruction": "string",      "name": "string",      "options": [        "string"      ],      "required": false,      "searchable": true,      "type": "string"    }  ],  "instruction": "string",  "strictness": "strict",  "insert_mode": "append",  "merge_columns_json": [    "string"  ],  "default_sort": "string",  "row_count": 42,  "usage_count": 42,  "data_version": 42,  "fts_version": 42,  "last_used_at": 1711468800000}

Create table template

POST/v1/table-templates

Request body

application/json

  • categorystringRequired

    1 to 64 characters.

  • columns_jsonarray of objectsRequirednullable

    1 to 100 items.

  • descriptionstringoptionalnullable

    Up to 512 characters.

  • insert_modestringoptional
    Allowed values
    appenddedupmergereplace
  • instructionstringoptionalnullable

    Up to 512 characters.

  • merge_columns_jsonarray of stringsoptionalnullable

    At least 1 items.

  • namestringRequired

    1 to 128 characters.

  • strictnessstringoptional
    Allowed values
    strictbalancedflexible

Returns

201application/json

  • created_atintegerRequired

    At least 0.

  • updated_atintegerRequired

    At least 0.

  • idstringRequired
  • categorystringRequired
  • columns_jsonarray of objectsRequired

    1 to 100 items.

  • creator_display_namestringRequirednullable
  • creator_user_idstringRequirednullable
  • descriptionstringRequirednullable
  • insert_modestringRequired
    Allowed values
    appenddedupmergereplace
  • instructionstringRequirednullable
  • merge_columns_jsonarray of stringsRequirednullable

    At least 1 items.

  • namestringRequired
  • strictnessstringRequired
    Allowed values
    strictbalancedflexible
  • usage_countintegerRequired

Errors

  • 404not_found
  • 500captcha_unavailableinternal_server_errortable_template_create_failed
  • 502bad_gatewayemail_send_failed
Errors every endpoint can return
Requestbash
curl -X POST 'https://api.anyrow.ai/v1/table-templates' \  -H 'Authorization: ApiKey {your_api_key}' \  -H 'Content-Type: application/json' \  -d '{  "category": "string",  "columns_json": [    {      "currency_code": "string",      "description": "string",      "id": "string",      "instruction": "string",      "name": "string",      "options": [        "string"      ],      "required": false,      "searchable": true,      "type": "string"    }  ],  "description": "string",  "insert_mode": "append",  "instruction": "string",  "merge_columns_json": [    "string"  ],  "name": "string",  "strictness": "strict"}'
Responsejson
{  "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}

List my table templates

GET/v1/table-templates/mine

Query parameters

  • cursorstringoptional

    Opaque cursor for forward pagination. Pass the nextCursor from the previous response with the same order. Takes precedence over page when both are sent.

    Up to 8192 characters.

  • orderstringoptional

    Sort keys, comma-separated, each field[.asc|.desc][.nullsfirst|.nullslast]; at most 3. Sortable: category, created_at, name, updated_at, usage_count. Default: category.desc. Nulls sort last ascending and first descending unless stated.

    Matches
    ^(?:category|created_at|name|updated_at|usage_count)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?(?:,(?:category|created_at|name|updated_at|usage_count)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?){0,2}$

    Up to 200 characters.

  • filterstringoptional

    Filter expression field.op.value; , joins conditions with AND; group with or(...) and and(...). Fields: category (enum: eq, ne, neq, in, nin, is); created_at (number: eq, ne, neq, gt, gte, lt, lte, in, nin, is); id (string: eq, ne, neq, like, ilike, in, nin, is); name (string: eq, ne, neq, like, ilike, in, nin, is). like is case-sensitive and ilike ignores ASCII case; * is the wildcard. in/nin take (a,b); is takes null or notnull, and true or false on a boolean. At most 20 conditions, 3 nested groups, 50 in/nin values per list, 60 values in all, 50 bytes in a like or ilike pattern once escaped, and at most 4608 bytes however a URL or a form encodes it.

    Up to 2048 characters.

  • qstringoptional

    Free-text search over: name, description, creator_display_name. Whitespace-separated terms must all match; at most 8 terms, and at most 600 bytes however a URL or a form encodes it.

    Up to 200 characters.

  • selectstringoptional

    PostgREST-style sparse fieldset. Scalars comma-separated; relations embedded as name(fields); wildcard * selects all scalars. Docs: https://docs.postgrest.org/en/stable/references/api/resource_embedding.html (opens in a new tab)

    Up to 500 characters.

  • limitintegeroptional

    Maximum number of items per page, in decimal digits. Defaults to 20, capped by the endpoint's maxLimit.

    Default
    20

    Between 1 and 100.

  • pageintegeroptional

    1-based page number for offset pagination, up to the endpoint's maxPage (x-comb); page further by cursor. A page that is no whole number from 1, in decimal digits, is a 400 invalid_page, and one past maxPage a 400 page_too_deep, with or without a cursor. Ignored when cursor is present.

    Between 1 and 10000.

Returns

200application/json

  • countintegerRequirednullable

    At least 0.

  • hasMorebooleanRequired
  • limitintegerRequired

    At least 1.

  • nextCursorstringRequirednullable
  • pageintegerRequirednullable

    At least 1.

  • templatesarray of objectsRequired

Errors

  • 404not_found
  • 500captcha_unavailableinternal_server_error
  • 502bad_gatewayemail_send_failed
Errors every endpoint can return
Requestbash
curl 'https://api.anyrow.ai/v1/table-templates/mine' \  -H 'Authorization: ApiKey {your_api_key}'
Responsejson
{  "count": 0,  "hasMore": true,  "limit": 1,  "nextCursor": "string",  "page": 1,  "templates": [    {      "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    }  ]}

Update table template

PATCH/v1/table-templates/{template_id}

Path parameters

  • template_idstringRequired

Request body

application/json

  • categorystringoptional

    1 to 64 characters.

  • columns_jsonarray of objectsoptionalnullable

    1 to 100 items.

  • descriptionstringoptionalnullable

    Up to 512 characters.

  • insert_modestringoptional
    Allowed values
    appenddedupmergereplace
  • instructionstringoptionalnullable

    Up to 512 characters.

  • merge_columns_jsonarray of stringsoptionalnullable

    At least 1 items.

  • namestringoptional

    1 to 128 characters.

  • strictnessstringoptional
    Allowed values
    strictbalancedflexible

Returns

200application/json

  • created_atintegerRequired

    At least 0.

  • updated_atintegerRequired

    At least 0.

  • idstringRequired
  • categorystringRequired
  • columns_jsonarray of objectsRequired

    1 to 100 items.

  • creator_display_namestringRequirednullable
  • creator_user_idstringRequirednullable
  • descriptionstringRequirednullable
  • insert_modestringRequired
    Allowed values
    appenddedupmergereplace
  • instructionstringRequirednullable
  • merge_columns_jsonarray of stringsRequirednullable

    At least 1 items.

  • namestringRequired
  • strictnessstringRequired
    Allowed values
    strictbalancedflexible
  • usage_countintegerRequired

Errors

  • 403email_not_verifiedforbiddenimpersonation_forbiddenorg_suspendedtable_template_forbidden
  • 404not_foundtable_template_not_found
  • 500captcha_unavailableinternal_server_errortable_template_update_failed
  • 502bad_gatewayemail_send_failed
Errors every endpoint can return
Requestbash
curl -X PATCH 'https://api.anyrow.ai/v1/table-templates/{template_id}' \  -H 'Authorization: ApiKey {your_api_key}' \  -H 'Content-Type: application/json' \  -d '{  "category": "string",  "columns_json": [    {      "currency_code": "string",      "description": "string",      "id": "string",      "instruction": "string",      "name": "string",      "options": [        "string"      ],      "required": false,      "searchable": true,      "type": "string"    }  ],  "description": "string",  "insert_mode": "append",  "instruction": "string",  "merge_columns_json": [    "string"  ],  "name": "string",  "strictness": "strict"}'
Responsejson
{  "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}

Delete table template

DELETE/v1/table-templates/{template_id}

Path parameters

  • template_idstringRequired

Returns

200application/json

  • idstringRequired

Errors

  • 403email_not_verifiedforbiddenimpersonation_forbiddenorg_suspendedtable_template_forbidden
  • 404not_foundtable_template_not_found
  • 500captcha_unavailableinternal_server_errortable_template_delete_failed
  • 502bad_gatewayemail_send_failed
Errors every endpoint can return
Requestbash
curl -X DELETE 'https://api.anyrow.ai/v1/table-templates/{template_id}' \  -H 'Authorization: ApiKey {your_api_key}'
Responsejson
{  "id": "string"}