REST API Reference
Complete REST API documentation for the Vastal platform
The Vastal REST API provides programmatic access to all platform functionality. All API endpoints use HTTPS and require authentication.
Base URL
https://api.vastal.com/v1
Authentication
All API requests must include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Response Format
All responses are in JSON format:
{
"success": true,
"data": {...},
"pagination": {
"page": 1,
"limit": 50,
"total": 150
}
}
Error Handling
Error responses include status codes and detailed messages:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid field value",
"details": {
"field": "email",
"reason": "Invalid email format"
}
}
}
Common Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found |
429 | Rate Limited |
500 | Internal Server Error |
Pagination
List endpoints support pagination with the following query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
limit | integer | 50 | Items per page (max: 100) |
Available Endpoints
Tables
GET /tables- List all tablesGET /tables/{table_id}- Get table detailsPOST /tables- Create a new tablePATCH /tables/{table_id}- Update tableDELETE /tables/{table_id}- Delete table
Rows
GET /tables/{table_id}/rows- List rowsGET /tables/{table_id}/rows/{row_id}- Get single rowPOST /tables/{table_id}/rows- Create rowPATCH /tables/{table_id}/rows/{row_id}- Update rowDELETE /tables/{table_id}/rows/{row_id}- Delete row
Webhooks
GET /webhooks- List webhooksPOST /webhooks- Create webhookPATCH /webhooks/{webhook_id}- Update webhookDELETE /webhooks/{webhook_id}- Delete webhook
Domains
GET /domains- List domainsPOST /domains- Add domainGET /domains/{domain_id}/verify- Verify domain DNSDELETE /domains/{domain_id}- Remove domain
SDK Examples
JavaScript/TypeScript
import { VastalClient } from '@vastal/api';
const client = new VastalClient({
apiKey: 'vst_xxxxxxxxxxxxxxxxxxxxxxxx'
});
// List tables
const tables = await client.tables.list();
// Create a row
const row = await client.tables.rows.create('contacts', {
data: {
name: 'John Doe',
email: 'john@example.com'
}
});
Python
from vastal import VastalClient
client = VastalClient(api_key='vst_xxxxxxxxxxxxxxxxxxxxxxxx')
# List tables
tables = client.tables.list()
# Create a row
row = client.tables.rows.create('contacts', {
'name': 'John Doe',
'email': 'john@example.com'
})
Next Steps
- Tables API - Detailed tables documentation
- Webhooks - Real-time event notifications
- Domains - Custom domain management