Skip to main content
POST
/
form_submissions
Typescript (SDK)
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({
  apiKey: process.env["CREVIO_API_KEY"] ?? "",
});

async function run() {
  const result = await crevio.formSubmissions.create({
    formId: "<id>",
    email: "Fay_Krajcik@hotmail.com",
    answers: {
      "key": "<value>",
      "key1": "<value>",
      "key2": "<value>",
    },
  });

  console.log(result);
}

run();
{
  "id": "<string>",
  "object": "<string>",
  "answers": [
    {
      "field_type": "<string>",
      "label": "<string>",
      "required": true,
      "value": "<string>",
      "options": [
        "<string>"
      ]
    }
  ],
  "respondent_type": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "respondent_id": "<string>",
  "form_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.crevio.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Body

application/json
form_id
string
required

Form prefix_id being submitted

email
string
required

Respondent email address. Used to upsert a Customer and, as a convenience, auto-fills the form's email field if no answer is provided for it.

answers
object
required

Map of form_field id → answer value. Optional for simple email-only forms — pass {} and rely on the email auto-fill.

name
string | null

Respondent name (defaults to email local-part if omitted). Auto-fills the form's first text field when present and not otherwise supplied via answers.

Response

Form submission created

id
string
required
object
string
required
answers
object[]
required
respondent_type
string
required
created_at
string<date-time>
required
respondent_id
string
required
form_id
string
required