This guide will help you make your first API request to Vastal.
Prerequisites
- A Vastal account with API access enabled
- An API key (generate one in Settings > Developer > API Keys)
Step 1: Get Your API Key
- Log in to your Vastal dashboard
- Navigate to Settings > Developer
- Click Create Key in the API Keys section
- Give your key a name and select the appropriate scopes
- Copy and securely store your API key
Important: Your API key is only shown once. Store it securely.
Step 2: Make Your First Request
Test your API key by listing your tables:
curl -X GET "https://api.vastal.com/v1/tables" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"success": true,
"data": [
{
"id": "tbl_abc123",
"name": "Contacts",
"slug": "contacts",
"row_count": 150
}
]
}
Step 3: Create a Record
Add a new row to a table:
curl -X POST "https://api.vastal.com/v1/tables/contacts/rows" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": {
"name": "John Doe",
"email": "john@example.com",
"company": "Acme Inc"
}
}'
Next Steps
- Authentication - Learn about API authentication in detail
- Tables API - Full tables API reference
- Webhooks - Set up real-time notifications