リクエスト curl JavaScript Python PHP Ruby Go
コピー curl -X PUT "https://new.strawpoll.com/api/v4/forms/w8Jq3KdN/draft" \
-H "X-API-Key: $STRAWPOLL_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"title": "Where should we go for lunch?",
"themeId": "0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10",
"properties": {
"description": "",
"language": "auto",
"layout": "paging",
"resultsVisibility": "public",
"responsesVisibility": "private",
"showPercentagesOnly": false,
"allowComments": false,
"commentsVisibility": "public",
"blockVPNUsers": true,
"editResponsePermissions": "admin_own_responses",
"responseDuplicateCheck": "ip",
"responseDuplicateCheckInterval": 1,
"useCaptchaVerification": false,
"allowedCountries": [],
"allowedEmailDomains": [],
"opensAt": "2026-11-24T09:30:00.000Z",
"closesAt": "2026-11-24T09:30:00.000Z",
"recurrence": {},
"responseLimit": 1,
"sendSelfEmailNotification": false,
"selfEmailNotificationInterval": 0,
"sendRespondentEmailNotification": false,
"showProgressBar": true,
"autoJumpToNextPage": true,
"oneClickVote": false,
"quiz": false,
"quizRevealAnswers": true,
"quizTimeLimit": 1,
"quizPassMark": 1,
"quizPassMessage": "",
"quizFailMessage": "",
"quizPenalty": 0,
"quizAttempts": 1,
"password": "",
"closedMessage": "",
"submitButtonText": "",
"saveProgress": false,
"linkPreview": {}
},
"sections": [
{
"id": "0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10",
"type": "multiple_choice",
"title": "Where should we go for lunch?",
"position": 0,
"properties": {
"description": "text",
"location": "text",
"timezone": "Europe/Berlin",
"layout": "default",
"variant": "text",
"redirectUrl": "https://strawpoll.com/r/w8Jq3KdN",
"redirectDelay": 0,
"endIcon": "text",
"endIconColor": "#16a34a",
"mediaId": "0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10",
"videoUrl": "https://strawpoll.com/r/w8Jq3KdN",
"names": ["text"],
"showIf": {},
"logicRules": [],
"duration": 0,
"customDuration": true,
"fixedTimezone": true,
"allowIfNeedBe": true,
"required": true,
"limitToOneOption": true,
"optionLimits": true,
"newOptionLimit": 0,
"hideUnavailableOptions": true,
"allowAdditionalVotes": true,
"editOthersVotes": "nobody",
"highlightBestOption": true,
"defaultView": "text",
"finalChoiceId": "0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10",
"qaModeration": true
},
"fields": [
{
"id": "0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10",
"type": "multiple_choice",
"label": "Pizza",
"position": 0,
"reference": "text",
"mediaId": "0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10",
"properties": {
"required": true,
"isMultipleChoice": true,
"multipleChoiceMin": 0,
"multipleChoiceMax": 0,
"randomizeChoices": true,
"allowWriteInChoice": true,
"listWriteInChoices": true,
"optionLimits": true,
"showResultsOnSelect": true,
"correctChoiceIds": ["0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10"],
"quizPoints": 0,
"partialRanking": true,
"firstPlacePoints": 0,
"maxRanks": 0,
"minDate": "text",
"maxDate": "text",
"yesLabel": "text",
"noLabel": "text",
"min": 0,
"max": 0,
"minLabel": "text",
"maxLabel": "text",
"placeholder": "text",
"decimals": 0,
"unit": "text",
"budget": 0,
"spendAll": true,
"rounds": 0,
"checkboxLabel": "text",
"linkUrl": "text",
"linkLabel": "text",
"maxSizeMb": 0,
"allowedFiles": "any",
"maxPins": 0,
"showEntries": true,
"columns": [{}]
},
"choices": [
{
"id": "0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10",
"label": "Pizza",
"position": 0,
"description": "text",
"mediaId": "0193e0a2-7b1c-7cc1-9a51-3f0d2c1f8e10",
"maxResponses": 0
}
]
}
]
}
]
}'