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

# Update template

> Update a shared or personal template



## OpenAPI

````yaml /developers/openapi.yaml patch /v1/templates/{template_id}
openapi: 3.0.3
info:
  title: TalkToHumans Public API
  version: 1.0.0
  license:
    name: Proprietary
  description: >
    Read and organize the LinkedIn organization data your team already manages
    in TalkToHumans: accounts, contacts, tags, notes, sequence state,
    conversations, templates, and views.
servers:
  - url: https://api.talktohumans.app
    description: TalkToHumans API
security:
  - bearerAuth: []
tags:
  - name: Organization
    description: Organization details for the current API key.
  - name: LinkedIn
    description: LinkedIn accounts, contacts, companies, and conversations.
  - name: Activity
    description: Activity for organization reporting.
  - name: Enrich
    description: Profile enrichment for LinkedIn contacts and companies.
  - name: Views
    description: Saved TalkToHumans views.
  - name: Templates
    description: Message and sequence templates.
paths:
  /v1/templates/{template_id}:
    patch:
      tags:
        - Templates
      summary: Update template
      description: Update a shared or personal template
      operationId: updateTemplate
      parameters:
        - name: template_id
          in: path
          required: true
          description: Template ID returned by `GET /v1/templates` or `POST /v1/templates`.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTemplateRequest'
            examples:
              rename:
                summary: Rename a template
                value:
                  name: Event follow-up (short)
              content:
                summary: Replace message content
                value:
                  content: >-
                    Hi {{first_name}}, great meeting you at {{event_name}}. Open
                    to a quick call?
      responses:
        '200':
          description: Template updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateEnvelope'
              example:
                data:
                  template:
                    template_id: tpl_6f1d2c3a-8b4e-4f5a-9c7d-2e1b0a9f8c7d
                    name: Event follow-up
                    type: message
                    scope: shared
                    content: >-
                      Hi {{first_name}}, great meeting you at {{event_name}}.
                      Open to a quick call?
                    created_at: '2026-06-02T12:00:00Z'
                    updated_at: '2026-06-09T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    UpdateTemplateRequest:
      type: object
      additionalProperties: false
      description: >-
        Provide at least one of `name`, `content`, or `steps`. Omitted fields
        are unchanged.
      minProperties: 1
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
          description: Template name shown in TalkToHumans.
        content:
          type: string
          minLength: 1
          description: Plain-text message. Message templates only.
        steps:
          type: array
          minItems: 1
          description: Replacement for all steps. Sequence templates only.
          items:
            $ref: '#/components/schemas/TemplateStep'
    TemplateEnvelope:
      type: object
      additionalProperties: false
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/TemplateResponse'
    TemplateStep:
      type: object
      additionalProperties: false
      required:
        - type
        - delay_minutes
      properties:
        type:
          type: string
          enum:
            - message
            - connection_request
        delay_minutes:
          type: integer
          minimum: 0
          description: >-
            Minutes to wait after the previous step, or after launch for the
            first step.
        content:
          type: string
          description: >-
            Plain-text message, required for message steps. For connection
            requests, the optional note, up to 200 characters.
    TemplateResponse:
      type: object
      additionalProperties: false
      required:
        - template
      properties:
        template:
          $ref: '#/components/schemas/Template'
    Error:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code.
          enum:
            - unauthorized
            - forbidden
            - not_found
            - bad_request
            - internal_error
            - conflict
            - rate_limit_exceeded
            - account_shared_access_required
            - billing_payment_failed
            - billing_subscription_incomplete
            - billing_subscription_expired
            - billing_grace_period
            - billing_feature_not_available
            - billing_insufficient_credits
            - billing_invalid
            - enrichment_failed
            - enrichment_in_progress
            - linkedin_profile_not_found
        message:
          type: string
          description: Human-readable error message.
        debug:
          type: string
          description: Development-only debug details.
    Template:
      type: object
      additionalProperties: false
      required:
        - template_id
        - name
        - type
        - scope
        - created_at
        - updated_at
      properties:
        template_id:
          type: string
          description: >-
            Template ID. Pass as `template_id` to `POST /v1/drafts` to write a
            draft from this template.
        name:
          type: string
        type:
          type: string
          enum:
            - message
            - sequence
        scope:
          type: string
          description: >-
            Shared templates are visible to the whole workspace. Personal
            templates are visible only to their owner.
          enum:
            - shared
            - personal
        content:
          type: string
          description: Plain-text message, present for message templates.
        steps:
          type: array
          description: Ordered steps, present for sequence templates.
          items:
            $ref: '#/components/schemas/TemplateStep'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  responses:
    BadRequest:
      description: Invalid request. `message` explains what to fix.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: bad_request
            message: invalid type for field "account_id"
    Unauthorized:
      description: Missing, malformed, invalid, or retired local API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingAuthorization:
              value:
                code: unauthorized
                message: Authorization header is required
            invalidAuthorizationFormat:
              value:
                code: unauthorized
                message: Authorization header must use Bearer scheme
            invalidAPIKey:
              value:
                code: unauthorized
                message: Invalid API key
    Forbidden:
      description: >-
        API access is not enabled for the organization, or the API key cannot
        resolve to an active organization user.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              value:
                code: forbidden
                message: you don't have access to this organization
            featureUnavailable:
              value:
                code: billing_feature_not_available
                message: >-
                  Feature 'TalkToHumansAPI' is not available in your current
                  plan
            insufficientCredits:
              value:
                code: billing_insufficient_credits
                message: Insufficient credits
            apiKeyPrincipalInvalid:
              value:
                code: forbidden
                message: >-
                  This API key is no longer linked to an active organization
                  user. Ask an organization admin to regenerate it
    NotFound:
      description: Requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: not_found
            message: participant not found
    Conflict:
      description: Request conflicts with an existing resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: conflict
            message: custom field key already exists
    RateLimited:
      description: >-
        Rate limit exceeded. Public routes allow 50 requests per 10 seconds per
        IP and endpoint.
      headers:
        Retry-After:
          description: Seconds to wait before retrying the request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: rate_limit_exceeded
            message: Rate limit exceeded
    InternalServerError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: internal_error
            message: An internal error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Pass API key as `Authorization: Bearer <api_key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.