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

# Update template settings

> Renames the template and/or sets its envelope name pattern. The pattern is resolved on every send into the envelope's default display name (an explicit displayName on the send still wins) and never changes existing envelopes. Tokens: {template_name}, {recipient_name}, {recipient_company}, {recipient_email}, {recipient_title}, {sender_org}, {sender_name}, {date} or {date:YYYY-MM}, {prefill:<prefill key>}, {role:<api role name>.<name|email|company|title>}. Pass namePattern: null to clear it.



## OpenAPI

````yaml /openapi.json patch /api/v1/templates/{id}
openapi: 3.0.0
info:
  title: Atlas API
  version: 0.0.0
servers:
  - url: https://api.atlaswork.ai
security: []
paths:
  /api/v1/templates/{id}:
    patch:
      tags:
        - Templates
      summary: Update template settings
      description: >-
        Renames the template and/or sets its envelope name pattern. The pattern
        is resolved on every send into the envelope's default display name (an
        explicit displayName on the send still wins) and never changes existing
        envelopes. Tokens: {template_name}, {recipient_name},
        {recipient_company}, {recipient_email}, {recipient_title}, {sender_org},
        {sender_name}, {date} or {date:YYYY-MM}, {prefill:<prefill key>},
        {role:<api role name>.<name|email|company|title>}. Pass namePattern:
        null to clear it.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: Template id
          required: true
          description: Template id
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                namePattern:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 200
      responses:
        '200':
          description: Updated template
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  organizationId:
                    type: string
                  teamId:
                    type: string
                  name:
                    type: string
                  namePattern:
                    type: string
                    nullable: true
                  originalFilename:
                    type: string
                  sourceFormat:
                    type: string
                  contentHash:
                    type: string
                  sizeBytes:
                    type: number
                  archivedAt:
                    type: string
                    nullable: true
                    format: date-time
                  useCount:
                    type: integer
                    minimum: 0
                  lastUsedAt:
                    type: string
                    nullable: true
                    format: date-time
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - organizationId
                  - teamId
                  - name
                  - namePattern
                  - originalFilename
                  - sourceFormat
                  - contentHash
                  - sizeBytes
                  - archivedAt
                  - useCount
                  - lastUsedAt
                  - createdAt
                  - updatedAt
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - code
                  - message
        '404':
          description: Template not found in this organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - code
                  - message
        '422':
          description: Template name or name pattern is invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - code
                  - message
      security:
        - apiKey: []
        - oauthJwt: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Organization API key (format `atlas_sk_...`), passed as a bearer token
        or the x-api-key header. Created and revoked in the dashboard (Better
        Auth api-key plugin); shown in full only once and stored hashed.
    oauthJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Better Auth OAuth resource access token. The token audience must match
        the Atlas MCP resource and include the scope required by the route.

````