v1

latestOpenAPI 3.1.0Any Source Available License 1.02026-07-1736102200.0 KB
Templates

Get template

Fetches full details for one template associated with a particular type in a space. The response provides the template’s identifier, name, icon, and any other relevant metadata. This endpoint is useful when a client needs to preview or apply a template to prefill object creation fields.

get/v1/spaces/{space_id}/types/{type_id}/templates/{template_id}

Path parameters

space_idstring required

The ID of the space to which the template belongs; must be retrieved from ListSpaces endpoint

type_idstring required

The ID of the type to which the template belongs; must be retrieved from ListTypes endpoint or obtained from response context

template_idstring required

The ID of the template to retrieve; must be retrieved from ListTemplates endpoint or obtained from response context

Headers

Anytype-Versionstring required

The version of the API to use

Response

The requested template

Example response

{
  "template": {
    "icon": {
      "emoji": "📄"
    },
    "id": "bafyreie6n5l5nkbjal37su54cha4coy7qzuhrnajluzv5qd5jvtsrxkequ",
    "layout": "basic",
    "markdown": "# This is the title\n...",
    "name": "My object",
    "object": "object",
    "properties": [
      {
        "id": "bafyreids36kpw5ppuwm3ce2p4ezb3ab7cihhkq6yfbwzwpp4mln7rcgw7a",
        "key": "description",
        "name": "Description",
        "object": "property",
        "text": "Some text..."
      }
    ],
    "snippet": "The beginning of the object body...",
    "space_id": "bafyreigyfkt6rbv24sbv5aq2hko3bhmv5xxlf22b4bypdu6j7hnphm3psq.23me69r569oi1",
    "type": {
      "icon": {
        "emoji": "📄"
      },
      "id": "bafyreigyb6l5szohs32ts26ku2j42yd65e6hqy2u3gtzgdwqv6hzftsetu",
      "key": "page",
      "name": "Page",
      "object": "type",
      "plural_name": "Pages",
      "properties": [
        {
          "id": "bafyreids36kpw5ppuwm3ce2p4ezb3ab7cihhkq6yfbwzwpp4mln7rcgw7a",
          "key": "last_modified_date",
          "name": "Last modified date",
          "object": "property"
        }
      ]
    }
  }
}