Projects API
Manage projects programmatically. Projects are containers for forms.
List Projects
http
GET /api/v1/projectsReturns all projects for the authenticated client.
Example Request
bash
curl "https://atlasforms.app/api/v1/projects" \
-H "Authorization: Bearer fep_your_api_key"Response
json
{
"data": [
{
"id": "project-uuid",
"name": "My Website",
"slug": "my-website",
"webhook_url": "https://example.com/webhook",
"allowed_origins": ["example.com", "www.example.com"],
"is_active": true,
"created_at": "2024-01-15T10:30:00Z",
"forms_count": 3,
"submissions_count": 1500
}
]
}Get Project
http
GET /api/v1/projects/{id}Returns a single project with its forms.
Example Request
bash
curl "https://atlasforms.app/api/v1/projects/project-uuid" \
-H "Authorization: Bearer fep_your_api_key"Response
json
{
"id": "project-uuid",
"name": "My Website",
"slug": "my-website",
"webhook_url": "https://example.com/webhook",
"webhook_secret": "whsec_...",
"allowed_origins": ["example.com"],
"rate_limit_per_minute": 60,
"notify_emails": ["alerts@example.com"],
"is_active": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z",
"forms": [
{
"id": "form-uuid",
"public_id": "abc123xyz",
"name": "Contact Form",
"slug": "contact",
"is_active": true
}
]
}Create Project
http
POST /api/v1/projectsCreates a new project.
Request Body
json
{
"name": "My New Project",
"webhook_url": "https://example.com/webhook",
"allowed_origins": ["example.com"],
"notify_emails": ["alerts@example.com"]
}Example Request
bash
curl -X POST "https://atlasforms.app/api/v1/projects" \
-H "Authorization: Bearer fep_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "My New Project"}'Response
json
{
"id": "new-project-uuid",
"name": "My New Project",
"slug": "my-new-project",
"is_active": true,
"created_at": "2024-01-25T10:30:00Z"
}List Forms in Project
http
GET /api/v1/projects/{id}/formsReturns all forms in a project.
Example Request
bash
curl "https://atlasforms.app/api/v1/projects/project-uuid/forms" \
-H "Authorization: Bearer fep_your_api_key"Response
json
{
"data": [
{
"id": "form-uuid",
"public_id": "abc123xyz",
"name": "Contact Form",
"slug": "contact",
"endpoint": "https://atlasforms.app/f/abc123xyz",
"webhook_url": null,
"success_redirect": "https://example.com/thank-you",
"is_active": true,
"validation_mode": "sandbox",
"submissions_count": 500,
"created_at": "2024-01-15T10:30:00Z"
}
]
}Create Form
http
POST /api/v1/projects/{id}/formsCreates a new form in a project.
Request Body
json
{
"name": "Newsletter Signup",
"webhook_url": "https://example.com/newsletter-hook",
"success_redirect": "https://example.com/subscribed",
"allowed_origins": ["example.com"]
}Example Request
bash
curl -X POST "https://atlasforms.app/api/v1/projects/project-uuid/forms" \
-H "Authorization: Bearer fep_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "Newsletter Signup"}'Response
json
{
"id": "new-form-uuid",
"public_id": "xyz789abc",
"name": "Newsletter Signup",
"slug": "newsletter-signup",
"endpoint": "https://atlasforms.app/f/xyz789abc",
"is_active": true,
"created_at": "2024-01-25T10:30:00Z"
}Error Responses
401 Unauthorized
json
{ "error": "Invalid API key" }403 Forbidden
json
{ "error": "Project limit reached. Upgrade your plan." }404 Not Found
json
{ "error": "Project not found" }429 Rate Limited
json
{ "error": "Rate limit exceeded", "retry_after": 45 }