curl -L \
--request POST \
--url 'https://ushahididocs.api.ushahidi.io/api/v5/surveys' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "test2",
"description": "test desc 2",
"base_language": "en-US",
"require_approval": true,
"everyone_can_create": true,
"translations": {},
"tasks": [
{
"priority": 0,
"required": false,
"type": "post",
"label": "Post",
"show_when_published": true,
"task_is_internal_only": false,
"translations": {},
"fields": [
{
"cardinality": 0,
"input": "text",
"priority": 1,
"required": true,
"label": "Title",
"type": "title",
"config": {},
"form_stage_id": "interim_id_0",
"translations": {},
"$$hashKey": "object:830"
},
{
"cardinality": 0,
"input": "text",
"priority": 2,
"required": true,
"label": "Description",
"type": "description",
"options": [],
"config": {},
"form_stage_id": "interim_id_1",
"translations": {},
"$$hashKey": "object:831"
}
],
"is_public": true
},
{
"required": false,
"fields": [
{
"required": false,
"options": [],
"config": {},
"priority": 0,
"translations": {},
"label": "field 2",
"type": "varchar",
"input": "text",
"description": "A sentence or less",
"$$hashKey": "object:893",
"instructions": "",
"form_stage_id": "interim_id_3"
}
],
"type": "task",
"show_when_published": false,
"task_is_internal_only": true,
"label": "task 2",
"priority": 1,
"$$hashKey": "object:867"
}
],
"enabled_languages": {
"default": "en-US",
"available": []
}
}'