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

# Post cowriteorganization team generate

<Warning>
  We're deprecating these API endpoints, so the AI Studio API key setup won't work. \[Contact support] ([https://support.writer.com/](https://support.writer.com/)) if you need them.
</Warning>


## OpenAPI

````yaml post /cowrite/organization/{organizationId}/team/{teamId}/generate
openapi: 3.0.3
info:
  title: Writer Enterprise API
  version: '1.9'
servers:
  - url: https://enterprise-api.writer.com
security: []
tags:
  - name: content
    description: Content
  - name: snippet
    description: Snippet
  - name: coWrite
    description: CoWrite
  - name: user
    description: User
  - name: terminology
    description: Terminology
  - name: LLM
    description: LLM
  - name: billing
    description: Billing
  - name: styleguide
    description: Styleguide
paths:
  /cowrite/organization/{organizationId}/team/{teamId}/generate:
    post:
      tags:
        - coWrite
      operationId: generateContent
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
        - name: organizationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: teamId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTemplateRequest'
        required: true
      responses:
        '200':
          description: ''
          headers:
            Action-Id:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Draft'
        '400':
          description: Bad Request
          headers:
            Action-Id:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailResponse'
        '401':
          description: Unauthorized
          headers:
            Action-Id:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailResponse'
        '403':
          description: Forbidden
          headers:
            Action-Id:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailResponse'
        '404':
          description: Not Found
          headers:
            Action-Id:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailResponse'
        '500':
          description: Internal Server Error
          headers:
            Action-Id:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailResponse'
components:
  schemas:
    GenerateTemplateRequest:
      required:
        - templateId
      type: object
      properties:
        templateId:
          type: string
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/MagicRequestInput'
    Draft:
      required:
        - organizationId
        - teamId
        - documentId
        - templateId
        - body
        - inputs
        - deleted
        - createdUserId
        - creationTime
      type: object
      properties:
        id:
          type: integer
          format: int64
        organizationId:
          type: integer
          format: int64
        teamId:
          type: integer
          format: int64
        documentId:
          type: string
        templateId:
          type: string
        body:
          type: string
        title:
          type: string
        inputs:
          $ref: '#/components/schemas/Json'
        deleted:
          type: boolean
        createdUserId:
          type: integer
          format: int64
        creationTime:
          type: string
          format: date-time
    FailResponse:
      required:
        - tpe
        - extras
      type: object
      properties:
        tpe:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FailMessage'
        extras:
          $ref: '#/components/schemas/Json'
    MagicRequestInput:
      required:
        - name
      type: object
      properties:
        name:
          type: string
        value:
          type: array
          items:
            type: string
    Json: {}
    FailMessage:
      required:
        - description
        - key
        - extras
      type: object
      properties:
        description:
          type: string
        key:
          type: string
        extras:
          $ref: '#/components/schemas/Json'

````