> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://mailchimp.com/developer/marketing/api/lists/create-survey/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mailchimp.com/_mcp/server. # Create survey POST https://api.mailchimp.com/3.0/lists/{list_id}/surveys Content-Type: application/json Create a draft survey for an audience. Reference: https://mailchimp.com/developer/marketing/api/lists/create-survey ## Authentication - `Authorization` header (bearer token, required) — Authorization using a Mailchimp API key (a.k.a. Bearer token) - `Authorization` header (bearer token, required) — Authorization using OAuth ## Request ### Path parameters - `list_id` (string, required) — The unique ID for the list. ### Body (application/json) This endpoint expects an object. - `title` (string, optional) — The title of the survey. - `sections` (list of SurveySectionRequest, optional) — Initial survey sections. ## Response ### 200 Survey created. ## Types ### SurveySectionRequest A survey section. On PATCH, include the section id to update it; omit the section from the sections array to delete it (and any question it contains). - `type` (enum, required) — The section type. - Allowed values: `introduction`, `context`, `question` - `id` (string, optional) — The section ID. On PATCH, include to update an existing section; omit to add a new section. - `text` (string, optional) — Rich text content for introduction or context sections. - `options` (SurveySectionRequestOptions, optional) — Additional section options. - `question` (SurveySectionRequestQuestion, optional) — A survey question. On PATCH, include the question id to update it. Omitting question id creates a new question; it does not delete an existing one. To delete a question, omit its section from the sections array. ### SurveySectionRequestOptions Additional section options. ### SurveySectionRequestQuestion A survey question. On PATCH, include the question id to update it. Omitting question id creates a new question; it does not delete an existing one. To delete a question, omit its section from the sections array. - `query` (string, required) — The question text. - `type` (enum, required) — The response type of the survey question. - Allowed values: `pickOne`, `pickMany`, `range`, `text`, `email`, `contactInformation`, `dropdown` - `id` (string, optional) — The question ID. On PATCH, include to update an existing question; omit to add a new question. - `is_required` (boolean, optional) — Whether this question is required. - `has_other` (boolean, optional) — Whether this question has an 'other' option. - `other_label` (string, optional) — Label for the 'other' option. - `range_low_label` (string, optional) — Label for the low end of a range question. - `range_high_label` (string, optional) — Label for the high end of a range question. - `range_low_value` (integer, optional) — Low value for a range question. - `range_high_value` (integer, optional) — High value for a range question. - `range_presentation` (string, optional) — How a range question is presented. - `placeholder_label` (string, optional) — Placeholder text for text or email questions. - `subscribe_checkbox_enabled` (boolean, optional) — Whether the subscribe checkbox is enabled. - `subscribe_checkbox_label` (string, optional) — Label for the subscribe checkbox. - `should_auto_tag` (boolean, optional) — Whether responses should automatically apply tags. - `options` (list of SurveySectionRequestQuestionOptionsItems, optional) — Answer options for pickOne, pickMany, or dropdown questions. - `merge_field` (SurveySectionRequestQuestionMergeField, optional) — Merge field mapping for contact information questions. ### SurveySectionRequestQuestionOptionsItems - `label` (string, required) - `value` (string, required) ### SurveySectionRequestQuestionMergeField Merge field mapping for contact information questions. ## Examples **Request** ```json {} ``` **Response** ```json {} ``` **SDK Code** ```python import requests url = "https://api.mailchimp.com/3.0/lists/list_id/surveys" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.mailchimp.com/3.0/lists/list_id/surveys'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mailchimp.com/3.0/lists/list_id/surveys" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.mailchimp.com/3.0/lists/list_id/surveys") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mailchimp.com/3.0/lists/list_id/surveys") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://api.mailchimp.com/3.0/lists/list_id/surveys', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.mailchimp.com/3.0/lists/list_id/surveys"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mailchimp.com/3.0/lists/list_id/surveys")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > Find all the Mailchimp API documentation and tools developers need to send marketing and transactional emails.