Skip to main content
POST
/
cowrite
/
organization
/
{organizationId}
/
team
/
{teamId}
/
generate
cURL
curl --request POST \
  --url https://enterprise-api.writer.com/cowrite/organization/{organizationId}/team/{teamId}/generate \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "templateId": "<string>",
  "inputs": [
    {
      "name": "<string>",
      "value": [
        "<string>"
      ]
    }
  ]
}
'
import requests

url = "https://enterprise-api.writer.com/cowrite/organization/{organizationId}/team/{teamId}/generate"

payload = {
"templateId": "<string>",
"inputs": [
{
"name": "<string>",
"value": ["<string>"]
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({templateId: '<string>', inputs: [{name: '<string>', value: ['<string>']}]})
};

fetch('https://enterprise-api.writer.com/cowrite/organization/{organizationId}/team/{teamId}/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "organizationId": 123,
  "teamId": 123,
  "documentId": "<string>",
  "templateId": "<string>",
  "body": "<string>",
  "inputs": "<unknown>",
  "deleted": true,
  "createdUserId": 123,
  "creationTime": "2023-11-07T05:31:56Z",
  "id": 123,
  "title": "<string>"
}
{
"tpe": "<string>",
"extras": "<unknown>",
"errors": [
{
"description": "<string>",
"key": "<string>",
"extras": "<unknown>"
}
]
}
{
"tpe": "<string>",
"extras": "<unknown>",
"errors": [
{
"description": "<string>",
"key": "<string>",
"extras": "<unknown>"
}
]
}
{
"tpe": "<string>",
"extras": "<unknown>",
"errors": [
{
"description": "<string>",
"key": "<string>",
"extras": "<unknown>"
}
]
}
{
"tpe": "<string>",
"extras": "<unknown>",
"errors": [
{
"description": "<string>",
"key": "<string>",
"extras": "<unknown>"
}
]
}
{
"tpe": "<string>",
"extras": "<unknown>",
"errors": [
{
"description": "<string>",
"key": "<string>",
"extras": "<unknown>"
}
]
}
We’re deprecating these API endpoints, so the AI Studio API key setup won’t work. [Contact support] (https://support.writer.com/) if you need them.

Headers

Authorization
string
required

Path Parameters

organizationId
integer<int64>
required
teamId
integer<int64>
required

Body

application/json
templateId
string
required
inputs
object[]

Response

organizationId
integer<int64>
required
teamId
integer<int64>
required
documentId
string
required
templateId
string
required
body
string
required
inputs
any
required
deleted
boolean
required
createdUserId
integer<int64>
required
creationTime
string<date-time>
required
id
integer<int64>
title
string