---
updatedAt: 2025-09-11T20:21:43.000Z
agentTools:
  projectIndex: https://docs.gathercontent.com/llms.txt
---

# Rename template

Rename an existing template

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "GatherContent API",
    "description": "This is the documentation for the latest stable version of the GatherContent API Find out more about GatherContent at [https://gathercontent.com](https://gathercontent.com) or get help at [https://help.gathercontent.com](https://help.gathercontent.com)",
    "version": "2.0.0",
    "termsOfService": "https://gathercontent.com/legal/terms-of-service",
    "contact": {
      "email": "development@gathercontent.com"
    }
  },
  "x-samples-languages": [
    "curl",
    "node",
    "ruby",
    "javascript",
    "python"
  ],
  "servers": [
    {
      "url": "https://api.gathercontent.com"
    },
    {
      "url": "https://api.gatherpreview.com"
    },
    {
      "url": "http://api.gathercontent.test"
    }
  ],
  "externalDocs": {
    "description": "GatherContent help docs",
    "url": "https://help.gathercontent.com"
  },
  "paths": {
    "/templates/{template_id}/rename": {
      "parameters": [
        {
          "$ref": "#/components/parameters/templateId"
        }
      ],
      "post": {
        "operationId": "renameTemplate",
        "summary": "Rename template",
        "description": "Rename an existing template",
        "tags": [
          "Templates"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/vnd.gathercontent.v2+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/templateDefinition"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/insufficientRoles"
          },
          "404": {
            "$ref": "#/components/responses/templateNotFoundError"
          },
          "422": {
            "$ref": "#/components/responses/validationError"
          },
          "429": {
            "$ref": "#/components/responses/tooManyRequests"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Templates",
      "description": "Templates are how we share structure between multiple items. A template is a link to a `structure` with a `name`, it's also given a unique `id`. Because of this, to alter a templates structure, call the \"Alter structure\" endpoint."
    }
  ],
  "components": {
    "parameters": {
      "templateId": {
        "name": "template_id",
        "description": "Template ID",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer"
        }
      }
    },
    "schemas": {
      "uuid": {
        "type": "string",
        "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
        "example": "aa23428b-9b43-4d7f-8c5c-0fb5fc3a944e"
      },
      "datetimeNullable": {
        "type": "string",
        "description": "DateTimes are all in UTC - it's up to the client to convert them to an appropriate time zone",
        "pattern": "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}",
        "example": "2019-04-20T04:20:00.000Z",
        "nullable": true
      },
      "templateDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "number_of_items_using": {
            "type": "integer"
          },
          "structure_uuid": {
            "$ref": "#/components/schemas/uuid"
          },
          "project_id": {
            "type": "integer"
          },
          "updated_at": {
            "$ref": "#/components/schemas/datetimeNullable"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "responses": {
      "insufficientRoles": {
        "description": "Insufficient permission to perform this action",
        "content": {
          "application/vnd.gathercontent.v2+json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "Insufficient permission to perform this action"
                },
                "code": {
                  "type": "integer",
                  "example": 403
                }
              }
            }
          }
        }
      },
      "validationError": {
        "description": "Validation error",
        "content": {
          "application/vnd.gathercontent.v2+json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "The given data was invalid"
                },
                "code": {
                  "type": "integer",
                  "example": 422
                },
                "messages": {
                  "type": "object",
                  "description": "Key/value mapping of invalid field => failure reason. This changes depending on which data is invalid."
                }
              }
            }
          }
        }
      },
      "tooManyRequests": {
        "description": "Too many request",
        "content": {
          "application/vnd.gathercontent.v2+json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "Too Many Attempts."
                },
                "code": {
                  "type": "integer",
                  "example": 429
                }
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "schema": {
              "type": "integer"
            },
            "description": "Request limit."
          },
          "X-RateLimit-Remaining": {
            "schema": {
              "type": "integer"
            },
            "description": "The number of requests left for the time window."
          },
          "X-RateLimit-Reset": {
            "schema": {
              "type": "string"
            },
            "description": "The Unix timestamp at which the current rate limit window resets."
          },
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "The number of seconds before the current rate limit window resets."
          }
        }
      },
      "templateNotFoundError": {
        "description": "Template not found",
        "content": {
          "application/vnd.gathercontent.v2+json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "Template not found"
                },
                "code": {
                  "type": "integer",
                  "example": 404
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```