Skip to main content
PUT
https://agentgate.mynewapi.com
/
v1
/
templates
/
{id}
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"
    }
  }'
{
  "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"
}
id
string
required
Template ID to update.
name
string
Updated template name.
description
string
Updated description.
source
object
Updated source configuration.
variables
array
Updated variable definitions.
hooks
object
Updated lifecycle hooks.
tags
array
Updated tags.
Built-in templates cannot be updated.
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"
    }
  }'
{
  "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"
}