Get Your API Key
- Log in to the FlexPortal Dashboard
- Navigate to Settings → API Keys
- Click Create API Key
- Copy your key — you won’t see it again
Keep your API key secure. Don’t commit it to version control or expose it in client-side code.
Base URLs
FlexPortal is deployed across multiple regions. Use the base URL for your region:
| Region | Base URL |
|---|
| Test/Sandbox | https://api-test.flexportal.io |
| Europe | https://api-eu.flexportal.io |
| United States | https://api-us.flexportal.io |
| Qatar | https://api-qatar.flexportal.io |
Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Make Your First Request
Let’s fetch your organization’s products:
curl -X GET "https://api-test.flexportal.io/v1/products" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Response
{
"data": [
{
"id": "prod_abc123",
"name": "iPhone 15 Pro",
"sku": "IPHONE-15-PRO-256",
"status": "active",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1
}
}
Error Handling
FlexPortal uses standard HTTP status codes:
| Status | Meaning |
|---|
200 | Success |
400 | Bad request — check your request body |
401 | Unauthorized — check your API key |
404 | Not found — resource doesn’t exist |
429 | Rate limited — slow down |
500 | Server error — try again later |
Error responses include a message:
{
"error": {
"code": "INVALID_REQUEST",
"message": "The 'email' field is required"
}
}
Next Steps