CodeBoost API Documentation

Welcome to CodeBoost API v1.0

Integrate CodeBoost's SMM services into your applications with our comprehensive REST API.

Base URL: https://www.codeboost.shop/api/v1
Authentication

CodeBoost API uses API key authentication. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Getting Your API Key

To get your API key, authenticate with your username and password:

POST /auth/login
Request Body:
{
    "username": "your_username",
    "password": "your_password"
}
Response:
{
    "success": true,
    "message": "Authentication successful",
    "data": {
        "user": {
            "id": 1,
            "username": "your_username",
            "email": "user@example.com"
        },
        "api_key": "cb_1234567890abcdef..."
    }
}
API Endpoints
GET /services Get all available SMM services
Headers:
Authorization: Bearer YOUR_API_KEY
Response:
{
    "success": true,
    "message": "Services retrieved successfully",
    "data": [
        {
            "id": 1,
            "name": "Instagram Followers",
            "category": "Instagram",
            "price": 26.00,
            "min_quantity": 100,
            "max_quantity": 10000,
            "description": "High-quality Instagram followers"
        }
    ]
}
GET /orders Get user's order history
Headers:
Authorization: Bearer YOUR_API_KEY
Response:
{
    "success": true,
    "message": "Orders retrieved successfully",
    "data": [
        {
            "id": 1,
            "service_name": "Instagram Followers",
            "quantity": 1000,
            "link": "https://instagram.com/username",
            "cost": 26.00,
            "status": "completed",
            "created_at": "2024-01-15 10:30:00"
        }
    ]
}
POST /orders Create a new order
Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Request Body:
{
    "service_id": 1,
    "quantity": 1000,
    "link": "https://instagram.com/username"
}
Response:
{
    "success": true,
    "message": "Order created successfully",
    "data": {
        "order_id": 123
    }
}
GET /balance Get user's current balance
Headers:
Authorization: Bearer YOUR_API_KEY
Response:
{
    "success": true,
    "message": "Balance retrieved successfully",
    "data": {
        "balance": 150.50,
        "currency": "GHS"
    }
}
GET /marketplace Get marketplace listings
Headers:
Authorization: Bearer YOUR_API_KEY
Response:
{
    "success": true,
    "message": "Marketplace listings retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "Instagram Account for Sale",
            "category_name": "Instagram",
            "platform": "Instagram",
            "followers_count": 50000,
            "price": 500.00,
            "seller_name": "seller_username",
            "status": "active"
        }
    ]
}
Rate Limiting
Rate Limit: 100 requests per hour per user

When you exceed the rate limit, you'll receive a 429 status code:

{
    "success": false,
    "message": "Rate limit exceeded. Maximum 100 requests per hour.",
    "errors": null,
    "timestamp": "2024-01-15 10:30:00",
    "api_version": "v1"
}
Error Handling

All API responses follow a consistent format. Error responses include:

400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing API key
403 Forbidden - Insufficient permissions
404 Not Found - Resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error
Code Examples
PHP Example
<?php
$api_key = 'your_api_key_here';
$base_url = 'https://www.codeboost.shop/api/v1';

// Get services
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $base_url . '/services');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $api_key
]);

$response = curl_exec($ch);
$services = json_decode($response, true);

// Create order
$order_data = [
    'service_id' => 1,
    'quantity' => 1000,
    'link' => 'https://instagram.com/username'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $base_url . '/orders');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($order_data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $api_key,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
$result = json_decode($response, true);
?>
JavaScript Example
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://yourdomain.com/codeboost/api/v1';

// Get services
async function getServices() {
    const response = await fetch(`${BASE_URL}/services`, {
        headers: {
            'Authorization': `Bearer ${API_KEY}`
        }
    });
    return await response.json();
}

// Create order
async function createOrder(serviceId, quantity, link) {
    const response = await fetch(`${BASE_URL}/orders`, {
        method: 'POST',
        headers: {
            'Authorization': `Bearer ${API_KEY}`,
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            service_id: serviceId,
            quantity: quantity,
            link: link
        })
    });
    return await response.json();
}

// Usage
getServices().then(data => console.log(data));
createOrder(1, 1000, 'https://instagram.com/username')
    .then(result => console.log(result));
Python Example
import requests
import json

API_KEY = 'your_api_key_here'
BASE_URL = 'https://yourdomain.com/codeboost/api/v1'

headers = {
    'Authorization': f'Bearer {API_KEY}',
    'Content-Type': 'application/json'
}

# Get services
def get_services():
    response = requests.get(f'{BASE_URL}/services', headers=headers)
    return response.json()

# Create order
def create_order(service_id, quantity, link):
    data = {
        'service_id': service_id,
        'quantity': quantity,
        'link': link
    }
    response = requests.post(f'{BASE_URL}/orders', 
                           headers=headers, 
                           data=json.dumps(data))
    return response.json()

# Usage
services = get_services()
print(services)

order = create_order(1, 1000, 'https://instagram.com/username')
print(order)
Support

Need help integrating with the CodeBoost API?

Join Our Channel! Join Our Channel!