curl -X PATCH "$ATAI_API_URL/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Line 3 and 4 pump monitoring"}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.patch(
f"{base_url}/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
headers={"Authorization": f"Bearer {api_key}"},
json={"name": "Line 3 and 4 pump monitoring"},
)
if response.status_code == 200:
project = response.json()
print(f"Renamed to {project['name']}")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e`,
{
method: 'PATCH',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'Line 3 and 4 pump monitoring' })
}
);
const body = await response.json();
if (response.ok) {
console.log(`Renamed to ${body.name}`);
} else {
console.error('Error:', body.errors);
}
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 and 4 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
"created_by": "usr_01jc7x2n5k8vq3m6t9r4hdzb1s",
"created_at": "2026-10-28T09:12:44Z",
"updated_at": "2026-10-29T15:03:10Z"
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid name or description.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "The caller is read-only.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Project not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "A project of that name already exists.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Projects API
Update Project
Change a project’s name or description
PATCH
/
api
/
projects
/
{project_id}
curl -X PATCH "$ATAI_API_URL/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Line 3 and 4 pump monitoring"}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.patch(
f"{base_url}/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
headers={"Authorization": f"Bearer {api_key}"},
json={"name": "Line 3 and 4 pump monitoring"},
)
if response.status_code == 200:
project = response.json()
print(f"Renamed to {project['name']}")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e`,
{
method: 'PATCH',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'Line 3 and 4 pump monitoring' })
}
);
const body = await response.json();
if (response.ok) {
console.log(`Renamed to ${body.name}`);
} else {
console.error('Error:', body.errors);
}
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 and 4 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
"created_by": "usr_01jc7x2n5k8vq3m6t9r4hdzb1s",
"created_at": "2026-10-28T09:12:44Z",
"updated_at": "2026-10-29T15:03:10Z"
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid name or description.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "The caller is read-only.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Project not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "A project of that name already exists.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Requires version 2.0.0 or later of the Archetype platform.
Overview
This endpoint changes a project’s name, its description, or both. Fields you leave out keep their value, and a body with only the project ID specified changes nothing.Request
string
required
Project
prj_ ID.string
New display name, under the same rules as at creation: at most 128 characters once leading and
trailing whitespace is dropped, not blank, and different, ignoring case, from the names of the
creator’s other projects.
string
New description, at most 512 characters. An empty string clears it.
Response
Returns200 OK with the updated project.
string
required
The project’s
prj_ id.string
required
Display name.
string
required
Description; empty when none was given.
string
required
Who created the project: a user’s
usr_ id, or the key_ id of the service-account API key it
was created with. Never changes.string
required
When the project was created (date-time).
string
required
When the project’s name or description last changed (date-time); its creation time until then.
curl -X PATCH "$ATAI_API_URL/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Line 3 and 4 pump monitoring"}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.patch(
f"{base_url}/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
headers={"Authorization": f"Bearer {api_key}"},
json={"name": "Line 3 and 4 pump monitoring"},
)
if response.status_code == 200:
project = response.json()
print(f"Renamed to {project['name']}")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e`,
{
method: 'PATCH',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'Line 3 and 4 pump monitoring' })
}
);
const body = await response.json();
if (response.ok) {
console.log(`Renamed to ${body.name}`);
} else {
console.error('Error:', body.errors);
}
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 and 4 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
"created_by": "usr_01jc7x2n5k8vq3m6t9r4hdzb1s",
"created_at": "2026-10-28T09:12:44Z",
"updated_at": "2026-10-29T15:03:10Z"
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid name or description.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "The caller is read-only.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Project not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "A project of that name already exists.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Important Notes
400meansnameis blank or too long, ordescriptionis too long.403means the caller has the read-onlyviewerrole.404means the project does not exist or is not visible to you.409means the project’s creator already has another project of the new name, ignoring case.
Was this page helpful?