> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentgate.mynewapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Template

> Update a template configuration

<ParamField path="id" type="string" required>
  Template ID to update.
</ParamField>

<ParamField body="name" type="string">
  Updated template name.
</ParamField>

<ParamField body="description" type="string">
  Updated description.
</ParamField>

<ParamField body="source" type="object">
  Updated source configuration.
</ParamField>

<ParamField body="variables" type="array">
  Updated variable definitions.
</ParamField>

<ParamField body="hooks" type="object">
  Updated lifecycle hooks.
</ParamField>

<ParamField body="tags" type="array">
  Updated tags.
</ParamField>

<Warning>
  Built-in templates cannot be updated.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://agentgate.mynewapi.com/v1/templates/our-api-template \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Our API Template v2",
      "description": "Updated template with new conventions",
      "source": {
        "type": "git",
        "repository": "https://github.com/our-org/api-template",
        "branch": "v2"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "our-api-template",
    "name": "Our API Template v2",
    "description": "Updated template with new conventions",
    "source": {
      "type": "git",
      "repository": "https://github.com/our-org/api-template",
      "branch": "v2"
    },
    "variables": [...],
    "builtIn": false,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T11:00:00Z"
  }
  ```
</ResponseExample>
