Skip to main content

Base URL

All API requests go to:
https://dev.flextell.ai/api
All requests must use HTTPS. HTTP requests are not supported.

Required headers

Every request must include the following headers:
HeaderValue
AuthorizationBearer <your_token>
Content-Typeapplication/json
Acceptapplication/json
You receive your bearer token after completing the OAuth 2.0 Authorization Code Flow. See the authentication guide for details on obtaining a token.

HTTP methods

Flextell follows standard REST conventions for HTTP methods:
MethodUse
GETRead a resource or list resources
POSTCreate a new resource
PUTReplace a resource entirely
PATCHPartially update a resource
DELETERemove a resource

Request body format

For POST, PUT, and PATCH requests, send a JSON object in the request body. Always set Content-Type: application/json.
{
  "name": "My resource",
  "description": "A short description"
}

Examples

GET request

Retrieve a resource by its ID.
curl --request GET \
  --url https://dev.flextell.ai/api/resources/res_123 \
  --header "Authorization: Bearer <your_token>" \
  --header "Accept: application/json"

POST request

Create a new resource by sending a JSON body.
curl --request POST \
  --url https://dev.flextell.ai/api/resources \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --data '{
    "name": "My resource",
    "description": "A short description"
  }'

Reading responses

Status codes

StatusMeaning
200 OKRequest succeeded. Response body contains the result.
201 CreatedResource was created successfully. Response body contains the new resource.
204 No ContentRequest succeeded. No response body (common for DELETE).
400 Bad RequestThe request was malformed or missing required fields.
401 UnauthorizedThe bearer token is missing or invalid.
403 ForbiddenThe token is valid, but you do not have permission to perform this action.
404 Not FoundThe requested resource does not exist.
429 Too Many RequestsYou have exceeded the rate limit.
500 Internal Server ErrorAn unexpected error occurred on the server.

Response envelope

Most successful responses return a JSON object with a data field containing the result:
{
  "data": {
    "id": "res_123",
    "name": "My resource",
    "description": "A short description",
    "created_at": "2026-04-08T12:00:00Z"
  }
}
List endpoints return data as an array alongside pagination metadata:
{
  "data": [
    { "id": "res_123", "name": "My resource" },
    { "id": "res_456", "name": "Another resource" }
  ],
  "meta": {
    "cursor": "cursor_abc",
    "has_more": true,
    "total": 84
  }
}
Always check the HTTP status code before parsing the response body. On error responses (4xx, 5xx), the body contains an error code and message instead of data. See the error handling guide for details.