curl https://spike.ac/api/forms \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"forms": [
{
"id": "form_abc123",
"name": "Contact Form",
"slug": "abc123xyz",
"isActive": true,
"submissionCount": 150,
"createdAt": "2024-01-01T00:00:00Z"
}
]
}
curl https://spike.ac/api/forms/FORM_ID \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X POST https://spike.ac/api/forms \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Newsletter Signup",
"notificationEmail": "[email protected]"
}'
Request Body
| Field | Type | Required | Description |
|---|
name | string | Yes | Form name |
notificationEmail | string | No | Email for notifications |
redirectUrl | string | No | Default redirect URL |
allowedDomains | string[] | No | Restrict to domains |
curl -X PATCH https://spike.ac/api/forms/FORM_ID \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Name",
"isActive": false
}'
curl -X DELETE https://spike.ac/api/forms/FORM_ID \
-H "Authorization: Bearer YOUR_API_KEY"
Deleting a form permanently removes all submissions. This cannot be undone.