curl -X POST "$ATAI_API_URL/api/projects" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps."
}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/api/projects",
headers={"Authorization": f"Bearer {api_key}"},
json={
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
},
)
if response.status_code == 201:
project = response.json()
print(f"Created {project['name']} ({project['id']})")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(`${process.env.ATAI_API_URL}/api/projects`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Line 3 pump monitoring',
description: 'Rare-event detection for the line 3 pumps.'
})
});
const body = await response.json();
if (response.status === 201) {
console.log(`Created ${body.name} (${body.id})`);
} else {
console.error('Error:', body.errors);
}
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 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-28T09:12:44Z"
}
{
"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": "A project of that name already exists.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Projects API
Create Project
Create an empty project to group blueprints and everything derived from them
POST
/
api
/
projects
curl -X POST "$ATAI_API_URL/api/projects" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps."
}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/api/projects",
headers={"Authorization": f"Bearer {api_key}"},
json={
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
},
)
if response.status_code == 201:
project = response.json()
print(f"Created {project['name']} ({project['id']})")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(`${process.env.ATAI_API_URL}/api/projects`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Line 3 pump monitoring',
description: 'Rare-event detection for the line 3 pumps.'
})
});
const body = await response.json();
if (response.status === 201) {
console.log(`Created ${body.name} (${body.id})`);
} else {
console.error('Error:', body.errors);
}
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 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-28T09:12:44Z"
}
{
"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": "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 creates a project. The project starts empty and is visible to its creator and to the organization’s admins. A project created with a service-account API key is visible to every service-account key of the organization instead of a single user. Put blueprints in the project by registering them withproject_id in Create
Blueprint, or by copying them into the
project with Copy Blueprint. See About the
Projects API for what a project holds.
Request
string
required
Display name, at most 128 characters once leading and trailing whitespace is dropped. Must not be
blank, and must differ, ignoring case, from the names of the other projects you created.
string
Description, at most 512 characters. Defaults to an empty string.
Response
Returns201 Created with the project.
string
required
The project’s
prj_ ID.string
required
Display name, as specified.
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 POST "$ATAI_API_URL/api/projects" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps."
}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/api/projects",
headers={"Authorization": f"Bearer {api_key}"},
json={
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
},
)
if response.status_code == 201:
project = response.json()
print(f"Created {project['name']} ({project['id']})")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(`${process.env.ATAI_API_URL}/api/projects`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Line 3 pump monitoring',
description: 'Rare-event detection for the line 3 pumps.'
})
});
const body = await response.json();
if (response.status === 201) {
console.log(`Created ${body.name} (${body.id})`);
} else {
console.error('Error:', body.errors);
}
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 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-28T09:12:44Z"
}
{
"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": "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.409means you already created a project of that name, ignoring case. Names are unique per creator, so two users can each have a project with the same name. Service-account API keys share one set of names.
Was this page helpful?