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

# Endpoints

> Key API endpoints and resource overview for the Upsun Cloud REST API.

All API requests are made to the base URL:

```
https://api.upsun.com
```

The API follows the OpenAPI (Swagger) specification and returns [HAL-style JSON](https://developer.upsun.com/api/rest/errors.md#hal-response-structure) over HTTPS.

## Resource overview

The API is organized around these primary resources:

| Resource | Base path | Description |
| - | - | - |
| **Organizations** | `/organizations` | Create, list, update, and delete organizations |
| **Projects** | `/projects` | Manage projects and their settings |
| **Environments** | `/projects/{id}/environments` | Branch, merge, activate, and deactivate environments |
| **Subscriptions** | `/subscriptions` | Manage project subscriptions and plans |
| **Users** | `/users` | User profiles and account management |
| **Members** | `/organizations/{id}/members` | Organization membership and permissions |
| **Invitations** | `/organizations/{id}/invitations` | Invite users to organizations |

## Common patterns

### Pagination

List endpoints support pagination with query parameters:

| Parameter | Description |
| - | - |
| `page[size]` | Number of results per page (1–100) |
| `page[before]` | Cursor for previous page |
| `page[after]` | Cursor for next page |

### Sorting

Use the `sort` parameter on list endpoints. Prefix with `-` for descending order:

```bash theme={null}
# Sort by creation date, newest first
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.upsun.com/organizations?sort=-created_at"
```

### Filtering

Most list endpoints accept filter parameters specific to the resource:

```bash theme={null}
# Filter organizations by status
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.upsun.com/organizations?filter[status]=active"
```

## Quick reference

> [card] [OpenAPI Reference](https://developer.upsun.com/api/rest/overview.md)
>
> Browse the full interactive API reference with schemas and example payloads.

> [card] [Authentication](https://developer.upsun.com/api/rest/authentication.md)
>
> Set up API tokens and authenticate your requests.


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