Skip to main content

API Overview

The fibe.gg API is a RESTful JSON API that provides programmatic access to all platform resources. Use it to automate environment provisioning, integrate with CI/CD pipelines, or build custom tooling.

Base URL:

https://fibe.gg/api

Authentication

The API supports two authentication methods:

Bearer Token (API Key)

The recommended method for programmatic access. Include your API key in the Authorization header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://fibe.gg/api/playrooms

Session-Based

If you are already logged in to the web UI, the API accepts your session cookie. This is mainly useful for browser-based API exploration.

API Keys

Generating Keys

You can generate API keys from:

  • Web UI — Navigate to your profile → API Keys
  • APIPOST /api/keys

Each key includes:

FieldDescription
LabelA human-readable name for the key
Client IDPublic identifier in the format pk_live_*
PrefixKeys use the pk_live_ prefix for easy identification and secret scanning compatibility
TokenSecret token (shown only once at creation time)
ScopesPermissions granted to this key
Expires AtOptional expiration date
Token Security

The API token is shown only once when the key is created. Store it securely. If lost, delete the key and create a new one.

Scopes

Each API key has one or more scopes that control which resources and actions it can access:

ScopeDescription
playrooms:readList and view Playrooms
playrooms:writeCreate and update Playrooms
playrooms:deleteDelete Playrooms
playrooms:manageFull Playroom management (includes read, write, delete + SSH key operations)
playzones:readList and view Playzones
playzones:writeCreate, update, attach, and sync Playzones
playzones:deleteDelete Playzones
playspecs:readList and view Playspecs
playspecs:writeCreate and update Playspecs (including mounted files and registry credentials)
playspecs:deleteDelete Playspecs
playgrounds:readList and view Playgrounds (including logs, compose, env metadata)
playgrounds:writeCreate, recreate, and extend Playgrounds
playgrounds:deleteDelete (destroy) Playgrounds
import_templates:readList and view import templates
import_templates:writeCreate and update import templates
launch:writeUse the Launch endpoint
repos:writeCreate GitHub repositories and push files via the Repositories API
keys:manageCreate and delete API keys
mcp:accessConnect to the MCP server

Key Expiration

Keys can optionally have an expiration date. Expired keys are automatically rejected. Keys without an expiration date remain valid until explicitly deleted.

Error Handling

All error responses follow a consistent format:

{
"error": {
"code": "VALIDATION_FAILED",
"message": "Validation failed",
"details": {
"name": ["can't be blank"]
}
}
}

Error Codes

HTTP StatusError CodeDescription
400BAD_REQUESTMissing or invalid parameters
401UNAUTHORIZEDAuthentication required or failed
403FORBIDDENInsufficient permissions or scope violation
404RESOURCE_NOT_FOUNDThe requested resource does not exist
409CONFLICTResource state conflict (e.g., deleting a Playroom with active Playgrounds)
422VALIDATION_FAILEDRequest body failed validation
422LOCKEDResource is locked and cannot be modified
422INVALID_STATEThe operation is not valid for the resource's current state
422QUOTA_EXCEEDEDAccount resource limit reached

Testing in the Browser

Since the API supports session-based authentication, you can test endpoints directly in your browser while logged in. Simply navigate to an API URL like:

https://fibe.gg/api/playrooms

The response will be JSON. Use the browser's developer tools or a tool like jq for formatting.

Pagination

The current API returns full result sets without pagination. For large collections, filter results using endpoint-specific query parameters.