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

# Projects

> List projects, retrieve project details, and search across project resources.

## List Projects

Returns all projects accessible to the authenticated token.

<Note>
  Organization-scoped tokens return all projects. Project-scoped tokens return only their assigned project. See [Token Scope](/api-reference/authentication#token-scope) for details.
</Note>

### Request

```
GET /v1/projects
```

### Headers

| Header          | Required | Description      |
| --------------- | -------- | ---------------- |
| `Authorization` | Yes      | `Bearer <token>` |

### Response

```json theme={null}
{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Record Label Ltd",
      "created_at": "2025-01-15T10:30:00Z",
      "organization_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890"
    }
  ]
}
```

### Example

```bash theme={null}
curl https://api.royaltyport.com/v1/projects \
  -H "Authorization: Bearer rp_your_token_here"
```

***

## Get Project

Returns a single project by ID.

### Request

```
GET /v1/projects/{project_id}
```

### Path Parameters

| Parameter    | Type | Required | Description    |
| ------------ | ---- | -------- | -------------- |
| `project_id` | UUID | Yes      | The project ID |

### Headers

| Header          | Required | Description      |
| --------------- | -------- | ---------------- |
| `Authorization` | Yes      | `Bearer <token>` |

### Response

```json theme={null}
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Record Label Ltd",
    "created_at": "2025-01-15T10:30:00Z",
    "organization_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890"
  }
}
```

### Errors

| Status | Description                                                      |
| ------ | ---------------------------------------------------------------- |
| `404`  | Project not found or does not belong to the token's organization |

### Example

```bash theme={null}
curl https://api.royaltyport.com/v1/projects/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer rp_your_token_here"
```

***

## Search Project

Search across all resources in a project — contracts, entities, artists, writers, recordings, and compositions.

### Request

```
GET /v1/projects/{project_id}/search
```

### Path Parameters

| Parameter    | Type | Required | Description    |
| ------------ | ---- | -------- | -------------- |
| `project_id` | UUID | Yes      | The project ID |

### Query Parameters

| Parameter | Type   | Required | Description                     |
| --------- | ------ | -------- | ------------------------------- |
| `q`       | string | Yes      | Search query (1–500 characters) |

### Headers

| Header          | Required | Description                                                |
| --------------- | -------- | ---------------------------------------------------------- |
| `Authorization` | Yes      | `Bearer <token>` — must be scoped to the requested project |

### Response

```json theme={null}
{
  "data": [
    {
      "type": "contract",
      "id": "contract-123",
      "name": "Distribution Agreement - Sony Music",
      "score": 0.95
    },
    {
      "type": "artist",
      "id": "artist-456",
      "name": "Sony Music Entertainment",
      "score": 0.82
    }
  ]
}
```

### Errors

| Status | Description                                  |
| ------ | -------------------------------------------- |
| `400`  | Missing or invalid `q` query parameter       |
| `403`  | Token is not scoped to the requested project |

### Example

```bash theme={null}
curl "https://api.royaltyport.com/v1/projects/a1b2c3d4-.../search?q=Sony%20Music" \
  -H "Authorization: Bearer rp_your_token_here"
```
