Overview

The Miget API allows you to programmatically manage your applications, databases, and infrastructure on the Miget platform.

Base URL

All API requests should be made to:
https://app.miget.com/api/v1

Authentication

Miget API supports two authentication methods:

Option 1: Session Tokens (Basic Auth)

Use your email and password to obtain session tokens via the /auth/sign_in endpoint.
curl -X POST "https://app.miget.com/api/v1/auth/sign_in" \
  -H "Content-Type: application/json" \
  -d '{"email": "your@email.com", "password": "your_password"}'
This returns an access_token and refresh_token. The access token expires and needs to be refreshed periodically using the /auth/refresh_token endpoint. Generate a permanent API token in the Miget dashboard:
  1. Go to SettingsAPI Tokens
  2. Click Add API Token
  3. Copy the generated token
Use this token in the Authorization header:
curl -X GET "https://app.miget.com/api/v1/apps" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
API tokens do not expire and don’t require refreshing, making them ideal for CI/CD pipelines and automation.

Workspace Context

All API requests operate on your default workspace (the last workspace you were active in). To target a specific workspace, include the X-Workspace-Id header with the workspace UUID:
curl -X GET "https://app.miget.com/api/v1/apps" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "X-Workspace-Id: your-workspace-uuid"
You can find your workspace UUID in the Miget dashboard URL or via the API.

Response Format

All responses are returned in JSON format. Successful responses typically include the requested data, while errors include an error field with a descriptive message.

Success Response

{
  "data": { ... }
}

Error Response

{
  "error": "Error message description"
}