Create an attachment
curl --request POST \
--url https://api.zerogen.com/v1/projects/{projectId}/attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Direction",
"body": "Warm light and quiet movement."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Direction', body: JSON.stringify('Warm light and quiet movement.')})
};
fetch('https://api.zerogen.com/v1/projects/{projectId}/attachments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerogen.com/v1/projects/{projectId}/attachments"
payload = {
"title": "Direction",
"body": "Warm light and quiet movement."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "created"
}{
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "created"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}Attachments
Create an attachment
Save verbatim text on this project, one of its folders or one of its Story clips. Each parent holds up to 10 live attachments. Titles are 1–200 characters on one line; bodies are 1–8,000 characters. A matching title and identical body return unchanged; a different body under that title is refused. Requires attachments enabled; test keys are refused.
Needs the library:organize and library:read scopes.
POST
/
projects
/
{projectId}
/
attachments
Create an attachment
curl --request POST \
--url https://api.zerogen.com/v1/projects/{projectId}/attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Direction",
"body": "Warm light and quiet movement."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Direction', body: JSON.stringify('Warm light and quiet movement.')})
};
fetch('https://api.zerogen.com/v1/projects/{projectId}/attachments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerogen.com/v1/projects/{projectId}/attachments"
payload = {
"title": "Direction",
"body": "Warm light and quiet movement."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "created"
}{
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "created"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}Authorizations
Headers
Body
application/json
Response
An identical live attachment already exists.