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

# Introduction

> Access your Royaltyport data programmatically via the REST API and MCP server.

The Royaltyport API gives you programmatic access to your organization's projects, contracts, entities, artists, writers, and project sandboxes. It is available as both a traditional REST API and a [Model Context Protocol (MCP)](/mcp-reference/introduction) server for AI agent integrations.

## Base URL

All REST API requests are made to:

```
https://api.royaltyport.com/v1
```

The MCP servers are documented at [MCP Servers](/mcp-reference/introduction).

## Authentication

Royaltyport supports two authentication methods:

* **OAuth 2.1** (recommended) — MCP clients, the CLI, and third-party apps authenticate via a browser-based consent flow. No tokens to manage.
* **API tokens** — static credentials for server-side integrations, CI/CD pipelines, and headless environments.

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

See [Authentication](/api-reference/authentication) for full details.

***

## Response Format

All successful responses return a JSON object with a `data` key:

```json theme={null}
{
  "data": { ... }
}
```

Error responses return a JSON object with an `error` key:

```json theme={null}
{
  "error": {
    "message": "A human-readable error description"
  }
}
```

Validation errors may return field-level details:

```json theme={null}
{
  "error": {
    "projectId": ["Required"]
  }
}
```

***

## Rate Limiting

API requests are rate-limited per token. Every response includes rate limit headers:

| Header                  | Description                              |
| ----------------------- | ---------------------------------------- |
| `X-RateLimit-Limit`     | Maximum requests allowed per window      |
| `X-RateLimit-Remaining` | Requests remaining in the current window |
| `X-RateLimit-Reset`     | Unix timestamp when the window resets    |

When the limit is exceeded, the API returns a `429` status with an error message.

***

## HTTP Status Codes

| Code  | Meaning                                                         |
| ----- | --------------------------------------------------------------- |
| `200` | Success                                                         |
| `400` | Bad request — invalid or missing parameters                     |
| `401` | Unauthorized — missing, invalid, or expired token               |
| `403` | Forbidden — token does not have access to the requested project |
| `404` | Not found — the requested resource does not exist               |
| `429` | Rate limit exceeded                                             |
| `500` | Internal server error                                           |

***

## Available Resources

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/authentication">
    OAuth 2.1, API tokens, and token management.
  </Card>

  <Card title="REST API" icon="code" href="/api-reference/rest-api/projects">
    Projects, contracts, entities, artists, writers, and sandboxes.
  </Card>

  <Card title="MCP Server" icon="bot" href="/mcp-reference/introduction">
    Model Context Protocol integration for AI agents.
  </Card>

  <Card title="CLI" icon="terminal" href="/cli-reference/overview">
    Command-line interface for authentication, project browsing, and sandbox access.
  </Card>

  <Card title="Node.js SDK" icon="package" href="/sdk-reference/introduction">
    Official TypeScript SDK with type-safe access to all API resources.
  </Card>
</CardGroup>
