API Reference

Error Handling

Standard error codes, rate limit headers, and troubleshooting.

Error Handling

All error responses follow a consistent format with an error code and human-readable message:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Description of what went wrong"
  }
}

Error Codes

HTTP StatusCodeDescription
400VALIDATION_ERRORInvalid or missing request parameters
401UNAUTHORIZEDMissing or invalid API key
402PAYMENT_REQUIREDInsufficient credits
403FORBIDDENAPI access requires Business plan, or action not permitted
403LIMIT_EXCEEDEDPlan limits reached (projects, builds, etc.)
404NOT_FOUNDResource not found or not accessible
409CONFLICTResource conflict (deployment in progress, domain taken, etc.)
429RATE_LIMITEDToo many requests — check rate limit headers
500INTERNAL_ERRORServer error — please retry or contact support

Rate Limit Headers

Every response includes these headers:

  • X-RateLimit-Remaining — Number of requests remaining in the current window
  • X-RateLimit-Reset — Seconds until the rate limit window resets

When you receive a 429 response, wait for the number of seconds indicated by X-RateLimit-Reset before retrying.

Credit Costs

API actions that consume credits:

ActionCredits
Create project (initial build)5
Refinement1
Code edit1
Redeploy1
Rollback1
Clone2
Reactivate1

Administrators are exempt from credit charges.

Troubleshooting

  • 401 Unauthorized — Check that your API key starts with flp_ and is included as a Bearer token
  • 403 Forbidden — Verify your account has an active Business subscription
  • 409 Conflict on deploy — Wait for the current deployment to complete, or cancel it first
  • Subdomain errors — Subdomains must be lowercase, 3-63 characters, and contain only letters, numbers, and hyphens