Errors
Error responses include a JSON body with an error field describing what went wrong:
json
{
"error": "description of what went wrong"
}| Status | What it means |
|---|---|
400 | Something is wrong with your request (invalid body, missing fields) |
401 | Your API key is missing, invalid, or expired |
403 | Your API key lacks the required permission for this action |
404 | The resource you requested doesn't exist |
409 | The resource already exists (conflict) |
429 | Rate limit exceeded — wait and retry |
500 | Something went wrong on our end |
Examples
Start a session and check for results
bash
curl -s -X POST "https://us1.vorflux.com/api/v1/sessions" \
-H "Authorization: Bearer vfx_sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"initialMessage": "What services have high error rates right now?"}'Get messages from a session
bash
curl -s "https://us1.vorflux.com/api/v1/sessions/SESSION_ID/messages" \
-H "Authorization: Bearer vfx_sk_YOUR_API_KEY"Create a plan and approve it
bash
# Start a plan session
curl -s -X POST "https://us1.vorflux.com/api/v1/sessions" \
-H "Authorization: Bearer vfx_sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"initialMessage": "Refactor the auth module to use JWT", "sessionType": "PLAN"}'bash
# Approve the plan
curl -s -X POST "https://us1.vorflux.com/api/v1/sessions/SESSION_ID/plan/approve" \
-H "Authorization: Bearer vfx_sk_YOUR_API_KEY" \
-H "Content-Type: application/json"Send a follow-up message
bash
curl -s -X POST "https://us1.vorflux.com/api/v1/sessions/SESSION_ID/messages" \
-H "Authorization: Bearer vfx_sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "Focus on the payment service first"}'Managing Your API Keys
You can create, view, and revoke API keys from the Vorflux dashboard under Settings → API. API keys are prefixed with vfx_sk_ and carry the scopes sessions:read, sessions:write, batch:read, and batch:write; pass the key as Authorization: Bearer vfx_sk_… on every request.
To revoke a compromised key, find it in the list and click Revoke. The key stops working immediately.