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

# Update the tenant repurpose template

> Deep-merges the supplied values into the stored template. Omitted keys keep their current values, and unknown keys are stripped before validation. The per-platform sub-objects all have identical fields.



## OpenAPI

````yaml /api-reference/ai-cms/openapi-TAGTEST.json put /ai/repurpose/template
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /ai/repurpose/template:
    put:
      tags:
        - AI Automation
      summary: Update the tenant repurpose template
      description: >-
        Deep-merges the supplied values into the stored template. Omitted keys
        keep their current values, and unknown keys are stripped before
        validation. The per-platform sub-objects all have identical fields.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                defaults:
                  type: object
                  additionalProperties: false
                  description: Tenant-wide defaults applied to every platform
                  properties:
                    language:
                      type: string
                      maxLength: 20
                      example: en
                    tone:
                      type: string
                      enum:
                        - professional
                        - friendly
                        - casual
                        - technical
                    length:
                      type: string
                      enum:
                        - short
                        - medium
                        - long
                platforms:
                  type: object
                  additionalProperties: false
                  description: >-
                    Per-platform overrides. Every platform sub-object has the
                    same fields.
                  properties:
                    linkedin:
                      type: object
                      additionalProperties: false
                      properties:
                        tone:
                          type: string
                          enum:
                            - professional
                            - friendly
                            - casual
                            - technical
                        length:
                          type: string
                          enum:
                            - short
                            - medium
                            - long
                        opening:
                          type: string
                          maxLength: 300
                          description: Opening line template
                        closing:
                          type: string
                          maxLength: 300
                          description: Closing line template
                        ctaTemplate:
                          type: string
                          maxLength: 300
                          description: Call-to-action line
                          example: Share your perspective in the comments.
                        hashtagStyle:
                          type: string
                          maxLength: 300
                          description: Guidance for hashtag selection
                          example: industry and thought-leadership hashtags
                        maxHashtags:
                          type: integer
                          minimum: 0
                          maximum: 30
                        extraInstructions:
                          type: string
                          maxLength: 1000
                          description: Free-form extra guidance for the generator
                    twitter:
                      type: object
                      additionalProperties: false
                      properties:
                        tone:
                          type: string
                          enum:
                            - professional
                            - friendly
                            - casual
                            - technical
                        length:
                          type: string
                          enum:
                            - short
                            - medium
                            - long
                        opening:
                          type: string
                          maxLength: 300
                          description: Opening line template
                        closing:
                          type: string
                          maxLength: 300
                          description: Closing line template
                        ctaTemplate:
                          type: string
                          maxLength: 300
                          description: Call-to-action line
                          example: Reply with your take.
                        hashtagStyle:
                          type: string
                          maxLength: 300
                          description: Guidance for hashtag selection
                          example: short and specific hashtags
                        maxHashtags:
                          type: integer
                          minimum: 0
                          maximum: 30
                        extraInstructions:
                          type: string
                          maxLength: 1000
                          description: Free-form extra guidance for the generator
                    telegram:
                      type: object
                      additionalProperties: false
                      properties:
                        tone:
                          type: string
                          enum:
                            - professional
                            - friendly
                            - casual
                            - technical
                        length:
                          type: string
                          enum:
                            - short
                            - medium
                            - long
                        opening:
                          type: string
                          maxLength: 300
                          description: Opening line template
                        closing:
                          type: string
                          maxLength: 300
                          description: Closing line template
                        ctaTemplate:
                          type: string
                          maxLength: 300
                          description: Call-to-action line
                          example: Read the full article for details.
                        hashtagStyle:
                          type: string
                          maxLength: 300
                          description: Guidance for hashtag selection
                          example: topic hashtags
                        maxHashtags:
                          type: integer
                          minimum: 0
                          maximum: 30
                        extraInstructions:
                          type: string
                          maxLength: 1000
                          description: Free-form extra guidance for the generator
                    instagram:
                      type: object
                      additionalProperties: false
                      properties:
                        tone:
                          type: string
                          enum:
                            - professional
                            - friendly
                            - casual
                            - technical
                        length:
                          type: string
                          enum:
                            - short
                            - medium
                            - long
                        opening:
                          type: string
                          maxLength: 300
                          description: Opening line template
                        closing:
                          type: string
                          maxLength: 300
                          description: Closing line template
                        ctaTemplate:
                          type: string
                          maxLength: 300
                          description: Call-to-action line
                          example: Save this post and share it with your network.
                        hashtagStyle:
                          type: string
                          maxLength: 300
                          description: Guidance for hashtag selection
                          example: discoverability hashtags
                        maxHashtags:
                          type: integer
                          minimum: 0
                          maximum: 30
                        extraInstructions:
                          type: string
                          maxLength: 1000
                          description: Free-form extra guidance for the generator
            examples:
              Update Defaults Only:
                value:
                  defaults:
                    language: es
                    tone: friendly
              Update One Platform:
                value:
                  platforms:
                    linkedin:
                      tone: technical
                      maxHashtags: 3
                      extraInstructions: Avoid hype words.
      responses:
        '200':
          description: OK (template updated)
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: Repurpose template updated
                data:
                  tenantId: '{{objectId}}'
                  defaults:
                    language: es
                    tone: friendly
                    length: medium
                  platforms:
                    linkedin:
                      tone: technical
                      length: medium
                      ctaTemplate: Share your perspective in the comments.
                      hashtagStyle: industry and thought-leadership hashtags
                      maxHashtags: 3
                  updatedBy: '{{objectId}}'
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/SocialTemplate'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden (role not allowed)
        '406':
          description: Validation failed
        '500':
          description: Failed to update the template
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Envelope:
      type: object
      properties:
        success:
          type: boolean
        statusCode:
          type: integer
        message:
          type: string
        data:
          type:
            - object
            - 'null'
      required:
        - success
        - statusCode
        - message
        - data
    SocialTemplate:
      type: object
      properties:
        defaults:
          $ref: '#/components/schemas/SocialTemplateDefaults'
        platforms:
          type: object
          properties:
            linkedin:
              $ref: '#/components/schemas/SocialPlatformTemplate'
            twitter:
              $ref: '#/components/schemas/SocialPlatformTemplate'
            telegram:
              $ref: '#/components/schemas/SocialPlatformTemplate'
            instagram:
              $ref: '#/components/schemas/SocialPlatformTemplate'
    SocialTemplateDefaults:
      type: object
      properties:
        language:
          type: string
        tone:
          type: string
        length:
          type: string
    SocialPlatformTemplate:
      type: object
      properties:
        tone:
          type: string
        length:
          type: string
        ctaTemplate:
          type: string
        hashtagStyle:
          type: string
        maxHashtags:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````