API Reference

Programmatically manage your Fresh.dev resources with our REST API.

Overview

The Fresh.dev API allows you to automate infrastructure management, integrate with your CI/CD pipelines, and build custom tooling.

Base URL

https://api.fresh.dev/v2

Authentication

All API requests require authentication using a Bearer token. Generate an API token from your dashboard settings.

curl -X GET "https://api.fresh.dev/v2/instances" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Rate Limits

PlanRequests/minRequests/hour
Free601,000
Pro30010,000
EnterpriseCustomCustom

Response Format

All responses are returned as JSON:

{
  "data": {
    "id": "inst_abc123",
    "name": "my-instance",
    "status": "running",
    "created_at": "2024-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_xyz789"
  }
}

Error Handling

Error responses include a code and message:

{
  "error": {
    "code": "not_found",
    "message": "Instance not found",
    "request_id": "req_xyz789"
  }
}