Porsline (6.10.0)

Download OpenAPI specification:Download

Porsline API Documentation

Hidden Field Encryption

Hash hidden fields

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Request Body schema: application/json

some description

required
Array of objects <= 5000 items

Each object represents map of variable names to variable values related to a respondent to be encrypted. Keys are variable names and values are variable values. For example, if I have two variables named name and land and the corresponding values are Alice and Wonder land and I want the respondent to be able to response only one, the request body is as the Request Sample

Responses

Request samples

Content type
application/json
{
  • "values": [
    ]
}

Response samples

Content type
application/json
{
  • "urls": [
    ]
}

Variables

Get list of survey variables

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Responses

Request samples

import requests
import json

url = "https://survey.porsline.com/api/surveys/561934/variables/"

payload = ""
headers = {
  'Authorization': 'API-Key ****************************',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Response samples

Content type
application/json
[
  • {
    }
]

Create new variables

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Request Body schema: application/json
Array
id
integer <int32>

Variable's ID

name
required
string

Variable's name

variable_source
required
integer

0 if its source is query string and 0 for other sources

type
integer

1 if its type is string and 2 if its type is integer

has_response
boolean

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
"string"

Folders

Get list of user's folders

Authorizations:
ApiKey

Responses

Request samples

import requests
import json

url = "https://survey.porsline.com/api/folders/"

payload = ""
headers = {
  'Authorization': 'API-Key ****************************',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Response samples

Content type
application/json
[
  • {
    }
]

Create a new folder

Authorizations:
ApiKey
Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters

The name of the new folder

order
integer

The folder's order. if not sent, the order will be set to highest

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "order": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "order": 0,
  • "name": "string",
  • "shared_by": {},
  • "shared_with": [
    ],
  • "surveys": [
    ]
}

Get an existing folder

Authorizations:
ApiKey
path Parameters
folder_id
required
string

Selected folder id

Responses

Request samples

import requests
import json

url = "https://survey.porsline.com/api/folders/8/"

payload = ""
headers = {
  'Authorization': 'API-Key ****************************',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Response samples

Content type
application/json
{
  • "id": 0,
  • "order": 0,
  • "name": "string",
  • "shared_by": {},
  • "shared_with": [
    ],
  • "surveys": [
    ]
}

Update an existing folder

Authorizations:
ApiKey
path Parameters
folder_id
required
string

Selected folder id

Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters

The name of the folder

order
integer

The folder's order. if not sent, the order will be set to highest

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "order": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "order": 0,
  • "name": "string"
}

Partially update the folder

Authorizations:
ApiKey
path Parameters
folder_id
required
string

Selected folder id

Request Body schema: application/json
required
name
string [ 1 .. 100 ] characters

The name of the folder

order
integer

The folder's order. if not sent, the order will be set to highest

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "order": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "order": 0,
  • "name": "string"
}

Delete an existing folder

Authorizations:
ApiKey
path Parameters
folder_id
required
string

Selected folder id

Responses

Request samples

import requests
import json

url = "https://survey.porsline.com/api/folders/8/"

payload = ""
headers = {
  'Authorization': 'API-Key ****************************',
  'Content-Type': 'application/json'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

Settings

Get survey's settings

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Responses

Request samples

import requests
import json

url = "https://survey.porsline.com/api/surveys/561934/settings/"

payload = ""
headers = {
  'Authorization': 'API-Key ****************************',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Response samples

Content type
application/json
{
  • "survey": {
    },
  • "authentication_needed": true,
  • "porsline_auth": true,
  • "porsline_auth_no_spam": true,
  • "porsline_auth_domains": [
    ],
  • "code_auth": true,
  • "code_auth_is_unique": true,
  • "code_authentication_file_name": "string",
  • "auth_description": "string",
  • "captcha_needed": true,
  • "hidden_responder_details": true,
  • "privacy_preserving_message_enabled": true,
  • "no_spam": true,
  • "tag_spam": true,
  • "location_is_active": true,
  • "location_is_required": true,
  • "location_description": "string",
  • "hide_next_button": true,
  • "hide_previous_button": true,
  • "hide_progressbar": true,
  • "expiration_date": "2019-08-24",
  • "responding_ duration": "01:20:00",
  • "edit_response_enabled": true,
  • "branding_removal": true
}

Update survey's settings

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Request Body schema: application/json
required
object

Survey's settings

authentication_needed
boolean

Enterprise feature
Whether there should be a Porsline or code authentication or not

porsline_auth
boolean

Enterprise feature
Whether there should be a Porsline authentication or not

porsline_auth_no_spam
boolean

Enterprise feature
Whether there should be a single response per Porsline user or not

porsline_auth_domains
Array of strings[ items [ 1 .. 60 ] characters ]

Enterprise feature
List of allowed emails in regex

code_auth
boolean

Enterprise feature
Whether there should be a Code authentication or not

code_auth_is_unique
boolean

Enterprise feature
Whether there should be a single response per entry code or not

code_authentication_file_name
string [ 1 .. 500 ] characters

Enterprise feature
The uploaded file name

auth_description
string [ 1 .. 1000 ] characters

Enterprise feature
Authentication description

captcha_needed
boolean

Enterprise feature
Captcha will be needed to view survey

hidden_responder_details
boolean

Enterprise feature
Hide responder details from survey creator

privacy_preserving_message_enabled
boolean

Enterprise feature
Show message from Porsline to confirm responder details will be hidden

no_spam
boolean

Pro feature
Whether there should be a single response per browser or not. Can't be combined with tag_spam

tag_spam
boolean

Pro feature
Whether the responders using the same browser should be tagged as spam or not. Can't be combined with no_spam

location_is_active
boolean

Enterprise feature
Whether to get responder's location or not

location_is_required
boolean

Enterprise feature
Whether the responder's location is required or not

location_description
string [ 1 .. 1000 ] characters

Enterprise feature
Description on why would you want to gather responder's location

hide_next_button
boolean

Whether to hide next button for responders

hide_previous_button
boolean

Whether to hide previous button for responders

hide_progressbar
boolean

Whether to hide progress bar for responders

expiration_date
string <date>

The date to close the survey. must be after today

responding_ duration
string <duration>

The time each responder has to respond to the survey

edit_response_enabled
boolean

Enterprise feature
Whether the responders are able to edit their response or not
Has to be activated for user

branding_removal
boolean

Enterprise feature
Whether the porsline branding may be used or not
Has to be activated for user

Responses

Request samples

Content type
application/json
{
  • "survey": {
    },
  • "authentication_needed": true,
  • "porsline_auth": true,
  • "porsline_auth_no_spam": true,
  • "porsline_auth_domains": [
    ],
  • "code_auth": true,
  • "code_auth_is_unique": true,
  • "code_authentication_file_name": "string",
  • "auth_description": "string",
  • "captcha_needed": true,
  • "hidden_responder_details": true,
  • "privacy_preserving_message_enabled": true,
  • "no_spam": true,
  • "tag_spam": true,
  • "location_is_active": true,
  • "location_is_required": true,
  • "location_description": "string",
  • "hide_next_button": true,
  • "hide_previous_button": true,
  • "hide_progressbar": true,
  • "expiration_date": "2019-08-24",
  • "responding_ duration": "01:20:00",
  • "edit_response_enabled": true,
  • "branding_removal": true
}

Authentication codes

Get survey's authentication codes

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

query Parameters
page
string
Default: 1

Page number

page_size
string
Default: 500

Page size

Responses

Request samples

import requests
import json

url = "https://survey.porsline.com/api/surveys/561934/settings/authentication-codes/?page=1&page_size=1000"

payload = ""
headers = {
  'Authorization': 'API-Key ****************************',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Response samples

Content type
application/json
{
  • "count": 3,
  • "next": null,
  • "previous": null,
  • "results": [
    ]
}

Create new authentication codes

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Request Body schema: application/json
Array (<= 5000 items)
string [ 1 .. 30 ] characters

Responses

Request samples

Content type
application/json
[
  • "code_1",
  • "code_2",
  • "code_3"
]

Response samples

Content type
application/json
[
  • "code_1",
  • "code_2",
  • "code_3"
]

Delete survey's authentication codes

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Request Body schema: application/json

If there is no body, all the codes will be deleted

Array (<= 5000 items)
string <= 30 characters

Responses

Request samples

Content type
application/json
[ ]

Survey

Retrieve survey

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Responses

Response samples

Content type
application/json
{
  • "subdomain": {
    },
  • "shared_by": {},
  • "name": "string",
  • "folder_id": 0,
  • "language": "string",
  • "active": true,
  • "closed": true,
  • "deleted": true,
  • "preview_code": "string",
  • "report_code": "string",
  • "submitted_responses": 0,
  • "theme": {
    },
  • "settings": {
    },
  • "questions": [
    ],
  • "variables": [
    ],
  • "welcome": [
    ],
  • "appreciations": [
    ]
}

Delete survey

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Responses

Questions

Create Question

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Request Body schema: application/json
One of
title
required
string <= 1500 characters
html_title
string <= 3000 characters
type
required
integer <int32> [ 1 .. 13 ]
image_video_active
boolean
Default: false
image_or_video
integer
Default: 1
Enum: 1 2
image_path
string <url>
image_name
string <= 500 characters
video_url
string <url> <= 500 characters
show_charts
boolean
Default: true
description_text_active
boolean
Default: false
description_text
string <= 2500 characters
html_description_text
string <= 5000 characters
related_group
integer <int32>

related group question Id

question_number_is_hidden
boolean
Default: false
prior_question
integer <int32>

Prior question Id to place question after that

responding_duration
string

A duration string like, "00:03:20"

title_active
boolean
Default: true
description_active
boolean
Default: false
description
string <= 2500 characters
enter_text
string <= 80 characters

Responses

Request samples

Content type
application/json
Example
{
  • "title": "string",
  • "html_title": "string",
  • "type": 1,
  • "image_video_active": false,
  • "image_or_video": 1,
  • "image_path": "string",
  • "image_name": "string",
  • "video_url": "string",
  • "show_charts": true,
  • "description_text_active": false,
  • "description_text": "string",
  • "html_description_text": "string",
  • "related_group": 0,
  • "question_number_is_hidden": false,
  • "prior_question": 0,
  • "responding_duration": "string",
  • "title_active": true,
  • "description_active": false,
  • "description": "string",
  • "enter_text": "string"
}

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "title": "string",
  • "html_title": "string",
  • "type": 1,
  • "image_video_active": false,
  • "image_or_video": 1,
  • "image_path": "string",
  • "image_name": "string",
  • "video_url": "string",
  • "show_charts": true,
  • "description_text_active": false,
  • "description_text": "string",
  • "html_description_text": "string",
  • "related_group": 0,
  • "question_number_is_hidden": false,
  • "responding_duration": "string",
  • "allow_multiple_select": false,
  • "max_selectable_choices": 2,
  • "min_selectable_choices": 2,
  • "vertical_choices": false,
  • "answer_required": false,
  • "randomize": false,
  • "correct_choice": {
    },
  • "related_matrix_question": 0,
  • "choices": [
    ]
}

Update Question

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

id
required
integer
query Parameters
duplicate
string
Example: duplicate=true
Request Body schema: application/json
One of
title
required
string <= 1500 characters
html_title
string <= 3000 characters
type
required
integer <int32> [ 1 .. 13 ]
image_video_active
boolean
Default: false
image_or_video
integer
Default: 1
Enum: 1 2
image_path
string <url>
image_name
string <= 500 characters
video_url
string <url> <= 500 characters
show_charts
boolean
Default: true
description_text_active
boolean
Default: false
description_text
string <= 2500 characters
html_description_text
string <= 5000 characters
related_group
integer <int32>

related group question Id

question_number_is_hidden
boolean
Default: false
prior_question
integer <int32>

Prior question Id to place question after that

responding_duration
string

A duration string like, "00:03:20"

allow_multiple_select
boolean
Default: false
max_selectable_choices
integer [ 1 .. 30 ]
Default: 2
min_selectable_choices
integer [ 0 .. 30 ]
Default: 2
vertical_choices
boolean
Default: false
answer_required
boolean
Default: false
randomize
boolean
Default: false
correct_choice_id
integer <int32>
object (Choice)
Array of objects (Choice)

Responses

Request samples

Content type
application/json
Example
{
  • "title": "string",
  • "html_title": "string",
  • "type": 1,
  • "image_video_active": false,
  • "image_or_video": 1,
  • "image_path": "string",
  • "image_name": "string",
  • "video_url": "string",
  • "show_charts": true,
  • "description_text_active": false,
  • "description_text": "string",
  • "html_description_text": "string",
  • "related_group": 0,
  • "question_number_is_hidden": false,
  • "prior_question": 0,
  • "responding_duration": "string",
  • "allow_multiple_select": false,
  • "max_selectable_choices": 2,
  • "min_selectable_choices": 2,
  • "vertical_choices": false,
  • "answer_required": false,
  • "randomize": false,
  • "correct_choice_id": 0,
  • "correct_choice": {
    },
  • "choices": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "title": "string",
  • "html_title": "string",
  • "type": 1,
  • "image_video_active": false,
  • "image_or_video": 1,
  • "image_path": "string",
  • "image_name": "string",
  • "video_url": "string",
  • "show_charts": true,
  • "description_text_active": false,
  • "description_text": "string",
  • "html_description_text": "string",
  • "related_group": 0,
  • "question_number_is_hidden": false,
  • "responding_duration": "string",
  • "allow_multiple_select": false,
  • "max_selectable_choices": 2,
  • "min_selectable_choices": 2,
  • "vertical_choices": false,
  • "answer_required": false,
  • "randomize": false,
  • "correct_choice": {
    },
  • "related_matrix_question": 0,
  • "choices": [
    ]
}

Get Question

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

id
required
integer

Responses

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "title": "string",
  • "html_title": "string",
  • "type": 1,
  • "image_video_active": false,
  • "image_or_video": 1,
  • "image_path": "string",
  • "image_name": "string",
  • "video_url": "string",
  • "show_charts": true,
  • "description_text_active": false,
  • "description_text": "string",
  • "html_description_text": "string",
  • "related_group": 0,
  • "question_number_is_hidden": false,
  • "responding_duration": "string",
  • "allow_multiple_select": false,
  • "max_selectable_choices": 2,
  • "min_selectable_choices": 2,
  • "vertical_choices": false,
  • "answer_required": false,
  • "randomize": false,
  • "correct_choice": {
    },
  • "related_matrix_question": 0,
  • "choices": [
    ]
}

Delete Question

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

id
required
integer

Responses

Results

Fetch survey responses results table

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

query Parameters
since
string <date-time>

Limit submitted responders since the specified date and time, inclusive. Must be passed in ISO 8601 format with timezone.(example: 2023-03-20T14:00:59%2B01:00)

until
string <date-time>

Limit submitted responders until the specified date and time, inclusive. Must be passed in ISO 8601 format with timezone.(example: 2023-03-20T14:00:59%2B01:00)

sort
string

Set responders sort criteria in this format:
{col_type},{object_id},{asc|desc}

  • col_type:
    • 1: question
    • 2: variable
    • 3: static variable
    • 4: choice
    • 5: picture choice
    • 6: ranking choice
    • 7: computational variable
  • object_id: id of the column type object
  • asc | desc: order responders ascending or descending
filter
integer <Int32>

Id of the filter to apply on results

inline_filter
string

Apply inline filter on results in this format:
{first_operand_type},{first_operand_id},{operator},{second_operand_type},{second_operand_value}

  • first_operand:
    • question id e.g 1,98776
    • static variables
      • score: 3
      • responder start time: 4
      • responder submit time: 5
      • responder last edit time: 6
    • variable id e.g 2,3123
    • computational variable id e.g 7,4567
  • operator:
    • 1: is equal to
    • 2: is not equal to
    • 3: begins with
    • 4: ends with
    • 5: contains
    • 6: does not contain
    • 7: is before
    • 8: is after
    • 9: is equal or before
    • 10: is equal or after
    • 11: smaller than
    • 12: greater than
    • 13: is equal or greater
    • 14: is equal or smaller
  • second_operand:
    • text: 1,string
    • integer: 2,1234
    • choice id e.g 3,1234
    • picture choice id e.g 4,1234
    • drop down choice id e.g 5,1234
page
integer >= 0
Default: 1
page_size
integer [ 0 .. 1000 ]
Default: 30

Maximum number of responders in a page. If you have fewer than 1000 responses, you can retrieve all of the responders in a single request by adding the page_size parameter.

Responses

Response samples

Content type
application/json
{
  • "responders_count": 0,
  • "invisible_responders_count": 0,
  • "header": [
    ],
  • "body": [
    ]
}

Fetch survey responses export

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

query Parameters
export_format
string

Select export format. 1: xlsx, 2: csv.

since
string <date-time>

Limit submitted responders since the specified date and time, inclusive. Must be passed in ISO 8601 format with timezone.(example: 2023-03-20T14:00:59%2B01:00)

until
string <date-time>

Limit submitted responders until the specified date and time, inclusive. Must be passed in ISO 8601 format with timezone.(example: 2023-03-20T14:00:59%2B01:00)

sort
string

Set responders sort criteria in this format:
{col_type},{object_id},{asc|desc}

  • col_type:
    • 1: question
    • 2: variable
    • 3: static variable
    • 4: choice
    • 5: picture choice
    • 6: ranking choice
    • 7: computational variable
  • object_id: id of the column type object
  • asc | desc: order responders ascending or descending
filter
integer <Int32>

Id of the filter to apply on results

inline_filter
string

Apply inline filter on results in this format:
{first_operand_type},{first_operand_id},{operator},{second_operand_type},{second_operand_value}

  • first_operand:
    • question id e.g 1,98776
    • static variables
      • score: 3
      • responder start time: 4
      • responder submit time: 5
      • responder last edit time: 6
    • variable id e.g 2,3123
    • computational variable id e.g 7,4567
  • operator:
    • 1: is equal to
    • 2: is not equal to
    • 3: begins with
    • 4: ends with
    • 5: contains
    • 6: does not contain
    • 7: is before
    • 8: is after
    • 9: is equal or before
    • 10: is equal or after
    • 11: smaller than
    • 12: greater than
    • 13: is equal or greater
    • 14: is equal or smaller
  • second_operand:
    • text: 1,string
    • integer: 2,1234
    • choice id e.g 3,1234
    • picture choice id e.g 4,1234
    • drop down choice id e.g 5,1234

Responses

Response samples

Content type
application/json
{
  • "export": "string"
}

Notifications

Create notification

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Request Body schema: application/json
Any of
enabled
boolean
Default: true

Designates of whether notification is enabled or not

sending_method
integer
Default: 1
Enum: 1 2 3

Notification's sending method. 1: email, 2: sms, 3: webhook

recipient_type
required
integer
Enum: 1 2 3 4 5

Notification's recipient type. 1: self notification, 2: question recipient, 3: variable recipient, 4: respondent user, 5: webhook endpoint

body
required
string

Notification body

filter
integer <int32>

Notification filter ID to be applied on sending

subject
required
string

Email subject

recipients
Array of strings

List of recipients email addresses

question_recipient
integer <int32>

Question ID that recipient value must be read from it's answer. Must be text question with email answer type.

variable_recipient
integer <int32>

Variable ID that recipient value must be read from it's value. Must be with text type.

Responses

Request samples

Content type
application/json
Example
{
  • "enabled": true,
  • "sending_method": 1,
  • "recipient_type": 1,
  • "body": "string",
  • "filter": 0,
  • "subject": "string",
  • "recipients": [
    ],
  • "question_recipient": 0,
  • "variable_recipient": 0
}

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "survey": 0,
  • "enabled": true,
  • "sending_method": 1,
  • "recipient_type": 1,
  • "body": "string",
  • "filter": 0,
  • "subject": "string",
  • "recipients": [
    ],
  • "question_recipient": 0,
  • "variable_recipient": 0
}

Get survey notifications list

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update notification

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

pk
required
integer

Notification ID

Request Body schema: application/json
Any of
enabled
boolean
Default: true

Designates of whether notification is enabled or not

sending_method
integer
Default: 1
Enum: 1 2 3

Notification's sending method. 1: email, 2: sms, 3: webhook

recipient_type
required
integer
Enum: 1 2 3 4 5

Notification's recipient type. 1: self notification, 2: question recipient, 3: variable recipient, 4: respondent user, 5: webhook endpoint

body
required
string

Notification body

filter
integer <int32>

Notification filter ID to be applied on sending

subject
required
string

Email subject

recipients
Array of strings

List of recipients email addresses

question_recipient
integer <int32>

Question ID that recipient value must be read from it's answer. Must be text question with email answer type.

variable_recipient
integer <int32>

Variable ID that recipient value must be read from it's value. Must be with text type.

Responses

Request samples

Content type
application/json
Example
{
  • "enabled": true,
  • "sending_method": 1,
  • "recipient_type": 1,
  • "body": "string",
  • "filter": 0,
  • "subject": "string",
  • "recipients": [
    ],
  • "question_recipient": 0,
  • "variable_recipient": 0
}

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "survey": 0,
  • "enabled": true,
  • "sending_method": 1,
  • "recipient_type": 1,
  • "body": "string",
  • "filter": 0,
  • "subject": "string",
  • "recipients": [
    ],
  • "question_recipient": 0,
  • "variable_recipient": 0
}

Get notification

Authorizations:
ApiKey
path Parameters
survey_id
required
integer

The id of the target survey. Tip: survey id is the number you can see in the build phase of that survey after " /survey " in the URL.

pk
required
integer

Notification ID

Responses

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "survey": 0,
  • "enabled": true,
  • "sending_method": 1,
  • "recipient_type": 1,
  • "body": "string",
  • "filter": 0,
  • "subject": "string",
  • "recipients": [
    ],
  • "question_recipient": 0,
  • "variable_recipient": 0
}