POST api/surveys

Creates a new empty survey with the given information

Request Information

URI Parameters

None.

Body Parameters

Survey data of new Survey

SurveyNewDTO
NameDescriptionTypeAdditional information
Header

Survey title

string

String length: inclusive between 0 and 150

Keyword

Survey keyword

string

Matching regular expression pattern: ^\S+$

String length: inclusive between 0 and 15

KeywordResponse

If you have a virtual phone number and recieve an SMS beginning with the value of the keyword property this string will be sent as a response.

string

None.

WelcomeText

Survey introduction text

string

None.

ThankYouText

Survey completed text

string

None.

AllowAnonymous

Whether to enable recipients to remain anonymous

boolean

Required

TextColor

Color of survey text, hexadecimal (ex. #333333)

string

Matching regular expression pattern: ^#([A-Fa-f0-9]{6})$

BackgroundColor

Color of survey background, hexadecimal (ex. #eeeeee)

string

Matching regular expression pattern: ^#([A-Fa-f0-9]{6})$

ButtonColor

Color of survey buttons, hexadecimal (ex. #a1c775)

string

Matching regular expression pattern: ^#([A-Fa-f0-9]{6})$

AlarmRecipient

Phone number that alarms should be sent to when triggered

string

None.

Name

Survey name

string

Required

String length: inclusive between 0 and 150

Ends

Timestamp for survey end, or null if not set

date

None.

Request Formats

application/json, text/json

Sample:
{
  "Header": "sample string 1",
  "Keyword": "sample string 2",
  "KeywordResponse": "sample string 3",
  "WelcomeText": "sample string 4",
  "ThankYouText": "sample string 5",
  "AllowAnonymous": true,
  "TextColor": "sample string 7",
  "BackgroundColor": "sample string 8",
  "ButtonColor": "sample string 9",
  "AlarmRecipient": "sample string 10",
  "Name": "sample string 11",
  "Ends": "2019-08-19T15:33:02.1563786+00:00"
}

Response Information

Resource Description

Summary of created survey

SurveyFullDTO
NameDescriptionTypeAdditional information
Logo

Whether the survey uses a logo

boolean

None.

Created

Timestamp for survey creation

date

None.

Modified

Timestamp for last modification of survey

date

None.

Ended

Whether the survey has ended or is closed

boolean

None.

ID

Survey ID

integer

Required

Header

Survey title

string

String length: inclusive between 0 and 150

Keyword

Survey keyword

string

Matching regular expression pattern: ^\S+$

String length: inclusive between 0 and 15

KeywordResponse

If you have a virtual phone number and recieve an SMS beginning with the value of the keyword property this string will be sent as a response.

string

None.

WelcomeText

Survey introduction text

string

None.

ThankYouText

Survey completed text

string

None.

AllowAnonymous

Whether to enable recipients to remain anonymous

boolean

Required

TextColor

Color of survey text, hexadecimal (ex. #333333)

string

Matching regular expression pattern: ^#([A-Fa-f0-9]{6})$

BackgroundColor

Color of survey background, hexadecimal (ex. #eeeeee)

string

Matching regular expression pattern: ^#([A-Fa-f0-9]{6})$

ButtonColor

Color of survey buttons, hexadecimal (ex. #a1c775)

string

Matching regular expression pattern: ^#([A-Fa-f0-9]{6})$

AlarmRecipient

Phone number that alarms should be sent to when triggered

string

None.

Name

Survey name

string

Required

String length: inclusive between 0 and 150

Ends

Timestamp for survey end, or null if not set

date

None.

Response Formats

application/json, text/json

Sample:
{
  "Logo": true,
  "Created": "2019-08-19T15:33:02.1746428+00:00",
  "Modified": "2019-08-19T15:33:02.1746428+00:00",
  "Ended": true,
  "ID": 3,
  "Header": "sample string 4",
  "Keyword": "sample string 5",
  "KeywordResponse": "sample string 6",
  "WelcomeText": "sample string 7",
  "ThankYouText": "sample string 8",
  "AllowAnonymous": true,
  "TextColor": "sample string 10",
  "BackgroundColor": "sample string 11",
  "ButtonColor": "sample string 12",
  "AlarmRecipient": "sample string 13",
  "Name": "sample string 14",
  "Ends": "2019-08-19T15:33:02.1746428+00:00"
}