Skip to main content

List Forms

GET /api/forms
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"
    }
  ]
}

Get Form

GET /api/forms/{id}
curl https://spike.ac/api/forms/FORM_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Create Form

POST /api/forms
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

FieldTypeRequiredDescription
namestringYesForm name
notificationEmailstringNoEmail for notifications
redirectUrlstringNoDefault redirect URL
allowedDomainsstring[]NoRestrict to domains

Update Form

PATCH /api/forms/{id}
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
  }'

Delete Form

DELETE /api/forms/{id}
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.