Blaxy

API Documentation

Base URL

https://api.blaxy.com/v1


Versiyon: v1

Yetkilendirme: Bearer JWT token (Authorization: Bearer <access_token>)

Rate Limits

  • Default: 100 requests / minute (per IP)

  • If exceeded: HTTP 429 Too Many Requests is returned with a Retry-After header.


Error Response Format

{
  "error": {
    "code": "string_code",
    "message": "Human-readable error message",
    "details": { "field": "info" }
  }
}

Common error codes:


  • invalid_credentials (401)

  • forbidden (403)

  • not_found (404)

  • validation_error (400)

  • rate_limit_exceeded (429)

  • internal_error (500)


Authentication

POST /auth/register


Registers a new user.

Request

curl -X POST https://api.blaxy.com/v1/auth/register \
 -H "Content-Type: application/json" \
 -d '{
   "name": "John Doe",
   "email": "john@example.com",
   "password": "Password123!"
 }'

Response (201)

curl -X POST https://api.blaxy.com/v1/auth/register \
 -H "Content-Type: application/json" \
 -d '{
   "name": "John Doe",
   "email": "john@example.com",
   "password": "Password123!"
 }'

POST /auth/refresh


Refreshes an access token.


Request

curl -X POST https://api.blaxy.com/v1/auth/refresh \
 -H "Content-Type: application/json" \
 -d '{"refresh_token":"refresh_token"}'

Response

{ "access_token": "new_jwt_token", "expires_in": 3600 }