API Reference
ArcBilling provides a REST API for managing clients, services, invoices, and support tickets programmatically.
Authentication
Authorization: Bearer YOUR_API_KEY
Generate API keys from Admin Panel → Settings → API.
Base URL
https://yourdomain.com/api/v1
Response Format
{
"status": "success",
"data": { ... }
}
{
"status": "error",
"error": {
"code": "VALIDATION_ERROR",
"message": "The email field is required."
}
}
Rate Limiting
| Scope | Limit |
| Authenticated | 60 requests/minute |
| Unauthenticated | 10 requests/minute |
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
Retry-After: 42
Clients
List Clients
GET /api/v1/clients
Get Client
GET /api/v1/clients/{id}
Create Client
POST /api/v1/clients
| Field | Type | Required |
first_name | string | Yes |
last_name | string | Yes |
email | string | Yes |
password | string | Yes (min 8 chars) |
company | string | No |
phone | string | No |
address | string | No |
city | string | No |
country | string | No (ISO 3166-1) |
Update Client
PUT /api/v1/clients/{id}
Delete Client
DELETE /api/v1/clients/{id}
Services
List Services
GET /api/v1/services
Get Service
GET /api/v1/services/{id}
Create Service
POST /api/v1/services
| Field | Type | Required |
client_id | integer | Yes |
product_id | integer | Yes |
billing_cycle | string | Yes (monthly, quarterly, annually) |
domain | string | No |
username | string | No |
Suspend Service
POST /api/v1/services/{id}/suspend
Unsuspend Service
POST /api/v1/services/{id}/unsuspend
Terminate Service
POST /api/v1/services/{id}/terminate
Invoices
List Invoices
GET /api/v1/invoices
Get Invoice
GET /api/v1/invoices/{id}
Create Invoice
POST /api/v1/invoices
| Field | Type | Required |
client_id | integer | Yes |
due_date | date (Y-m-d) | Yes |
items | array | Yes |
items[].description | string | Yes |
items[].amount | decimal | Yes |
Mark Invoice Paid
POST /api/v1/invoices/{id}/pay
Support Tickets
List Tickets
GET /api/v1/tickets
Get Ticket
GET /api/v1/tickets/{id}
Create Ticket
POST /api/v1/tickets
| Field | Type | Required |
client_id | integer | Yes |
department_id | integer | Yes |
subject | string | Yes |
message | string | Yes |
priority | string | No (low, medium, high) |
Reply to Ticket
POST /api/v1/tickets/{id}/reply
Close Ticket
POST /api/v1/tickets/{id}/close
Products
List Products
GET /api/v1/products
Get Product
GET /api/v1/products/{id}
Servers
List Servers
GET /api/v1/servers
Get Server
GET /api/v1/servers/{id}
Webhooks
| Event | Trigger |
client.created | New client registered |
service.created | New service provisioned |
service.suspended | Service suspended |
service.terminated | Service terminated |
invoice.created | New invoice generated |
invoice.paid | Invoice marked as paid |
ticket.opened | New support ticket |
ticket.replied | New reply on a ticket |
Webhook Payload
{
"event": "invoice.paid",
"timestamp": "2025-01-15T12:00:00Z",
"data": {
"id": 1234,
"client_id": 56,
"total": "29.99",
"currency": "USD"
},
"signature": "sha256=a1b2c3d4..."
}
Error Codes
| HTTP Code | Error Code | Description |
| 400 | VALIDATION_ERROR | Invalid request parameters |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Insufficient permissions |
| 404 | NOT_FOUND | Resource not found |
| 429 | RATE_LIMITED | Too many requests |
| 500 | INTERNAL_ERROR | Server error |