API Documentation
Integrate faxrocks.com into your application using our REST API.
Authentication
All API requests require authentication using a Bearer token. Include your API token in the Authorization header.
Authorization: Bearer your-api-token
Base URL
https://faxrocks.com/api
Endpoints
/send
Send a fax to one or multiple recipients.
Request Body
// Single recipient
{
"number": "+49123456789",
"data": "base64-encoded-pdf-content"
}
// Multiple recipients (max 10)
{
"numbers": ["+49123456789", "+49987654321"],
"data": "base64-encoded-pdf-content"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
number |
string | Single fax number in international format. Required if numbers is not provided. | |
numbers |
array | Array of fax numbers (max 10). Required if number is not provided. | |
data |
string | Base64-encoded PDF file content | |
scheduled_at |
string | ISO 8601 date/time to schedule the fax for later delivery | |
timezone |
string | Timezone for scheduled_at (e.g., Europe/Berlin). Defaults to user timezone. |
Response (single)
{
"message": "Fax queued for transfer.",
"number": "+49123456789",
"pages": 2,
"estimated_costs": 0.18
}
Response (batch)
{
"message": "Faxes queued for transfer.",
"faxes": [
{ "number": "+49123456789", "pages": 2, "estimated_costs": 0.18 },
{ "number": "+49987654321", "pages": 2, "estimated_costs": 0.18 }
]
}
/faxes
Get a paginated list of all your faxes.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
perPage |
integer | 15 | Number of results per page (1-1000) |
Response
{
"data": [
{
"id": "656081f85ab27167270",
"number": "+49123456789",
"sent_at": 1705849200,
"sent_at_timezone": "Europe/Berlin",
"status": true,
"error": null,
"price": "0.09",
"pages": 1,
"pages_sent": 1,
"created_at": "2024-01-21T15:00:00.000000Z",
"updated_at": "2024-01-21T15:01:00.000000Z"
}
],
"links": { ... },
"meta": { ... }
}
The id field is an alphanumeric string (lowercase letters and numbers).
/user
Get the authenticated user information.
Response
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"created_at": "2024-01-01T00:00:00.000000Z",
...
}
/faxes/{id}/fax
Download the original fax PDF file.
| Parameter | Type | Description |
|---|---|---|
id |
string | The fax ID (alphanumeric string) |
/faxes/{id}/receipt
Download the fax receipt PDF.
| Parameter | Type | Description |
|---|---|---|
id |
string | The fax ID (alphanumeric string) |
Error Responses
| Code | Meaning |
|---|---|
| Unauthorized - Invalid or missing API token | |
| Forbidden - You do not have access to this resource | |
| Not Found - The requested resource does not exist | |
| Unprocessable Entity - Validation error | |
| Internal Server Error - Something went wrong on our end |