Skip to main content
The Byteful API follows RESTful principles with consistent URL patterns, standard HTTP methods, and JSON-formatted requests and responses. This page explains the core structural components of the API.

Base URL

All API requests should be made to the following base URL:

URL Structure

The API URLs follow a consistent pattern:

Components

All Public API therefore follow this URL format:

Example URLs

HTTP Methods

The API uses standard HTTP methods to perform different actions:
Inconsistent HTTP Method: The route POST /public/user/proxy/list_by_id violates the established HTTP method convention. According to the convention, retrieval operations should use the GET method, but this endpoint uses POST for a retrieval operation. This is an intentional deviation to support sending large lists of UUIDs in the request body, which wouldn’t be practical with query parameters in a GET request.

Method and URL Mapping

The HTTP method and URL structure work together to define the operation:

Request Format

Headers

All requests should include the following headers:

Request Body

For POST and PATCH requests, data should be sent as JSON in the request body:

Query Parameters

For GET requests, parameters are passed in the URL query string:
Common query parameters include:

Response Format

All API responses are JSON objects with a consistent structure:

Success Responses

Successful responses include:
  • HTTP status code in the 200 range
  • data field containing the requested resource(s)
  • message field with a success message
Example of a successful retrieve operation:
Example of a successful search operation:

Error Responses

Error responses include:
  • HTTP status code in the 400 or 500 range
  • error field with the error type
  • message field with a description of the error
  • api_request_id field for reference when contacting support
Example error response:

HTTP Status Codes

The API uses standard HTTP status codes to indicate the result of a request:

Data Types

The API uses standard JSON data types:

Date and Time Format

All date and time values in the API use the format below:
Example: "2023-09-15 14:30:00" When filtering by dates, you can use:
  • Format: 2023-09-15 14:30:00
  • Date only: 2023-09-15