API Reference

The REST API that powers the Kyper CLI and integrations.

Base URL

All API endpoints are served under a single versioned base URL.

text
https://kyper.shop/api/v1/

Authentication

Most endpoints require a Bearer token in the Authorization header. You can find your token on your profile page, or obtain one programmatically via the device authorization flow.

bash
curl -H "Authorization: Bearer kpr_a1b2c3d4e5f6..." \
  https://kyper.shop/api/v1/me

Requests without a valid token receive a 401 Unauthorized response. Requests from accounts with unverified email addresses receive 403 Forbidden.

Response format

All responses are JSON. Successful responses return the resource directly. Errors use one of two shapes:

Single error

json
{"error": "App not found"}

Validation errors

json
{"errors": ["Title can't be blank", "Category is not a valid category"]}

HTTP status codes

Code Meaning
200 OK Request succeeded
201 Created Resource created (apps, versions)
400 Bad Request Missing or malformed request body (e.g. invalid YAML)
401 Unauthorized Missing or invalid Bearer token
403 Forbidden Email not verified
404 Not Found Resource does not exist or you do not have access
409 Conflict A build is already in progress for this version
422 Unprocessable Entity Validation failed (check the errors array)

Rate limits

Rate limits are applied per IP address. Exceeding the limit returns 429 Too Many Requests with a Retry-After header.

Scope Limit
POST /api/v1/device/authorize 5 requests per minute
All other API endpoints 20 requests per minute

Endpoint index

Method Path Auth Description
GET /api/v1/me Yes Current user
POST /api/v1/device/authorize No Start device auth flow
GET /api/v1/device/token?code=XXXX No Poll for device auth token
GET /api/v1/apps Yes List your apps
POST /api/v1/apps Yes Create an app
GET /api/v1/apps/:slug Yes Get app details
PATCH /api/v1/apps/:slug Yes Update an app
GET /api/v1/apps/:slug/status Yes App status + latest version
GET /api/v1/apps/:slug/env Yes Declared env var keys
POST /api/v1/apps/:slug/versions Yes Upload a new version
GET /api/v1/versions/:id/build_log?cursor=N Yes Stream build log
POST /api/v1/versions/:id/retry Yes Retry failed build
POST /api/v1/versions/:id/cancel Yes Cancel pending/building version
DELETE /api/v1/versions/:id Yes Withdraw version

Sections