Formcrafts - a form and survey platform for Salesforce, HubSpot, etc
  1. Templates
    1. All templates illustration
      All templates
    2. Application forms illustration
      Application forms
    3. Calculation forms illustration
      Calculation forms
    4. Lead generation forms illustration
      Lead generation forms
    5. Customer service illustration
      Customer service
    6. Evaluation forms illustration
      Evaluation forms
    7. Survey and feedback illustration
      Survey and feedback
    8. Operations forms illustration
      Operations forms
    9. Payment forms illustration
      Payment forms
    10. Booking and registration illustration
      Booking and registration
    11. Salesforce forms illustration
      Salesforce forms
    12. Other forms illustration
      Other forms
  2. Features
    1. 18 Form Fields illustration
      18 Form Fields
    2. 19 Integrations illustration
      19 Integrations
    3. Conditional Logic illustration
      Conditional Logic
    4. Multi-step Forms illustration
      Multi-step Forms
    5. Calculations illustration
      Calculations
    6. Partial Submissions illustration
      Partial Submissions
    7. Save & Resume illustration
      Save & Resume
    8. Payments illustration
      Payments
    9. Hidden Fields illustration
      Hidden Fields
    10. Dynamic Dropdowns illustration
      Dynamic Dropdowns
    11. Engagement analysis illustration
      Engagement analysis
    12. Multilingual forms illustration
      Multilingual forms
  3. Pricing
  4. Help
  5. Login
  6. Signup
    →
  • Help index
  • Features
    • Conditional logic
    • Prefill forms
    • Multi-step forms
    • Calculations
    • Partial submissions
    • Field references
    • Save and resume
    • Hidden fields
    • Dynamic lookup
    • Workflows
    • Dynamic dropdowns
    • Multilingual forms
    • Privacy mode
    • Success message
    • Form redirect
    • GA/GTM
    • Accept payments
    • Linked forms
    • Disable form
  • Styling
    • Custom CSS
    • Custom fonts
    • Color scheme
    • Form background
  • Analytics
    • Test mode
    • Overview
    • Field analytics
    • Form engagement
  • Workflows
    • Send emails
    • Form redirect
    • Success message
    • Webhooks
    • Create PDF
    • ActiveCampaign
    • Asana
    • Mailchimp
    • Front app
    • Freshdesk
    • Google Sheets
    • Pipedrive
    • Linear
    • Klaviyo
  • Sharing
    • Custom form link
    • Embed on a page (inline)
    • Embed on a page (popup)
    • Embed in emails
    • Embed on WordPress
    • Embed on Shopify
    • Embed on Squarespace
  • Salesforce
    • Overview
    • Create records
    • Update records
    • Related records
    • Dynamic picklists
    • Attach files
    • Create PDFs
    • Form prefill
  • HubSpot
    • Overview
    • Create contact form
    • Create lead capture form
    • Create customer survey
    • Prefill HubSpot form
    • Embed on HubSpot page
    • Uninstall
  • Zendesk
    • Create ticket form
    • Create CSAT survey
    • Embed on Help Center
    • Prefill ticket form
  • Admin
    • Users
    • Custom domain
    • Vanity subdomain
    • Subscription
  • Developers
    • Embed Library
    • API keys
    • API v1
    • API v2
  • Others
    • Partner program
    • GDPR compliance
    • Workflow logs
    • White labeling
    • Form speed
    • Zapier
    • Migration
  • Contact
  1. Help
  2. ›
    Developers
  3. ›
    API v2

Formcrafts API v2

On this page
  1. Authentication
  2. Pagination
  3. Get workspaces
  4. Get forms
  5. Get form details
  6. Get form responses
  7. Get files
  8. Get file content

Authentication

Formcrafts uses API keys to authenticate users. You can create API keys under Organization → Settings → API Keys.

You can make 10,000 requests per hour. Rate limits are applied to each organization.

Authentication is done via HTTP basic auth. Your API key is the username, and password field should be left empty. A simply ping would return your account email. Use this link in the browser, and use your API key as username and leave the password blank

You can also open this in a browser ↗.

curl https://api.formcrafts.com/v2 -u MYAPIKEY:
{
  "organization_name": "My Organization"
}

Pagination

All list endpoints support limit, which is the number of items to return. The default is 10 and the maximum is 100.

curl https://api.formcrafts.com/v2/forms?limit=20 -u MYAPIKEY:

Additionally all list endpoints support before and after parameters. These are used to paginate through the list of items, based on the created_at field.

curl https://api.formcrafts.com/v2/forms?limit=5&after=2024-02-25 -u MYAPIKEY:

This will return 5 forms created after the date 2024-02-25.

The date format is YYYY-MM-DD, or ISO 8601 format.

Get workspaces

List all workspaces in the organization.

curl https://api.formcrafts.com/v2/workspaces -u MYAPIKEY:
{
  "has_more": false,
  "data": [
    {
      "id": "efgh5678",
      "name": "Marketing",
      "created_at": "2024-02-05T14:29:38.856Z"
    },
    {
      "id": "e132bf87",
      "name": "Sales",
      "created_at": "2023-02-05T14:29:38.558Z"
    }
  ]
}

Get forms

List all forms in the organization.

curl https://api.formcrafts.com/v2/forms -u MYAPIKEY:
{
  "has_more": true,
  "data": [
    {
      "id": "abcd1234",
      "name": "Contact us",
      "workspace_id": "efgh5678",
      "enabled": true,
      "created_at": "2023-01-28T08:59:16.910Z",
      "updated_at": "2024-02-28T10:42:33.021Z"
    }
  ]
}
  1. created_at is the form creation date.
  2. updated_at is the last published date.

Get form details

Get details of a form.

curl https://api.formcrafts.com/v2/forms/[id] -u MYAPIKEY:
{
  "id": "abcd1234",
  "name": "Contact us",
  "workspace_id": "efgh5678",
  "enabled": true,
  "responses": 24,
  "fields": [
    {
      "id": "field1",
      "type": "one_line_input",
      "page": "page1",
      "label": "Name",
      "description": null,
      "required": false
    }
  ],
  "pages": [
    {
      "id": "page1",
      "label": "Personal info"
    }
  ],
  "created_at": "2023-01-28T08:59:16.910Z",
  "updated_at": "2024-02-28T10:42:33.021Z"
}
  1. responses is the current number of responses (in live or test mode).

Get form responses

List all responses for a form. Note that only live form responses are returned by this endpoint.

curl https://api.formcrafts.com/v2/forms/[id]/responses -u MYAPIKEY:
{
  "has_more": false,
  "data": [
    {
      "id": 1,
      "test": false,
      "visitor": {
        "country": "CA",
        "region": "CA-ON",
        "city": "Toronto",
        "time_spent": 8200,
        "url": "https://example.com/contact-us"
      },
      "workflows": [],
      "response": [
        {
          "field_id": "field1",
          "field_type": "one_line_input",
          "value_type": "string",
          "value": "Jane Doe"
        }
      ],
      "created_at": "2024-02-28T12:06:37.122Z",
      "updated_at": "2024-02-28T12:06:37.122Z"
    }
  ]
}

field_type is one of one_line_input, credit_card, phone, file_upload, table_entry, slider, nps, rating, comment, hidden, email, date, calendly, time, rich_text, multiple_choice, dropdown, address

value_type can be string, number, options, files, table, or address

When value_type is options, value is an array of objects:

{
  "field_id": "field1",
  "field_type": "multiple_choice",
  "value_type": "options",
  "value": [
    {
      "label": "Option 1",
      "value": "Option 1"
    },
    {
      "label": "Option 2",
      "value": "Option 2"
    }
  ]
}

When value_type is files, value is an array of file objects:

{
  "field_id": "field1",
  "field_type": "file_upload",
  "value_type": "files",
  "value": [
    {
      "id": "8ed2f42a-2e94-4288-976a-5891d439cde5",
      "name": "picture.png",
      "type": "image/png",
      "size": 32500
    },
    {
      "id": "4ce2a5b0-867c-4835-b19b-d16e06049def",
      "name": "photo-id.jpg",
      "type": "image/jpeg",
      "size": 28100
    }    
  ]
}

When value_type is table, value is an object with headers and rows:

{
  "field_id": "field1",
  "field_type": "table_entry",
  "value_type": "table",
  "value": {
    "headers": [
      "Name",
      "Age",
      "Department"
    ],
    "rows": [
      [
        "Jane",
        "32",
        "Marketing"
      ],
      [
        "John",
        "28",
        "Sales"
      ]
    ]
  }
}

When value_type is address, value is an object with street, city, state, zip, country:

{
  "field_id": "field1",
  "field_type": "address",
  "value_type": "address",
  "value": {
    "full_address": "123 Main St, Toronto, ON M5V 1A1, Canada",
    "line1": "123 Main St",
    "line2": "Unit 101",
    "city": "Toronto",
    "state": "ON",
    "postal_code": "M5V 1A1",
    "country": "Canada"
  }
}

Get files

List all files uploaded in the organization.

curl https://api.formcrafts.com/v2/files -u MYAPIKEY:
{
  "has_more": true,
  "data": [
    {
      "id": "8ed2f42a-2e94-4288-976a-5891d439cde5",
      "name": "picture.png",
      "type": "image/png",
      "size": 32500,
      "created_at": "2024-02-28T12:54:07.961Z",
      "updated_at": "2024-02-28T12:54:07.961Z"
    }
  ]
}

Get file content

Get the content of a file.

curl https://api.formcrafts.com/v2/files/[id]/content -u MYAPIKEY:

This will return the file content.

Minimal, fast, and powerful. Try now.
Formcrafts - a form and survey platform for Salesforce, HubSpot, etc

Subtle Web Inc,
225 Railway St E,
T4C 2C3, Cochrane AB

Salesforce AppExchange partner logo HubSpot app partner logo
Templates
Application formsLead generation formsSurvey & feedback formsEvaluation formsSupport request formsBooking & registrationContact forms
Comparisons
vs AllFormAssemblyTypeformJotformWufooSurveyMonkey
Features
Conditional logicSalesforce formsHubSpot formsZendesk ticket formsEmail formsIntegrationsForm fields
Resources
Help centerBlogDeveloper APIGDPRStatusReport abuseContact us
Company
About usNonprofitCase studiesSecurityTerms and privacy