Formcake API

Introduction


The Formcake API is available to all users who have a Developer plan or higher. Login or sign up to access the API!

API Keys

You need to have an API Key created to access the Formcake API. Once you've created the key, you get a token that you can use in all of your requests. The token should go in the Authorization header of all your requests.

/public/v1/form


Get a list of all forms in your account.

URI: api.formcake.com/public/v1/form

Method: GET

Request Parameters:

Parameter type Default Value Description
page integer 0 Which page of results, index starts at 0
limit integer 50 Number of results per page
sort enum createdAt Column to sort on, valid options are name, createdAt, submissionCount, and submissionCountNew
order enum desc Order to sort by, valid options are asc and desc

Example Request:

curl -H "Authorization: efhci...04fj4" "https://api.formcake.com/public/v1/form?page=0&limit=10"

Example Response:

{
    "count": 6,
    "entities": [
        {
            "id": "77c42f0f-...",
            "name": "Example form name",
            "description": "Example form description",
            "successRedirect": "https://formcake.com",
            "submissionCount": 103,
            "submissionCountNew": 12,
            "monthlySubmissionCount": 33,
            "lastSubmissionMonth": 7,
            "honeypot": "honeypot-field",
            "createdAt": "2020-07-13T00:27:32.483Z",
            "updatedAt": "2020-07-13T00:27:32.483Z",
            "userId": "178f6af7-...",
            "actions": [],
            "domains": []
        },...
    ]
}

/public/v1/form/<id>


Get a specific form from your account.

URI: api.formcake.com/public/v1/form/<id>

Method: GET

Request Parameters: N/A

Example Request:

curl -H "Authorization: efhci...04fj4" "https://api.formcake.com/public/v1/form/77c42f0f-..."

Example Response:

{
    "id": "77c42f0f-...",
    "name": "Example form name",
    "description": "Example form description",
    "successRedirect": "https://formcake.com",
    "submissionCount": 103,
    "submissionCountNew": 12,
    "monthlySubmissionCount": 33,
    "lastSubmissionMonth": 7,
    "honeypot": "honeypot-field",
    "createdAt": "2020-07-13T00:27:32.483Z",
    "updatedAt": "2020-07-13T00:27:32.483Z",
    "userId": "178f6af7-...",
    "actions": [],
    "domains": []
}

/public/v1/form/<id>/submission


Get a list of submissions sent to a specific form

URI: api.formcake.com/public/v1/form/<id>/submission

Method: GET

Request Parameters:

Parameter type Default Value Description
page integer 0 Which page of results, index starts at 0
limit integer 50 Number of results per page
sort enum createdAt Column to sort on, valid options are createdAt and id
order enum desc Order to sort by, valid options are asc and desc
getSpam boolean false Optionally returns submissions that were filtered by the form's honeypot

Example Request:

curl -H "Authorization: efhci...04fj4" "https://api.formcake.com/public/v1/form/77c42f0f-.../submission?page=0&limit=10"

Example Response:

{
    "count": 4,
    "entities": [
        {
            "data": {
                "custom": "data",
                "submitted": "to",
                "your": "form"
            },
            "id": 2593,
            "formId": "77c42f0f-...",
            "typeId": null,
            "domain": "",
            "createdAt": "2020-07-13T05:33:28.923Z",
            "updatedAt": "2020-07-13T05:33:28.923Z",
            "submissionType": null
        },...
    ]
}