API Documentation
Integrate DataSync into your infrastructure with our REST API. Manage backup jobs, agents, databases, destinations, and more programmatically.
Overview
The DataSync API is a standard REST API that accepts JSON request bodies and returns JSON responses. All API endpoints are served from a single base URL.
Base URL
https://api.data-sync.co.uk
Authentication Methods
- Bearer JWT — Obtained by calling
/api/auth/login. Short-lived access tokens suitable for interactive sessions. - API Keys Requires Professional+ — Long-lived keys for automation and CI/CD. Generated from your account dashboard under Account > API Keys.
Both methods use the Authorization header:
Authorization: Bearer <your-token-or-api-key>Content Type
All requests with a body must include:
Content-Type: application/jsonAuthentication
JWT Token Flow
Authenticate by posting credentials to /api/auth/login. The response includes a JWT access token you can use on subsequent requests.
# 1. Get a token curl -X POST https://api.data-sync.co.uk/api/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "you@example.com", "password": "your-password" }' # 2. Use the token curl https://api.data-sync.co.uk/api/backupjob \ -H "Authorization: Bearer <token-from-step-1>"
API Key Authentication Requires Professional+
API keys do not expire and are ideal for scripts and integrations. Create them in the DataSync dashboard under Account > API Keys.
curl https://api.data-sync.co.uk/api/backupjob \ -H "Authorization: Bearer ds_live_abc123..."
Security: Never expose API keys in client-side code or public repositories. Rotate keys immediately if compromised.
Rate Limits
API requests are rate-limited per subscriber to ensure fair usage:
| Plan | Limit |
|---|---|
| Free | 60 requests / minute |
| Starter | 120 requests / minute |
| Professional | 300 requests / minute |
| Ultimate | 600 requests / minute |
When rate-limited, the API responds with 429 Too Many Requests. Use the Retry-After header to determine when to retry.
Response Format
All responses are JSON. Successful responses return the data directly. Error responses include an error field.
Success Response
{
"backupJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Nightly Full Backup",
"isEnabled": true
}Error Response
{
"error": "Backup job not found."
}Standard Status Codes
| Code | Meaning |
|---|---|
| 200 | OK — Request succeeded |
| 201 | Created — Resource created |
| 400 | Bad Request — Invalid input |
| 401 | Unauthorized — Missing or invalid token |
| 403 | Forbidden — Insufficient permissions or plan limit |
| 404 | Not Found — Resource does not exist |
| 429 | Too Many Requests — Rate limit exceeded |
| 500 | Server Error — Unexpected failure |
Auth
Authenticate with email and password to receive a JWT access token.
PublicRequest Body
{
"email": "you@example.com",
"password": "your-password"
}Response 200
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"expiry": "2026-03-27T10:00:00Z"
}Status Codes
| 200 | Login successful, token returned |
| 400 | Invalid email or password |
| 401 | Credentials incorrect or email not confirmed |
Register a new user account and subscriber. A confirmation email will be sent.
PublicRequest Body
{
"forename": "Jane",
"email": "jane@example.com",
"password": "SecureP@ss123",
"organisationName": "Acme Corp"
}Response 200
{
"message": "Registration successful. Please check your email to confirm your account."
}Status Codes
| 200 | Account created, confirmation email sent |
| 400 | Validation error (email taken, weak password, etc.) |
Sends a password reset link to the registered email address.
PublicRequest Body
{
"email": "you@example.com"
}Response 200
{
"message": "If that email exists, a reset link has been sent."
}Status Codes
| 200 | Always returns 200 (prevents email enumeration) |
Agents
Agents are lightweight services installed on your servers that perform backups. They connect to DataSync via SignalR and are managed through these endpoints.
Returns all agents registered under your subscriber account, including their connection status and metadata.
Auth RequiredResponse 200
[
{
"agentId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"hostname": "PROD-SQL-01",
"displayName": "Production SQL Server",
"version": "1.4.2",
"isOnline": true,
"lastSeenUtc": "2026-03-26T14:30:00Z",
"operatingSystem": "Windows Server 2022"
}
]Status Codes
| 200 | Agent list returned |
| 401 | Not authenticated |
Returns detailed information about a specific agent, including discovered engines and databases.
Auth RequiredResponse 200
{
"agentId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"hostname": "PROD-SQL-01",
"displayName": "Production SQL Server",
"version": "1.4.2",
"isOnline": true,
"lastSeenUtc": "2026-03-26T14:30:00Z",
"engines": [
{
"engineId": "b1c2d3e4-...",
"dbmsType": "MicrosoftSql",
"version": "16.0.4175.1"
}
]
}Status Codes
| 200 | Agent details returned |
| 404 | Agent not found |
Permanently removes an agent and all its associated engines. Backup jobs referencing this agent will be orphaned.
Auth RequiredResponse 200
{
"message": "Agent deleted."
}Status Codes
| 200 | Agent deleted |
| 404 | Agent not found |
Backup Jobs
Backup jobs define what to back up, where to store it, and when to run. Each job targets one or more databases and destinations via an agent.
Returns all backup jobs for your subscriber, including schedules, latest status, and associated agent.
Auth RequiredResponse 200
[
{
"backupJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Nightly Full Backup",
"isEnabled": true,
"agentId": "d290f1ee-...",
"schedules": [
{ "backupMode": "Full", "cronExpression": "0 2 * * *" }
],
"lastStatus": "Success",
"lastRunUtc": "2026-03-26T02:00:00Z"
}
]Status Codes
| 200 | Job list returned |
| 401 | Not authenticated |
Returns full details of a backup job including databases, destinations, schedules, encryption, and retention settings.
Auth RequiredResponse 200
{
"backupJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Nightly Full Backup",
"isEnabled": true,
"agentId": "d290f1ee-...",
"databases": [ "..." ],
"destinations": [ "..." ],
"schedules": [
{ "backupMode": "Full", "cronExpression": "0 2 * * *" }
],
"retentionDays": 30,
"encryption": {
"enabled": true,
"algorithm": "AES-256"
}
}Status Codes
| 200 | Job details returned |
| 404 | Job not found |
Creates a new backup job. The agent must be online for the job to be synced.
Auth RequiredRequest Body
{
"name": "Nightly Full Backup",
"agentId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"databaseIds": ["..."],
"destinationIds": ["..."],
"schedules": [
{
"backupMode": "Full",
"cronExpression": "0 2 * * *"
}
],
"retentionDays": 30,
"encryption": {
"enabled": true,
"passphrase": "your-encryption-passphrase"
}
}Response 200
{
"backupJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Nightly Full Backup",
"isEnabled": true
}Status Codes
| 200 | Job created and synced to agent |
| 400 | Validation error |
| 403 | Plan limit exceeded |
Updates an existing backup job. Changes are synced to the agent immediately if it is online.
Auth RequiredRequest Body
{
"name": "Updated Job Name",
"schedules": [
{
"backupMode": "Full",
"cronExpression": "0 3 * * *"
},
{
"backupMode": "Differential",
"cronExpression": "0 */6 * * *"
}
],
"retentionDays": 60
}Status Codes
| 200 | Job updated |
| 400 | Validation error |
| 404 | Job not found |
Permanently deletes a backup job. The agent is notified to remove it from its schedule. Associated backup history is retained.
Auth RequiredResponse 200
{
"message": "Backup job deleted."
}Status Codes
| 200 | Job deleted |
| 404 | Job not found |
Triggers an immediate backup run for the specified job. The agent must be online. The backup runs asynchronously; monitor progress via the backup history endpoint.
Auth RequiredRequest Body (optional)
{
"backupMode": "Full"
}Response 200
{
"message": "Backup triggered."
}Status Codes
| 200 | Backup triggered on agent |
| 400 | Agent is offline or job is disabled |
| 404 | Job not found |
Databases
Databases are discovered automatically by agents from connected database engines. Use these endpoints to list discovered databases.
Returns all databases discovered across all agents and engines.
Auth RequiredResponse 200
[
{
"databaseId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "AdventureWorks",
"dbmsType": "MicrosoftSql",
"engineId": "b1c2d3e4-...",
"agentId": "d290f1ee-..."
}
]Status Codes
| 200 | Database list returned |
| 401 | Not authenticated |
Destinations
Destinations are storage targets for backup files: local directories, S3, Azure Blob, SFTP, Google Cloud, and more.
Returns all backup destinations configured for your subscriber.
Auth RequiredResponse 200
[
{
"destinationId": "c1d2e3f4-...",
"name": "AWS S3 Production",
"type": "S3Storage",
"agentId": "d290f1ee-..."
}
]Status Codes
| 200 | Destination list returned |
| 401 | Not authenticated |
Backup Files
Backup files represent completed backup artifacts stored at destinations. Query them to audit your backup inventory.
Returns all backup files recorded for your subscriber, with file size, checksum, and creation date.
Auth RequiredResponse 200
[
{
"backupFileId": "e1f2a3b4-...",
"backupJobId": "a1b2c3d4-...",
"fileName": "AdventureWorks_Full_20260326_020000.bak",
"fileSize": 1073741824,
"checksum": "sha256:ab12cd34...",
"dateCreated": "2026-03-26T02:01:30Z"
}
]Status Codes
| 200 | File list returned |
| 401 | Not authenticated |
Credentials
Credentials are encrypted references used by agents to connect to database engines and storage destinations.
Returns all credential references. Sensitive fields (passwords, keys) are never returned in plaintext.
Auth RequiredResponse 200
[
{
"credentialReferenceId": "f1e2d3c4-...",
"name": "SQL Server SA",
"type": "BasicCredential",
"agentId": "d290f1ee-..."
}
]Status Codes
| 200 | Credential list returned |
| 401 | Not authenticated |
Creates a new encrypted credential reference. The agent is notified to store it securely.
Auth RequiredRequest Body
{
"name": "S3 Access Key",
"agentId": "d290f1ee-...",
"credential": {
"$type": "S3Credential",
"accessKeyId": "AKIA...",
"secretAccessKey": "wJal...",
"region": "eu-west-2"
}
}Status Codes
| 200 | Credential created |
| 400 | Validation error |
Logs
Query structured log messages from agents and the platform. Useful for diagnostics and audit trails.
Returns paginated log messages. Supports filtering by severity, date range, and agent.
Auth RequiredQuery Parameters
| Parameter | Type | Description |
|---|---|---|
| severity | string | Filter by severity: Information, Warning, Error, Critical |
| from | datetime | Start date (ISO 8601) |
| to | datetime | End date (ISO 8601) |
| page | int | Page number (default: 1) |
| pageSize | int | Items per page (default: 50, max: 200) |
Response 200
[
{
"logMessageId": "...",
"severity": "Error",
"message": "Backup failed: disk space insufficient",
"timestamp": "2026-03-26T02:15:00Z",
"agentId": "d290f1ee-..."
}
]Status Codes
| 200 | Log entries returned |
| 401 | Not authenticated |
Webhooks Requires Professional+
Configure webhook endpoints to receive real-time notifications for backup events: success, failure, anomaly detection, and more.
Returns all webhook endpoints configured for your subscriber.
Auth RequiredResponse 200
[
{
"webhookId": "a1b2c3d4-...",
"url": "https://hooks.example.com/datasync",
"events": ["backup.success", "backup.failure"],
"isEnabled": true,
"createdAt": "2026-03-20T10:00:00Z"
}
]Status Codes
| 200 | Webhook list returned |
| 401 | Not authenticated |
Registers a new webhook endpoint. DataSync will POST JSON payloads to this URL when subscribed events occur.
Auth RequiredRequest Body
{
"url": "https://hooks.example.com/datasync",
"events": [
"backup.success",
"backup.failure",
"backup.anomaly"
],
"secret": "whsec_your-signing-secret"
}Supported Events
| backup.success | Fired when a backup completes successfully |
| backup.failure | Fired when a backup fails |
| backup.anomaly | Fired when an anomaly is detected (size, duration, missing) |
| agent.connected | Fired when an agent comes online |
| agent.disconnected | Fired when an agent goes offline |
Status Codes
| 200 | Webhook created |
| 400 | Invalid URL or events |
Updates an existing webhook configuration.
Auth RequiredRequest Body
{
"url": "https://hooks.example.com/datasync-v2",
"events": ["backup.success", "backup.failure"],
"isEnabled": true
}Status Codes
| 200 | Webhook updated |
| 404 | Webhook not found |
Permanently removes a webhook endpoint. No further events will be delivered.
Auth RequiredResponse 200
{
"message": "Webhook deleted."
}Status Codes
| 200 | Webhook deleted |
| 404 | Webhook not found |
Bug Reports
Submit bug reports and view known issues directly through the API.
Submits a new bug report. The report is triaged by the DataSync team and you will be notified of status changes via email.
Auth RequiredRequest Body
{
"title": "Backup fails on databases with spaces in name",
"description": "When a database name contains spaces, the agent throws a parsing error.",
"category": "backup",
"severity": "high"
}Categories: backup, restore, agent, billing, ui, api, other
Severities: low, medium, high, critical
Status Codes
| 200 | Bug report submitted |
| 400 | Validation error (missing title, invalid category, etc.) |
Returns a list of acknowledged known issues that the DataSync team is working on. This endpoint is public and does not require authentication.
PublicResponse 200
[
{
"id": 42,
"title": "Differential backups fail on SQL Server 2014",
"category": "backup",
"severity": "high",
"status": "in_progress",
"createdAt": "2026-03-20T09:00:00Z"
}
]Status Codes
| 200 | Known issues returned |
Ready to integrate?
Create a free account and start making API calls in minutes.
Get Started Free View Plans