---
title: "API"
description: "Use the OnePloy API at app.oneploy.dev/api/v1 to manage servers, projects, apps, databases, services and deployments with bearer tokens."
url: https://oneploy.dev/docs/api/
type: op_doc
published: 2026-11-02T19:09:50+00:00
updated: 2026-11-02T19:11:25+00:00
author: "admin"
language: en-US
---

# API

> Use the OnePloy API at app.oneploy.dev/api/v1 to manage servers, projects, apps, databases, services and deployments with bearer tokens.

OnePloy has a REST API at `https://app.oneploy.dev/api/v1` that covers almost everything the dashboard does: servers, projects, environments, applications, databases, services, deployments, variables, storage, backups, notifications and more. Authenticate with a team API token, created in the dashboard and sent as a bearer token.

## Do I need a particular plan?

Yes. Your team’s plan must include API access. If it does not, API requests return `403`. Compare plans on the [Billing](https://oneploy.dev/docs/billing/) page.

## How do I create an API token?

1. Open **Keys & Tokens**, then **API tokens**.
2. Enter a **Description** and choose when it **Expires in** (7, 30, 60 or 90 days, or 1 year).
3. Choose the **Permissions** (see below).
4. Create the token and copy it immediately. It is shown only once.

Tokens belong to the team that was active when you created them, and only see that team’s resources.

## Which permissions can a token have?

| Permission | Allows |
| --- | --- |
| Read | Read resources and settings, with secrets hidden. |
| Read sensitive data | Read values that are hidden by default, such as environment variable values and connection strings. Implies Read. |
| Write | Create, change and delete resources. |
| Deploy | Deploy, start, stop, restart and roll back resources, and cancel deployments. Deploy-only tokens are ideal for CI. |
| Root | Full access to your team. |

Any team member can create a Read token. Only team owners and admins can grant Read sensitive data, Write, Deploy or Root.

## How do I call the API?

```bash
curl https://app.oneploy.dev/api/v1/projects \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Accept: application/json"
```

Keep the token in a secret store or an environment variable such as `API_TOKEN`, never in your source code.

## What does the API cover?

| Area | Example endpoints |
| --- | --- |
| Teams | `GET /api/v1/teams/current`, `GET /api/v1/teams/current/members` |
| Projects and environments | `GET /api/v1/projects`, `POST /api/v1/projects/{uuid}/environments` |
| Servers | `GET /api/v1/servers`, `POST /api/v1/servers`, `POST /api/v1/servers/{uuid}/validate` |
| Proxy | `PATCH /api/v1/servers/{uuid}/proxy`, `POST /api/v1/servers/{uuid}/proxy/restart` |
| Applications | `POST /api/v1/applications/public`, `PATCH /api/v1/applications/{uuid}`, `GET /api/v1/applications/{uuid}/logs` |
| Databases | `POST /api/v1/databases/postgresql`, `POST /api/v1/databases/{uuid}/backups` |
| Services | `POST /api/v1/services`, `POST /api/v1/services/{uuid}/restart` |
| Deployments | `POST /api/v1/deploy`, `GET /api/v1/deployments`, `POST /api/v1/deployments/{uuid}/cancel` |
| Variables | `GET /api/v1/applications/{uuid}/envs`, `GET /api/v1/team/envs` |
| Keys and storage | `/api/v1/security/keys`, `/api/v1/s3-storages`, `/api/v1/cloud-tokens` |
| Notifications | `GET /api/v1/notifications/slack`, `PATCH /api/v1/notifications/email` |
| Cloud providers | `/api/v1/hetzner/...`, `/api/v1/digitalocean/...`, `/api/v1/vultr/...` |
| AI | `POST /api/v1/ai/chat/completions` (see [AI Gateway](https://oneploy.dev/docs/ai/ai-gateway/)) |

Actions that change state, such as start, stop, restart and deploy, must use `POST`. Calling them with `GET` returns `405`. To deploy from a CI pipeline, see [Webhooks and CI/CD](https://oneploy.dev/docs/applications/deploy-webhooks/).

## Why does the API return 401 or 403?

- **401:** the token is missing, mistyped, expired or revoked. Create a new one under **Keys & Tokens**.
- **403, plan:** your team’s plan does not include API access.
- **403, permission:** the token lacks the permission the endpoint requires, for example Deploy.

If none of these apply, contact [support](https://oneploy.dev/contact-us/) with the endpoint, the time of the request and the response body.

---

Source: https://oneploy.dev/docs/api/ · OnePloy
