> ## 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; the two cursors are mutually exclusive.

```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();
```

**Parameters**

```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;
}
```

**Response**

```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": str,
        "updated_at": str,
        "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;
}
```

### 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. Requires a workspace-scoped management key or API key with Projects write access, or an admin session. Project-scoped API keys cannot be granted Projects access.

```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();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "name": str,  # required
    "teams": List[str],  # optional
    "description": Optional[str],
}
```

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

**Response**

```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": str,
        "updated_at": str,
        "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;
  };
}
```

### Retrieve a Project

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

```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();
```

**Parameters**

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

**Response**

```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": str,
        "updated_at": str,
        "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;
  };
}
```

### Delete a Project

Deletes a project from the workspace. The response body is empty when the delete succeeds. Requires a workspace-scoped management key or API key with Projects write access, or an admin session. Project-scoped API keys cannot be granted Projects access.

```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();
```

**Parameters**

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

### Update a Project

Updates the specified project by setting the values of the parameters passed. Requires a workspace-scoped management key or API key with Projects write access, or an admin session. Project-scoped API keys cannot be granted Projects access.

```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>", 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.update({
    projectId: "<id>",
    updateProjectRequest: {
      name: "<value>",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "project_id": str,  # required
    "name": Optional[str],
    "teams": List[str],  # optional
    "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;
  };
}
```

**Response**

```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": str,
        "updated_at": str,
        "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;
  };
}
```


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