API Reference
REST API for managing particles, accounts, and billing programmatically.
Base URL
All API requests are made to:
All requests and responses use JSON. Include Content-Type: application/json for request bodies.
Authentication
Authenticate every request with your API key in the Authorization header:
Authorization: Bearer <api_key>
Your API key is stored locally at ~/.config/particle/credentials after your first CLI interaction. The only endpoint that does not require authentication is POST /v1/accounts (account creation).
Accounts
Create and manage your RunParticle account.
Auto-create a new account. Your SSH public key becomes your identity. Returns an API key for subsequent requests.
Request body
| Field | Type | Description |
|---|---|---|
| public_key | string | Your SSH public key (e.g. contents of ~/.ssh/id_ed25519.pub) |
Example request
$ curl -X POST https://api.runparticle.com/v1/accounts \ -H 'Content-Type: application/json' \ -d '{"public_key": "ssh-ed25519 AAAA... user@host"}'
Example response
{
"account_id": "a1b2c3d4e5f6",
"api_key": "pk_a1b2c3d4e5f6..."
}
Get your account info including balance and particle count.
Example request
$ curl https://api.runparticle.com/v1/account \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"id": "a1b2c3d4e5f6",
"balance_cents": 976,
"recovery_email": "user@example.com",
"created_at": "2026-03-01T00:00:00Z"
}
Set or update your recovery email. Used to recover your account if you lose your SSH key.
Request body
| Field | Type | Description |
|---|---|---|
| string | Recovery email address |
Example request
$ curl -X PUT https://api.runparticle.com/v1/account/email \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"email": "user@example.com"}'
Example response
{
"email": "user@example.com"
}
Send a new API key to your recovery email. Use this when you need to access your account from a new machine without your original SSH key.
Request body
| Field | Type | Description |
|---|---|---|
| string | The recovery email on your account |
Example request
$ curl -X POST https://api.runparticle.com/v1/account/recover \ -H 'Content-Type: application/json' \ -d '{"email": "user@example.com"}'
Example response
{
"message": "Recovery email sent"
}
Rotate your API key. Generates a new key and invalidates the old one.
Example request
$ curl -X POST https://api.runparticle.com/v1/account/rotate-key \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"api_key": "pk_n3w4k5e6y7...",
"message": "API key rotated. Old key is now invalid."
}
Images
List available OS images for creating particles.
List all available base OS images.
Example request
$ curl https://api.runparticle.com/v1/images \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"images": [
{
"id": "ubuntu-24.04",
"name": "ubuntu-24.04",
"display_name": "Ubuntu 24.04 LTS",
"default": true
},
{
"id": "debian-12",
"name": "debian-12",
"display_name": "Debian 12 (Bookworm)",
"default": false
}
]
}
Particles
Create, manage, and monitor cloud VMs.
Create and start a new particle.
Request body
| Field | Type | Description |
|---|---|---|
| name | string | Name for the particle (used as subdomain) |
| size | string | VM size tier: p1–p5. Default: p1 |
| image | string | Base OS image (e.g. ubuntu-24.04, debian-12). Default: ubuntu-24.04. See GET /v1/images for available options. |
Example request
$ curl -X POST https://api.runparticle.com/v1/particles \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"name": "myapp", "size": "p2"}'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"http_port": 80,
"image": "ubuntu-24.04",
"created_at": "2026-03-06T12:00:00Z"
}
List all particles on your account.
Example request
$ curl https://api.runparticle.com/v1/particles \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"particles": [
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z"
},
{
"id": "def456",
"name": "staging",
"size": "p1",
"status": "stopped",
"idle_policy": "sleep",
"created_at": "2026-03-05T10:00:00Z"
}
]
}
Get detailed info about a specific particle.
Example request
$ curl https://api.runparticle.com/v1/particles/myapp \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"http_port": 80,
"image": "ubuntu-24.04",
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z"
}
Start a stopped particle. Resumes from where it left off with disk intact.
Example request
$ curl -X POST https://api.runparticle.com/v1/particles/myapp/start \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"http_port": 80,
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z"
}
Stop a running particle. Disk is preserved. You're only charged the stopped storage rate.
Example request
$ curl -X POST https://api.runparticle.com/v1/particles/myapp/stop \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "stopped",
"http_port": 80,
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z",
"stopped_at": "2026-03-07T14:00:00Z"
}
Permanently delete a particle and its disk. This action cannot be undone.
Example request
$ curl -X DELETE https://api.runparticle.com/v1/particles/myapp \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
(empty response)
Get serial console output for a particle. Useful for debugging boot issues.
Example request
$ curl https://api.runparticle.com/v1/particles/myapp/logs \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"logs": "[ 0.000000] Linux version 6.1.0 ...\n[ 1.234567] EXT4-fs: mounted filesystem\n...",
"offset": 4096,
"status": "running"
}
Get detailed VM stats including uptime, resource usage, and idle policy.
Example request
$ curl https://api.runparticle.com/v1/particles/myapp/status \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"http_port": 80,
"image": "ubuntu-24.04",
"created_at": "2026-03-06T12:00:00Z",
"idle_policy": "sleep",
"vm_stats": {
"vcpus": 2,
"memory_total_bytes": 4294967296,
"disk_total_bytes": 21474836480,
"uptime_seconds": 13320,
"vm_state": "Running"
},
"network_peers": 1,
"healthy": true
}
Clone a stopped particle to a new one. Creates an exact copy of the disk.
Request body
| Field | Type | Description |
|---|---|---|
| name | string | Name for the cloned particle |
Example request
$ curl -X POST https://api.runparticle.com/v1/particles/myapp/duplicate \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"name": "myapp-copy"}'
Example response
{
"id": "def456",
"name": "myapp-copy",
"size": "p2",
"status": "stopped",
"http_port": 0,
"created_at": "2026-03-07T14:00:00Z"
}
Replace the particle's disk with a fresh copy of its base image. The particle must be stopped. Erases all data but keeps name, IP, and account.
Query parameters
| Field | Type | Description |
|---|---|---|
| image | string | Optional. Switch to a different base image (e.g. debian-12) |
Example request
$ curl -X POST https://api.runparticle.com/v1/particles/myapp/rebuild \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "stopped",
"http_port": 80,
"image": "ubuntu-24.04",
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z",
"stopped_at": "2026-03-07T10:00:00Z"
}
Rename a particle. Updates the HTTP route to the new subdomain.
Request body
| Field | Type | Description |
|---|---|---|
| name | string | New name for the particle |
Example request
$ curl -X POST https://api.runparticle.com/v1/particles/myapp/rename \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"name": "production"}'
Example response
{
"id": "abc123",
"name": "production",
"size": "p2",
"status": "running",
"http_port": 80,
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z"
}
Resize a particle to a different size tier. The particle must be stopped.
Request body
| Field | Type | Description |
|---|---|---|
| size | string | Target size tier: p1, p2, p4, p8, p16 |
Example request
$ curl -X PUT https://api.runparticle.com/v1/particles/myapp/resize \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"size": "p4"}'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p4",
"status": "stopped",
"http_port": 80,
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z"
}
Set the default HTTP port that the proxy forwards traffic to for a particle. Default is 80. Any port can also be accessed directly via the URL pattern <name>-<port>-<acct>.runparticle.com.
Request body
| Field | Type | Description |
|---|---|---|
| http_port | integer | Port number (1–65535) |
Example request
$ curl -X PUT https://api.runparticle.com/v1/particles/myapp/port \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"http_port": 8080}'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"http_port": 8080,
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z"
}
Set the idle policy for a particle. Controls what happens when no SSH or HTTP activity is detected. Default policy is sleep (stops after 2 minutes of inactivity).
Request body
| Field | Type | Description |
|---|---|---|
| policy | string | One of: none, on, sleep, schedule |
Example request
$ curl -X PUT https://api.runparticle.com/v1/particles/myapp/idle \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"policy": "on"}'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"http_port": 80,
"idle_policy": "on",
"created_at": "2026-03-06T12:00:00Z"
}
Execute a command on a running particle via SSH and return the output.
Request body
| Field | Type | Description |
|---|---|---|
| command | string | The shell command to execute |
Example request
$ curl -X POST https://api.runparticle.com/v1/particles/myapp/exec \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"command": "apt update"}'
Example response
{
"exit_code": 0,
"output": "Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease\nReading package lists... Done"
}
Snapshots
Create, list, restore, and delete point-in-time snapshots of a particle's disk.
Create a named snapshot of a particle's disk.
Request body
| Field | Type | Description |
|---|---|---|
| name | string | Name for the snapshot |
Example request
$ curl -X POST https://api.runparticle.com/v1/particles/myapp/snapshots \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"name": "before-deploy"}'
Example response
{
"id": "snap_a1b2c3",
"particle_id": "myapp",
"name": "before-deploy",
"size_bytes": 2147483648,
"created_at": "2026-03-07T10:30:00Z"
}
List all snapshots for a particle.
Example request
$ curl https://api.runparticle.com/v1/particles/myapp/snapshots \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"snapshots": [
{
"id": "snap_a1b2c3",
"name": "before-deploy",
"size_bytes": 2147483648,
"created_at": "2026-03-07T10:30:00Z"
}
]
}
Restore a snapshot. The particle must be stopped.
Example request
$ curl -X POST https://api.runparticle.com/v1/particles/myapp/snapshots/before-deploy/restore \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"status": "restored"
}
Delete a snapshot.
Example request
$ curl -X DELETE https://api.runparticle.com/v1/particles/myapp/snapshots/before-deploy \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
(empty response)
Custom Domains
Set custom domains for your particles.
Set a custom domain for a particle. Point your domain's DNS to runparticle.com via a CNAME record.
Request body
| Field | Type | Description |
|---|---|---|
| domain | string | Custom domain (e.g. app.example.com) |
Example request
$ curl -X PUT https://api.runparticle.com/v1/particles/myapp/domain \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"domain": "app.example.com"}'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"http_port": 80,
"custom_domain": "app.example.com",
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z"
}
Remove the custom domain from a particle.
Example request
$ curl -X DELETE https://api.runparticle.com/v1/particles/myapp/domain \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"http_port": 80,
"idle_policy": "sleep",
"created_at": "2026-03-06T12:00:00Z"
}
SSH Keys
Manage SSH keys associated with your account.
List all SSH keys on your account.
Example request
$ curl https://api.runparticle.com/v1/keys \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"keys": [
{
"id": "a1b2c3d4",
"public_key": "ssh-ed25519 AAAA... user@host",
"name": "default",
"created_at": "2026-03-01T00:00:00Z"
},
{
"id": "e5f6g7h8",
"public_key": "ssh-ed25519 BBBB... user@laptop",
"name": "laptop",
"created_at": "2026-03-05T00:00:00Z"
}
]
}
Add an SSH public key to your account.
Request body
| Field | Type | Description |
|---|---|---|
| public_key | string | SSH public key contents |
Example request
$ curl -X POST https://api.runparticle.com/v1/keys \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"public_key": "ssh-ed25519 AAAA... user@laptop"}'
Example response
{
"id": "i9j0k1l2",
"name": "unnamed"
}
Remove an SSH key from your account.
Example request
$ curl -X DELETE https://api.runparticle.com/v1/keys/2 \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
(empty response)
Billing
Manage your prepaid balance and view transaction history.
Create a Stripe payment link to add funds. Returns a URL to complete the payment.
Request body
| Field | Type | Description |
|---|---|---|
| amount | integer | Amount in cents to add (e.g. 2500 for $25.00). Minimum 1000 ($10). |
Example request
$ curl -X POST https://api.runparticle.com/v1/account/topup \ -H 'Authorization: Bearer rp_k1_a1b2c3...' \ -H 'Content-Type: application/json' \ -d '{"amount": 2500}'
Example response
{
"url": "https://checkout.stripe.com/c/pay/cs_live_..."
}
Get your transaction history including top-ups and usage charges.
Example request
$ curl https://api.runparticle.com/v1/account/history \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"transactions": [
{
"id": "a1b2c3d4",
"amount_cents": 2500,
"type": "topup",
"created_at": "2026-03-06T14:00:00Z"
},
{
"id": "e5f6g7h8",
"amount_cents": -24,
"type": "usage",
"created_at": "2026-03-06T15:00:00Z"
}
]
}
Get per-particle usage breakdown for a time period.
Query parameters
| Field | Type | Description |
|---|---|---|
| period | string | Time period: day, week, month, all. Default: month |
Example request
$ curl https://api.runparticle.com/v1/account/usage?period=month \ -H 'Authorization: Bearer rp_k1_a1b2c3...'
Example response
{
"period": "month",
"start": "2026-03-01T00:00:00Z",
"end": "2026-03-07T00:00:00Z",
"total_cents": 130,
"particles": [
{
"particle_id": "abc123",
"name": "myapp",
"size": "p2",
"status": "running",
"compute_hours": 48.2,
"total_cents": 116
}
]
}
Webhooks
Internal webhook endpoints used by third-party services.
Receives payment confirmation events from Stripe. This endpoint is called by Stripe, not by users directly. It verifies the webhook signature and credits the account balance upon successful payment.
CLI
Endpoints used by the particle CLI for self-management.
Get the latest CLI version and download URL. Used by particle upgrade for self-updates. This endpoint is public and does not require authentication.
Example request
$ curl https://api.runparticle.com/v1/cli/version
Example response
{
"version": "abc1234"
}