--- title: "API reference: Templates" slug: "api-reference-templates" updated: 2026-07-31T06:51:16Z published: 2026-07-31T06:51:16Z canonical: "help.elaine.io/api-reference-templates" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.elaine.io/llms.txt > Use this file to discover all available pages before exploring further. # API reference: Templates API reference: Templates documents the function signatures, parameters, return values, and error behavior of the Elaine HTTP API. > [!NOTE] > Note > > Function availability depends on the Elaine release and enabled features. Authenticate HTTP requests with an Elaine-issued Bearer JWT. ## Function overview | array\|integer | api_getTemplateContent ( int $template_id ) | | --- | --- | | | Returns the content of the template $template_id. | | array\|integer | api_getTemplates () | | | Returns an array of all templates with the ID as key and the name as value. | ## Functions ## ### **api_getTemplateContent** #### array|integer api_getTemplateContent( int $template_id ) SINCE 5.11.4 Returns the content of the template `$template_id`. #### Parameters | int | $template_id | Template ID | | --- | --- | --- | #### Return Value | array\|integer | Contents of template | | --- | --- | ### **api_getTemplates** () #### array|integer api_getTemplates () SINCE 5.11.4 Returns an array of all templates with the ID as key and the name as value. #### Return Value | array\|integer | Template list | | --- | --- | ## Related topics - [API reference](/new-public-docs/docs/en/api-reference) - [Call the HTTP API with cURL](/new-public-docs/docs/en/api-http-requests) - [Authentication, network security, and VPN](/new-public-docs/docs/en/api-authentication-security)