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

# Projects SDK Reference

> SDK reference for the Projects API, available in Node.js and Python.

## Projects

### List Projects

Returns projects visible to the current workspace, ordered by creation time with the newest project first. Use `starting_after` or `ending_before` to page through large collections.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.projects.list()

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.projects.list();

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "limit": Optional[int],
        "starting_after": Optional[str],
        "ending_before": Optional[str],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      limit?: number;
      startingAfter?: string;
      endingBefore?: string;
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "object": str,
        "data": {
            "project_id": str,
            "name": str,
            "key": str,
            "is_archived": bool,
            "is_default": bool,
            "teams": List[str],
            "created_at": date,
            "updated_at": date,
            "created_by_id": Optional[str],
            "updated_by_id": Optional[str],
            "description": Optional[str],
        },
        "has_more": bool,
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      object: string;
      data: {
        projectId: string;
        name: string;
        key: string;
        isArchived: boolean;
        isDefault: boolean;
        teams: string[];
        createdAt: Date;
        updatedAt: Date;
        createdById?: string;
        updatedById?: string;
        description?: string;
      };
      hasMore: boolean;
    }
    ```
  </CodeGroup>
</Expandable>

### Create a Project

Creates a project in the current workspace. Projects are workspace-level containers for resources such as skills, deployments, datasets, rules, and related team access.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.projects.create(name="<value>")

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.projects.create({
      name: "<value>",
    });

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "name": str,  # required
        "teams": List[str],
        "description": Optional[str],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      name: string;  // required
      teams?: string[];
      description?: string;
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "project": {
            "project_id": str,
            "name": str,
            "key": str,
            "is_archived": bool,
            "is_default": bool,
            "teams": List[str],
            "created_at": date,
            "updated_at": date,
            "created_by_id": Optional[str],
            "updated_by_id": Optional[str],
            "description": Optional[str],
        },
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      project: {
        projectId: string;
        name: string;
        key: string;
        isArchived: boolean;
        isDefault: boolean;
        teams: string[];
        createdAt: Date;
        updatedAt: Date;
        createdById?: string;
        updatedById?: string;
        description?: string;
      };
    }
    ```
  </CodeGroup>
</Expandable>

### Retrieve a Project

Retrieves the details of an existing project by its unique project ID.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.projects.get(project_id="<id>")

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.projects.get({
      projectId: "<id>",
    });

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "project_id": str,  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      projectId: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "project": {
            "project_id": str,
            "name": str,
            "key": str,
            "is_archived": bool,
            "is_default": bool,
            "teams": List[str],
            "created_at": date,
            "updated_at": date,
            "created_by_id": Optional[str],
            "updated_by_id": Optional[str],
            "description": Optional[str],
        },
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      project: {
        projectId: string;
        name: string;
        key: string;
        isArchived: boolean;
        isDefault: boolean;
        teams: string[];
        createdAt: Date;
        updatedAt: Date;
        createdById?: string;
        updatedById?: string;
        description?: string;
      };
    }
    ```
  </CodeGroup>
</Expandable>

### Delete a Project

Deletes a project from the workspace. The response body is empty when the delete succeeds.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.projects.delete(project_id="<id>")

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.projects.delete({
      projectId: "<id>",
    });

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "project_id": str,  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      projectId: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

### Update a Project

Updates the specified project by setting the values of the parameters passed.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.projects.update(project_id="<value>")

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.projects.update({
      projectId: "<id>",
      updateProjectRequest: {},
    });

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "project_id": str,  # required
        "name": Optional[str],
        "teams": List[str],
        "description": Optional[str],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      projectId: string;  // required
      updateProjectRequest: {  // required
        name?: string;
        teams?: string[];
        description?: string;
      };
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "project": {
            "project_id": str,
            "name": str,
            "key": str,
            "is_archived": bool,
            "is_default": bool,
            "teams": List[str],
            "created_at": date,
            "updated_at": date,
            "created_by_id": Optional[str],
            "updated_by_id": Optional[str],
            "description": Optional[str],
        },
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      project: {
        projectId: string;
        name: string;
        key: string;
        isArchived: boolean;
        isDefault: boolean;
        teams: string[];
        createdAt: Date;
        updatedAt: Date;
        createdById?: string;
        updatedById?: string;
        description?: string;
      };
    }
    ```
  </CodeGroup>
</Expandable>
