POST
/
responses
curl --request POST \
  --url https://app.formbricks.com/api/responses \
  --header 'Content-Type: application/json' \
  --data '{
  "createdAt": "2021-01-01T00:00:00.000Z",
  "updatedAt": "2021-01-01T00:00:00.000Z",
  "surveyId": "<string>",
  "displayId": "<string>",
  "singleUseId": "<string>",
  "finished": true,
  "endingId": "<string>",
  "language": "en",
  "data": {
    "question1": "answer1",
    "question2": 2,
    "question3": [
      "answer3",
      "answer4"
    ],
    "question4": {
      "subquestion1": "answer5"
    }
  },
  "variables": {
    "variable1": "answer1",
    "variable2": 2
  },
  "ttc": {
    "question1": 10,
    "question2": 20
  },
  "meta": {
    "source": "https://example.com",
    "url": "https://example.com",
    "userAgent": {
      "browser": "Chrome",
      "os": "Windows",
      "device": "Desktop"
    },
    "country": "US",
    "action": "click"
  }
}'
{
  "id": "<string>",
  "createdAt": "2021-01-01T00:00:00.000Z",
  "updatedAt": "2021-01-01T00:00:00.000Z",
  "finished": true,
  "surveyId": "<string>",
  "contactId": "<string>",
  "endingId": "<string>",
  "data": {
    "question1": "answer1",
    "question2": 2,
    "question3": [
      "answer3",
      "answer4"
    ],
    "question4": {
      "subquestion1": "answer5"
    }
  },
  "variables": {
    "variable1": "answer1",
    "variable2": 2
  },
  "ttc": {
    "question1": 10,
    "question2": 20
  },
  "meta": {
    "source": "https://example.com",
    "url": "https://example.com",
    "userAgent": {
      "browser": "Chrome",
      "os": "Windows",
      "device": "Desktop"
    },
    "country": "US",
    "action": "click"
  },
  "contactAttributes": {
    "attribute1": "value1",
    "attribute2": "value2"
  },
  "singleUseId": "<string>",
  "language": "en",
  "displayId": "<string>"
}

Body

application/json
The response to create

A response to create

surveyId
string
required

The ID of the survey

finished
boolean
required

Whether the response is finished

data
object
required

The data of the response

createdAt
string

The date and time the response was created

updatedAt
string

The date and time the response was last updated

displayId
string | null

The display ID of the response

singleUseId
string | null

The single use ID of the response

endingId
string | null

The ID of the ending

language
string | null

The language of the response

variables
object

The variables of the response

ttc
object

The TTC of the response

meta
object

The meta data of the response

Response

201 - application/json
Response created successfully.
id
string
required

The ID of the response

createdAt
string
required

The date and time the response was created

updatedAt
string
required

The date and time the response was last updated

finished
boolean
required

Whether the response is finished

surveyId
string
required

The ID of the survey

contactId
string | null
required

The ID of the contact

endingId
string | null
required

The ID of the ending

data
object
required

The data of the response

variables
object
required

The variables of the response

ttc
object
required

The TTC of the response

meta
object
required

The meta data of the response

contactAttributes
object | null
required

The attributes of the contact

singleUseId
string | null
required

The single use ID of the response

language
string | null
required

The language of the response

displayId
string | null
required

The display ID of the response