Update snippets
curl --request PUT \
--url https://enterprise-api.writer.com/snippet/organization/{organizationId}/team/{teamId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"snippet": "<string>",
"shortcut": "<string>",
"description": "<string>",
"tags": [
{
"tag": "<string>"
}
]
}
]
'import requests
url = "https://enterprise-api.writer.com/snippet/organization/{organizationId}/team/{teamId}"
payload = [
{
"id": "<string>",
"snippet": "<string>",
"shortcut": "<string>",
"description": "<string>",
"tags": [{ "tag": "<string>" }]
}
]
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '<string>',
snippet: '<string>',
shortcut: '<string>',
description: '<string>',
tags: [{tag: '<string>'}]
}
])
};
fetch('https://enterprise-api.writer.com/snippet/organization/{organizationId}/team/{teamId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"id": "<string>",
"snippet": "<string>",
"creationTime": "2023-11-07T05:31:56Z",
"modificationTime": "2023-11-07T05:31:56Z",
"createdUser": {
"id": 123,
"fullName": "<string>",
"email": "<string>"
},
"modifiedUser": {
"id": 123,
"fullName": "<string>",
"email": "<string>"
},
"shortcut": "<string>",
"description": "<string>",
"tags": [
{
"tag": "<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>"
}
]
}Snippet
Update snippets
PUT
/
snippet
/
organization
/
{organizationId}
/
team
/
{teamId}
Update snippets
curl --request PUT \
--url https://enterprise-api.writer.com/snippet/organization/{organizationId}/team/{teamId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"snippet": "<string>",
"shortcut": "<string>",
"description": "<string>",
"tags": [
{
"tag": "<string>"
}
]
}
]
'import requests
url = "https://enterprise-api.writer.com/snippet/organization/{organizationId}/team/{teamId}"
payload = [
{
"id": "<string>",
"snippet": "<string>",
"shortcut": "<string>",
"description": "<string>",
"tags": [{ "tag": "<string>" }]
}
]
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '<string>',
snippet: '<string>',
shortcut: '<string>',
description: '<string>',
tags: [{tag: '<string>'}]
}
])
};
fetch('https://enterprise-api.writer.com/snippet/organization/{organizationId}/team/{teamId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"id": "<string>",
"snippet": "<string>",
"creationTime": "2023-11-07T05:31:56Z",
"modificationTime": "2023-11-07T05:31:56Z",
"createdUser": {
"id": 123,
"fullName": "<string>",
"email": "<string>"
},
"modifiedUser": {
"id": 123,
"fullName": "<string>",
"email": "<string>"
},
"shortcut": "<string>",
"description": "<string>",
"tags": [
{
"tag": "<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.
Body
application/json
Was this page helpful?
⌘I