> ## 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`.

```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">
    ```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">
    ```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>

## Transfer project ownership

```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">
    ```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

```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.
