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

# Save Document Template Stream

> Writes content in stream to document template file



## OpenAPI

````yaml /openapi/rest/openapi-v3-List.json put /api/v1/List/DocumentTemplate/Items/{documentTemplateId}/Content/{languageCode}
openapi: 3.0.0
info:
  version: v1-REST
  title: SuperOffice REST API v1
  description: SuperOffice REST API - List
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/List/DocumentTemplate/Items/{documentTemplateId}/Content/{languageCode}:
    put:
      tags:
        - List_DocumentTemplate
      summary: Save Document Template Stream
      description: Writes content in stream to document template file
      operationId: v1DocumentTemplateList_SaveDocumentTemplateStream
      parameters:
        - name: documentTemplateId
          in: path
          description: Identifier for document template
          required: true
          schema:
            format: int32
            type: integer
        - name: languageCode
          in: path
          description: >-
            Language variation of template to update. (ISO code: "en-US" or
            "nb-NO" etc). Used to select a template of the appropriate language.
            Can be overridden in SO ARC by user preference "PreferDocLang".
          required: true
          schema:
            type: string
        - name: pluginId
          in: query
          description: >-
            Plugin to use for storing document content. 0 = SOARC. Use -1 to use
            the plugin specified in the template.
          required: false
          schema:
            format: int32
            type: integer
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              format: byte
              type: string
          text/json:
            schema:
              format: byte
              type: string
          application/xml:
            schema:
              format: byte
              type: string
          text/xml:
            schema:
              format: byte
              type: string
          application/x-www-form-urlencoded:
            schema:
              format: byte
              type: string
          image/jpeg:
            schema:
              format: byte
              type: string
          image/jpg:
            schema:
              format: byte
              type: string
          image/png:
            schema:
              format: byte
              type: string
          image/gif:
            schema:
              format: byte
              type: string
          image/bmp:
            schema:
              format: byte
              type: string
          image/tiff:
            schema:
              format: byte
              type: string
          application/octet-stream:
            schema:
              format: byte
              type: string
          application/msword:
            schema:
              format: byte
              type: string
          application/rtf:
            schema:
              format: byte
              type: string
          application/vnd.openxmlformats-officedocument.wordprocessingml.document:
            schema:
              format: byte
              type: string
          application/vnd.ms-excel:
            schema:
              format: byte
              type: string
          application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
            schema:
              format: byte
              type: string
          application/vnd.ms-powerpoint:
            schema:
              format: byte
              type: string
          application/vnd.openxmlformats-officedocument.presentationml.presentation:
            schema:
              format: byte
              type: string
          multipart/form-data:
            schema:
              format: byte
              type: string
          application/json-patch+json:
            schema:
              format: byte
              type: string
          application/merge-patch+json:
            schema:
              format: byte
              type: string
        description: Stream containing content to be saved to document template file
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Documents.TemplateInfo'
            text/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Documents.TemplateInfo'
            application/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Documents.TemplateInfo'
            text/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Documents.TemplateInfo'
            application/json-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Documents.TemplateInfo'
            application/merge-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Documents.TemplateInfo'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.CRM.Documents.TemplateInfo:
      type: object
      properties:
        Name:
          type: string
        Description:
          type: string
        ExternalReference:
          type: string
        MimeType:
          type: string
        PluginId:
          format: int32
          type: integer

````

## Related topics

- [Save Document Template Stream](/en/api/reference/restful/agent/document_agent/save-document-template-stream.md)
- [Add a document template](/en/api/web-services/howto/document/rest-add-document-template.md)
- [SuperOffice.WebApi.Data.Document SaveDocumentTemplateStreamRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Document_SaveDocumentTemplateStreamRequest.md)
- [SuperOffice.WebApi.Data.List SaveDocumentTemplateStreamRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.List_SaveDocumentTemplateStreamRequest.md)
- [NSDocumentAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSDocumentAgent.md)
