Getting Started with Flybox API
Welcome to the Flybox API documentation. This guide will help you get up and running with our API quickly.
Overview
The Flybox API is a GraphQL API that allows you to interact with all Flybox services programmatically. Whether you're building integrations, automating workflows, or creating custom applications, our API provides the flexibility you need.
Base URL
All API requests should be made to:
https://api.flybox.com/graphql
Quick Start
1. Get Your API Key
First, you'll need to obtain an API key from your Flybox dashboard:
- Log in to your Flybox account
- Navigate to Settings → API Keys
- Click Generate New Key
- Copy and securely store your key
Important: Treat your API key like a password. Never expose it in client-side code or public repositories.
2. Make Your First Request
Here's a simple example to test your API connection:
curl -X POST https://api.flybox.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"query": "{ viewer { id email } }"}'
3. Explore the API
Once you've confirmed your connection works, explore the full API capabilities in our GraphQL API Reference.
SDKs & Libraries
While you can use any HTTP client to interact with our GraphQL API, we recommend using a dedicated GraphQL client for the best experience:
| Language | Recommended Client |
|---|---|
| JavaScript/TypeScript | Apollo Client, urql |
| Python | gql, sgqlc |
| Ruby | graphql-client |
| Go | machinebox/graphql |
Rate Limits
The API enforces the following rate limits:
- Standard tier: 100 requests per minute
- Pro tier: 1,000 requests per minute
- Enterprise: Custom limits
Rate limit headers are included in every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1609459200
Error Handling
All errors follow a consistent format:
{
"errors": [
{
"message": "Unauthorized",
"extensions": {
"code": "UNAUTHENTICATED"
}
}
]
}
Common error codes:
| Code | Description |
|---|---|
UNAUTHENTICATED | Missing or invalid API key |
FORBIDDEN | Insufficient permissions |
NOT_FOUND | Resource doesn't exist |
RATE_LIMITED | Too many requests |
VALIDATION_ERROR | Invalid input data |
Next Steps
- Authentication Guide - Learn about API authentication
- GraphQL API Reference - Full API documentation