Markit AI LogoMarkit | Docs
Markit API

Forms

Retrieve your forms and submit responses through the Markit API

The forms resource allows you to handle Retrieve related functionality to view the forms on your account. To submit a response to a form, see Submit Form on the Data Capture resource.

The following actions can be performed on this resource:

  • Retrieve All Forms
  • Retrieve a Single Form

Retrieve All Forms

Retrieves all forms on your account.

    GET https://api.markitai.com/v1/forms

You can include additional parameters in the request as described in the Query Parameters section. For instance, the request below will return forms with a createdAt of "asc" (ascending).

    GET https://api.markitai.com/v1/forms?createdAt=asc

Available query parameters:

  • limit: 20 (default)
  • offset: 0 (default)
  • createdAt: ‘desc’ | ‘asc’ (default = ‘desc’)

A form is returned with the same fields as an event. The form's data questions are available on the formQuestions array inside the form's customTickets object. Forms have an eventType of "Generic Link With Data", an empty start and end, and an externalLink set to the redirect link (if configured).

Example Response:

{
  "data": [
    {
      "id": "123456",
      "body": { "content": [], "type": "doc" },
      "createdBy": "abc123",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "photoURL": "https://firebasestorage.googleapis.com/...",
      "isDraft": false,
      "theme": 0,
      "title": "Form Title",
      "start": "",
      "end": "",
      "eventType": "Generic Link With Data",
      "externalEventId": "",
      "externalLink": "https://yoursite.com/redirect",
      "link": "",
      "visibility": 1,
      "visibilityCommunity": "",
      "stripePaymentCollector": "",
      "customTickets": [
        {
          "price": 0,
          "id": "123123",
          "minQuantity": 1,
          "maxQuantity": 1,
          "quantityAvailable": 0,
          "hideTicket": false,
          "formQuestions": ["abc", "def", "ghi"],
          "type": "free",
          "label": "Submit",
          "externalTicketId": ""
        }
      ],
      "promoCodes": [],
      "canRefund": false,
      "canTransfer": false,
      "crowdfundingGoal": 0,
      "crowdfundingHide": false,
      "contributions": [],
      "hideResponses": true,
      "formattedAddress": "",
      "privateLocation": false,
      "locationDetails": "",
      "isFeatured": false,
      "locationBasedRSVP": false,
      "isVirtual": false,
      "isManualSoldOut": false
    },
    ...
  ],
  "pagingData": {
    "prevPage": null,
    "currentPage": null,
    "nextPage": null,
    "currentPageString": null,
    "hasMore": false
  }
}

Retrieve a Single Form

Retrieves a single form with the form ID equal to {id}. Returns a 404 if the ID does not exist or is not a form.

    GET https://api.markitai.com/v1/forms/{id}

Example Response:

{
  "form": {
    "id": "123456",
    "body": { "content": [], "type": "doc" },
    "createdBy": "abc123",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "photoURL": "https://firebasestorage.googleapis.com/...",
    "isDraft": false,
    "theme": 0,
    "title": "Form Title",
    "start": "",
    "end": "",
    "eventType": "Generic Link With Data",
    "externalEventId": "",
    "externalLink": "https://yoursite.com/redirect",
    "link": "",
    "visibility": 1,
    "visibilityCommunity": "",
    "stripePaymentCollector": "",
    "customTickets": [
      {
        "price": 0,
        "id": "123123",
        "minQuantity": 1,
        "maxQuantity": 1,
        "quantityAvailable": 0,
        "hideTicket": false,
        "formQuestions": ["abc", "def", "ghi"],
        "type": "free",
        "label": "Submit",
        "externalTicketId": ""
      }
    ],
    "promoCodes": [],
    "canRefund": false,
    "canTransfer": false,
    "crowdfundingGoal": 0,
    "crowdfundingHide": false,
    "contributions": [],
    "hideResponses": true,
    "formattedAddress": "",
    "privateLocation": false,
    "locationDetails": "",
    "isFeatured": false,
    "locationBasedRSVP": false,
    "isVirtual": false,
    "isManualSoldOut": false
  }
}

On this page