Basic request and response
Create a project withPOST /api/v1/app/project.
Endpoint parameters
Endpoint parameters
| Type | Name | Required | Notes |
|---|---|---|---|
| Body | name | Yes | Project name. |
| Body | goal | No | Project goal or description. |
| Body | deadline | No | Project deadline as a Unix timestamp. |
| Body | visibility | No | Public or Private. |
curl -X POST "https://{BASE_URL}/api/v1/app/project" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "x-org: {org_slug}" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Insights",
"goal": "Summarize weekly support trends.",
"deadline": 1709337600,
"visibility": "Private"
}'
Example response
Example response
{
"id": "proj_7a5c3e1b9d2f4a6c",
"name": "Customer Insights",
"goal": "Summarize weekly support trends.",
"deadline": "2026-03-01T00:00:00Z",
"visibility": "Private",
"member_count": 1,
"default_member_role": "Editor",
"default_role_enabled": true,
"project_context": "Support analytics for Q1.",
"answer_context": "Use approved templates.",
"is_pinned": false
}
Get a project
curl "https://{BASE_URL}/api/v1/app/project/{projectID}" \
-H "Authorization: Bearer {API_TOKEN}"
-H "x-org: {org_slug}"
Example response
Example response
{
"id": "proj_7a5c3e1b9d2f4a6c",
"name": "Customer Insights",
"goal": "Summarize weekly support trends.",
"visibility": "Private"
}
Update a project
- PUT
- PATCH
Endpoint parameters
Endpoint parameters
| Type | Name | Required | Notes |
|---|---|---|---|
| Path | projectID | Yes | Project identifier. |
| Body | name | No | Project name. |
| Body | goal | No | Project goal or description. |
| Body | deadline | No | Project deadline as an ISO timestamp. |
| Body | visibility | No | Public or Private. |
| Body | project_context | No | Project-level context. |
| Body | answer_context | No | Default answer guidance. |
| Body | default_member_role | No | Viewer, Commenter, Editor, Admin, or Owner. |
| Body | default_role_enabled | No | Enables the default member role. |
curl -X PUT "https://{BASE_URL}/api/v1/app/project/{projectID}" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "x-org: {org_slug}" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Insights",
"goal": "Summarize weekly support and churn signals.",
"deadline": "2026-03-15T00:00:00Z",
"visibility": "Private",
"project_context": "Support analytics for Q1.",
"answer_context": "Return answers in a weekly memo format.",
"default_member_role": "Editor",
"default_role_enabled": true
}'
Example response
Example response
{
"id": "proj_7a5c3e1b9d2f4a6c",
"name": "Customer Insights",
"goal": "Summarize weekly support and churn signals.",
"deadline": "2026-03-15T00:00:00Z",
"visibility": "Private",
"member_count": 3,
"default_member_role": "Editor",
"default_role_enabled": true,
"project_context": "Support analytics for Q1.",
"answer_context": "Return answers in a weekly memo format.",
"is_pinned": true
}
Endpoint parameters
Endpoint parameters
| Type | Name | Required | Notes |
|---|---|---|---|
| Path | projectID | Yes | Project identifier. |
| Body | Any UpdateProjectDTO field | No | Partial update; send only fields to change. |
curl -X PATCH "https://{BASE_URL}/api/v1/app/project/{projectID}" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "x-org: {org_slug}" \
-H "Content-Type: application/json" \
-d '{
"project_context": "Support analytics for Q1 with strict PII handling."
}'
Example response
Example response
HTTP/1.1 200 OK
Delete a project
curl -X DELETE "https://{BASE_URL}/api/v1/app/project/{projectID}" \
-H "Authorization: Bearer {API_TOKEN}"
-H "x-org: {org_slug}"
Example response
Example response
HTTP/1.1 204 No Content
Leave a project
curl -X POST "https://{BASE_URL}/api/v1/app/project/{projectID}/leave" \
-H "Authorization: Bearer {API_TOKEN}"
-H "x-org: {org_slug}"
Example response
Example response
HTTP/1.1 200 OK
Transfer project ownership
Endpoint parameters
Endpoint parameters
| Type | Name | Required | Notes |
|---|---|---|---|
| Path | projectID | Yes | Project identifier. |
| Body | old_owner_id | Yes | Current owner user ID. |
| Body | new_owner_id | Yes | New owner user ID; must be a project member. |
curl -X POST "https://{BASE_URL}/api/v1/app/project/{projectID}/transfer" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "x-org: {org_slug}" \
-H "Content-Type: application/json" \
-d '{
"old_owner_id": "{userID}",
"new_owner_id": "{userID}"
}'
Example response
Example response
HTTP/1.1 200 OK
Project user info
- Get info
- Update info
curl "https://{BASE_URL}/api/v1/app/project/{projectID}/info/{userID}" \
-H "Authorization: Bearer {API_TOKEN}"
-H "x-org: {org_slug}"
Example response
Example response
HTTP/1.1 200 OK
Endpoint parameters
Endpoint parameters
| Type | Name | Required | Notes |
|---|---|---|---|
| Path | projectID | Yes | Project identifier. |
| Body | is_pinned | No | Pins or unpins the project for the current user. |
curl -X POST "https://{BASE_URL}/api/v1/app/project/{projectID}/info" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "x-org: {org_slug}" \
-H "Content-Type: application/json" \
-d '{
"is_pinned": true
}'
Example response
Example response
HTTP/1.1 200 OK
Project-scoped chat
Endpoint parameters
Endpoint parameters
| Type | Name | Required | Notes |
|---|---|---|---|
| Path | projectID | Yes | Project identifier. |
| Body | pgpt | Yes | Chat request body. |
| Body | artifact_ids | No | Limits context to selected artifact IDs. |
| Body | all_artifacts | No | Includes all project artifacts when true. |
curl -X POST "https://{BASE_URL}/api/v1/app/project/{projectID}/chat" \
-H "Authorization: Bearer {API_TOKEN}" \
-H "x-org: {org_slug}" \
-H "Content-Type: application/json" \
-d '{
"all_artifacts": true,
"pgpt": {
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Summarize the latest support trends in three bullets." }
]
}
],
"max_tokens": 80,
"temperature": 0.2
}
}'
Example response
Example response
{
"id": "inter_5a7b9c1d3e5f7a9b",
"state": "Completed"
}
Errors and edge cases
- 403: not a project member.
- 404: project not found.
- 409: transfer target not eligible.