Skip to main content

Get Your API Key

  1. Log in to the FlexPortal Dashboard
  2. Navigate to Settings → API Keys
  3. Click Create API Key
  4. 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:
RegionBase URL
Test/Sandboxhttps://api-test.flexportal.io
Europehttps://api-eu.flexportal.io
United Stateshttps://api-us.flexportal.io
Qatarhttps://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:
StatusMeaning
200Success
400Bad request — check your request body
401Unauthorized — check your API key
404Not found — resource doesn’t exist
429Rate limited — slow down
500Server error — try again later
Error responses include a message:
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The 'email' field is required"
  }
}

Next Steps