API Reference

Complete reference for Chybyke Studios APIs with examples, authentication, and best practices.

API Overview

The Chybyke Studios API provides programmatic access to our platform's core functionality. This RESTful API uses JSON for data exchange and follows standard HTTP methods and status codes.

Base URL

https://api.chybykestudios.com/v1

Authentication

All API requests require authentication using API keys. Include your API key in the request header:

curl -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ https://api.chybykestudios.com/v1/users

Rate Limiting

API requests are limited to 1000 requests per hour per API key. Rate limit information is included in response headers.

Users API

GET
/users

Retrieve a list of all users with optional filtering and pagination.

Query Parameters

Parameter Type Required Description
page integer optional Page number for pagination (default: 1)
limit integer optional Number of users per page (default: 20, max: 100)
role string optional Filter by user role (admin, user, developer)
status string optional Filter by status (active, inactive, pending)

Example Request

const response = await fetch('https://api.chybykestudios.com/v1/users?page=1&limit=10&role=developer', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } }); const users = await response.json();

Response

200 OK
{ "data": [ { "id": "usr_123456789", "name": "John Doe", "email": "john@example.com", "role": "developer", "status": "active", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-20T14:45:00Z" } ], "pagination": { "current_page": 1, "per_page": 10, "total": 50, "total_pages": 5 }, "meta": { "request_id": "req_987654321", "response_time_ms": 145 } }
POST
/users

Create a new user account with the specified details.

Request Body

Field Type Required Description
name string required Full name of the user (min: 2, max: 100 characters)
email string required Valid email address (must be unique)
password string required Password (min: 8 characters, must include numbers and symbols)
role string optional User role (default: user)

Example Request

const response = await fetch('https://api.chybykestudios.com/v1/users', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'Jane Smith', email: 'jane@example.com', password: 'SecurePass123!', role: 'developer' }) }); const newUser = await response.json();

Response

201 Created
{ "data": { "id": "usr_987654321", "name": "Jane Smith", "email": "jane@example.com", "role": "developer", "status": "active", "created_at": "2024-01-25T16:20:00Z", "updated_at": "2024-01-25T16:20:00Z" }, "meta": { "request_id": "req_123456789", "response_time_ms": 89 } }

Error Handling

The API uses conventional HTTP response codes to indicate success or failure. Error responses include detailed information to help you troubleshoot issues.

400 Bad Request
{ "error": { "code": "VALIDATION_ERROR", "message": "The request contains invalid parameters", "details": [ { "field": "email", "message": "Email address is already in use" }, { "field": "password", "message": "Password must be at least 8 characters long" } ] }, "meta": { "request_id": "req_error_123", "timestamp": "2024-01-25T16:25:00Z" } }
401 Unauthorized
{ "error": { "code": "UNAUTHORIZED", "message": "Invalid or missing API key", "details": "Please ensure you include a valid API key in the Authorization header" }, "meta": { "request_id": "req_error_456", "timestamp": "2024-01-25T16:30:00Z" } }

Rate Limits

All endpoints are subject to rate limiting. The current limits are:

  • Standard endpoints: 1000 requests per hour
  • Authentication endpoints: 100 requests per hour
  • File upload endpoints: 50 requests per hour

Rate limit information is included in every response header:

X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 999 X-RateLimit-Reset: 1640995200