> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zylon.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Projects

> Create projects, update metadata, and run project-scoped chat.

Projects are the workspace unit that holds threads, artifacts, and team context. Use these endpoints to create and configure projects, transfer ownership, and start project-scoped chats.

## Basic request and response

Create a project with `POST /api/v1/app/project`.

<Accordion title="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`. |
</Accordion>

```bash theme={null}
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"
  }'
```

<Accordion title="Example response">
  ```json theme={null}
  {
    "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
  }
  ```
</Accordion>

## Get a project

```bash theme={null}
curl "https://{BASE_URL}/api/v1/app/project/{projectID}" \
  -H "Authorization: Bearer {API_TOKEN}"
  -H "x-org: {org_slug}"
```

<Accordion title="Example response">
  ```json theme={null}
  {
    "id": "proj_7a5c3e1b9d2f4a6c",
    "name": "Customer Insights",
    "goal": "Summarize weekly support trends.",
    "visibility": "Private"
  }
  ```
</Accordion>

## Update a project

<Tabs>
  <Tab title="PUT">
    <Accordion title="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. |
    </Accordion>

    ```bash theme={null}
    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
      }'
    ```

    <Accordion title="Example response">
      ```json theme={null}
      {
        "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
      }
      ```
    </Accordion>
  </Tab>

  <Tab title="PATCH">
    <Accordion title="Endpoint parameters">
      | Type | Name | Required | Notes |
      | - | - | - | - |
      | Path | `projectID` | Yes | Project identifier. |
      | Body | Any `UpdateProjectDTO` field | No | Partial update; send only fields to change. |
    </Accordion>

    ```bash theme={null}
    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."
      }'
    ```

    <Accordion title="Example response">
      ```text theme={null}
      HTTP/1.1 200 OK
      ```
    </Accordion>
  </Tab>
</Tabs>

## Delete a project

```bash theme={null}
curl -X DELETE "https://{BASE_URL}/api/v1/app/project/{projectID}" \
  -H "Authorization: Bearer {API_TOKEN}"
  -H "x-org: {org_slug}"
```

<Accordion title="Example response">
  ```text theme={null}
  HTTP/1.1 204 No Content
  ```
</Accordion>

## Leave a project

```bash theme={null}
curl -X POST "https://{BASE_URL}/api/v1/app/project/{projectID}/leave" \
  -H "Authorization: Bearer {API_TOKEN}"
  -H "x-org: {org_slug}"
```

<Accordion title="Example response">
  ```text theme={null}
  HTTP/1.1 200 OK
  ```
</Accordion>

## Transfer project ownership

<Accordion title="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. |
</Accordion>

```bash theme={null}
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}"
  }'
```

<Accordion title="Example response">
  ```text theme={null}
  HTTP/1.1 200 OK
  ```
</Accordion>

## Project user info

<Tabs>
  <Tab title="Get info">
    ```bash theme={null}
    curl "https://{BASE_URL}/api/v1/app/project/{projectID}/info/{userID}" \
      -H "Authorization: Bearer {API_TOKEN}"
      -H "x-org: {org_slug}"
    ```

    <Accordion title="Example response">
      ```text theme={null}
      HTTP/1.1 200 OK
      ```
    </Accordion>
  </Tab>

  <Tab title="Update info">
    <Accordion title="Endpoint parameters">
      | Type | Name | Required | Notes |
      | - | - | - | - |
      | Path | `projectID` | Yes | Project identifier. |
      | Body | `is_pinned` | No | Pins or unpins the project for the current user. |
    </Accordion>

    ```bash theme={null}
    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
      }'
    ```

    <Accordion title="Example response">
      ```text theme={null}
      HTTP/1.1 200 OK
      ```
    </Accordion>
  </Tab>
</Tabs>

## Project-scoped chat

<Accordion title="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`. |
</Accordion>

```bash theme={null}
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
    }
  }'
```

<Accordion title="Example response">
  ```json theme={null}
  {
    "id": "inter_5a7b9c1d3e5f7a9b",
    "state": "Completed"
  }
  ```
</Accordion>

## Errors and edge cases

* **403**: not a project member.
* **404**: project not found.
* **409**: transfer target not eligible.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.