Chilkat Online Tools

Foxpro / Zoom API / Update a webinar survey

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loReq
LOCAL loResp
LOCAL lnRespStatusCode

* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.HttpRequest')
loReq = CreateObject('Chilkat.HttpRequest')
loReq.HttpVerb = "PATCH"
loReq.Path = "/v2/webinars/:webinarId/survey"
loReq.ContentType = "multipart/form-data"
loReq.AddParam("third_party_survey","ullamco aute sit adi")

loReq.AddParam("custom_survey",'ullamco aute sit adi{"anonymous":false,"questions":[{"name":"aliqua ","type":"long_answer","show_as_dropdown":false,"answer_required":false,"answers":["sint Excepteur","qui tempor quis laboris"],"answer_min_character":59368162,"answer_max_character":-57090280,"rating_min_value":6871526,"rating_max_value":-286025,"rating_min_label":"Excepteur adipisicing","rating_max_label":"quis fugiat qui cillum"},{"name":"culpa","type":"single","show_as_dropdown":false,"answer_required":false,"answers":["commodo d","laboris proident cillum"],"answer_min_character":34670518,"answer_max_character":34438852,"rating_min_value":600570,"rating_max_value":-91541353,"rating_min_label":"eiusmod in","rating_max_label":"sint amet"}]}')

loReq.AddParam("show_in_the_follow_up_email",'ullamco aute sit adi{"anonymous":false,"questions":[{"name":"aliqua ","type":"long_answer","show_as_dropdown":false,"answer_required":false,"answers":["sint Excepteur","qui tempor quis laboris"],"answer_min_character":59368162,"answer_max_character":-57090280,"rating_min_value":6871526,"rating_max_value":-286025,"rating_min_label":"Excepteur adipisicing","rating_max_label":"quis fugiat qui cillum"},{"name":"culpa","type":"single","show_as_dropdown":false,"answer_required":false,"answers":["commodo d","laboris proident cillum"],"answer_min_character":34670518,"answer_max_character":34438852,"rating_min_value":600570,"rating_max_value":-91541353,"rating_min_label":"eiusmod in","rating_max_label":"sint amet"}]}false')

loReq.AddParam("show_in_the_browser",'ullamco aute sit adi{"anonymous":false,"questions":[{"name":"aliqua ","type":"long_answer","show_as_dropdown":false,"answer_required":false,"answers":["sint Excepteur","qui tempor quis laboris"],"answer_min_character":59368162,"answer_max_character":-57090280,"rating_min_value":6871526,"rating_max_value":-286025,"rating_min_label":"Excepteur adipisicing","rating_max_label":"quis fugiat qui cillum"},{"name":"culpa","type":"single","show_as_dropdown":false,"answer_required":false,"answers":["commodo d","laboris proident cillum"],"answer_min_character":34670518,"answer_max_character":34438852,"rating_min_value":600570,"rating_max_value":-91541353,"rating_min_label":"eiusmod in","rating_max_label":"sint amet"}]}falsetrue')

loReq.AddHeader("Authorization","Bearer <access_token>")

loResp = loHttp.SynchronousRequest("api.zoom.us",443,1,loReq)
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loReq
    CANCEL
ENDIF

lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode <> 204) THEN
    ? "Response Header:"
    ? loResp.Header
    ? "Response Body:"
    ? loResp.BodyStr
    ? "Failed."
    RELEASE loResp
    RELEASE loHttp
    RELEASE loReq
    CANCEL
ENDIF

RELEASE loResp
? "Success."

RELEASE loHttp
RELEASE loReq

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'third_party_survey=ullamco aute sit adi'
	--form 'custom_survey=ullamco aute sit adi{"anonymous":false,"questions":[{"name":"aliqua ","type":"long_answer","show_as_dropdown":false,"answer_required":false,"answers":["sint Excepteur","qui tempor quis laboris"],"answer_min_character":59368162,"answer_max_character":-57090280,"rating_min_value":6871526,"rating_max_value":-286025,"rating_min_label":"Excepteur adipisicing","rating_max_label":"quis fugiat qui cillum"},{"name":"culpa","type":"single","show_as_dropdown":false,"answer_required":false,"answers":["commodo d","laboris proident cillum"],"answer_min_character":34670518,"answer_max_character":34438852,"rating_min_value":600570,"rating_max_value":-91541353,"rating_min_label":"eiusmod in","rating_max_label":"sint amet"}]}'
	--form 'show_in_the_follow_up_email=ullamco aute sit adi{"anonymous":false,"questions":[{"name":"aliqua ","type":"long_answer","show_as_dropdown":false,"answer_required":false,"answers":["sint Excepteur","qui tempor quis laboris"],"answer_min_character":59368162,"answer_max_character":-57090280,"rating_min_value":6871526,"rating_max_value":-286025,"rating_min_label":"Excepteur adipisicing","rating_max_label":"quis fugiat qui cillum"},{"name":"culpa","type":"single","show_as_dropdown":false,"answer_required":false,"answers":["commodo d","laboris proident cillum"],"answer_min_character":34670518,"answer_max_character":34438852,"rating_min_value":600570,"rating_max_value":-91541353,"rating_min_label":"eiusmod in","rating_max_label":"sint amet"}]}false'
	--form 'show_in_the_browser=ullamco aute sit adi{"anonymous":false,"questions":[{"name":"aliqua ","type":"long_answer","show_as_dropdown":false,"answer_required":false,"answers":["sint Excepteur","qui tempor quis laboris"],"answer_min_character":59368162,"answer_max_character":-57090280,"rating_min_value":6871526,"rating_max_value":-286025,"rating_min_label":"Excepteur adipisicing","rating_max_label":"quis fugiat qui cillum"},{"name":"culpa","type":"single","show_as_dropdown":false,"answer_required":false,"answers":["commodo d","laboris proident cillum"],"answer_min_character":34670518,"answer_max_character":34438852,"rating_min_value":600570,"rating_max_value":-91541353,"rating_min_label":"eiusmod in","rating_max_label":"sint amet"}]}falsetrue'
https://api.zoom.us/v2/webinars/:webinarId/survey

Postman Collection Item JSON

{
  "name": "Update a webinar survey",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "PATCH",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "third_party_survey",
          "value": "ullamco aute sit adi",
          "description": "undefined",
          "type": "text"
        },
        {
          "key": "custom_survey",
          "value": "{\"anonymous\":false,\"questions\":[{\"name\":\"aliqua \",\"type\":\"long_answer\",\"show_as_dropdown\":false,\"answer_required\":false,\"answers\":[\"sint Excepteur\",\"qui tempor quis laboris\"],\"answer_min_character\":59368162,\"answer_max_character\":-57090280,\"rating_min_value\":6871526,\"rating_max_value\":-286025,\"rating_min_label\":\"Excepteur adipisicing\",\"rating_max_label\":\"quis fugiat qui cillum\"},{\"name\":\"culpa\",\"type\":\"single\",\"show_as_dropdown\":false,\"answer_required\":false,\"answers\":[\"commodo d\",\"laboris proident cillum\"],\"answer_min_character\":34670518,\"answer_max_character\":34438852,\"rating_min_value\":600570,\"rating_max_value\":-91541353,\"rating_min_label\":\"eiusmod in\",\"rating_max_label\":\"sint amet\"}]}",
          "description": "undefined",
          "type": "text"
        },
        {
          "key": "show_in_the_follow_up_email",
          "value": "false",
          "description": "undefined",
          "type": "text"
        },
        {
          "key": "show_in_the_browser",
          "value": "true",
          "description": "undefined",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/webinars/:webinarId/survey",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "webinars",
        ":webinarId",
        "survey"
      ],
      "variable": [
        {
          "key": "webinarId",
          "value": "68423085",
          "description": "(Required) The webinar's ID."
        }
      ]
    },
    "description": "Use this API to update a [webinar survey](https://support.zoom.us/hc/en-us/articles/360048745651). \n\n **Scopes:** `webinar:write`, `webinar:write:admin` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` \n\n **Prerequisites:** \n* A Pro or higher plan with the Webinar add-on. \n* The [**Webinar Survey**](https://support.zoom.us/hc/en-us/articles/360061293191-Enabling-webinar-survey) feature enabled in the host's account."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `204` <br>\n Webinar survey updated.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "third_party_survey",
              "value": "eu ut in amet e",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "custom_survey",
              "value": "{\"anonymous\":false,\"questions\":[{\"name\":\"qui est magna\",\"type\":\"rating_scale\",\"show_as_dropdown\":false,\"answer_required\":false,\"answers\":[\"sed dolor\",\"irure deserunt\"],\"answer_min_character\":70990159,\"answer_max_character\":44743900,\"rating_min_value\":10835653,\"rating_max_value\":-88768510,\"rating_min_label\":\"Lorem quis\",\"rating_max_label\":\"magna labore consectetur dolore est\"},{\"name\":\"nisi Ut non\",\"type\":\"multiple\",\"show_as_dropdown\":false,\"answer_required\":false,\"answers\":[\"sed proident\",\"magna dolore adipisicing ut\"],\"answer_min_character\":83676632,\"answer_max_character\":46051900,\"rating_min_value\":18596642,\"rating_max_value\":-39048943,\"rating_min_label\":\"mollit nostrud esse culpa\",\"rating_max_label\":\"ad velit\"}]}",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "show_in_the_follow_up_email",
              "value": "false",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "show_in_the_browser",
              "value": "true",
              "description": "undefined",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/survey",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "survey"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `400` <br> Bad Request \n\n **Error Code:** `300` <br>\n * Invalid webinar ID. <br>\n * Invalid third party survey: {third_party_survey}. \n\n **Error Code:** `3000` <br>\n Webinar survey disabled. To enable this feature, enable the \"Webina",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "third_party_survey",
              "value": "eu ut in amet e",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "custom_survey",
              "value": "{\"anonymous\":false,\"questions\":[{\"name\":\"qui est magna\",\"type\":\"rating_scale\",\"show_as_dropdown\":false,\"answer_required\":false,\"answers\":[\"sed dolor\",\"irure deserunt\"],\"answer_min_character\":70990159,\"answer_max_character\":44743900,\"rating_min_value\":10835653,\"rating_max_value\":-88768510,\"rating_min_label\":\"Lorem quis\",\"rating_max_label\":\"magna labore consectetur dolore est\"},{\"name\":\"nisi Ut non\",\"type\":\"multiple\",\"show_as_dropdown\":false,\"answer_required\":false,\"answers\":[\"sed proident\",\"magna dolore adipisicing ut\"],\"answer_min_character\":83676632,\"answer_max_character\":46051900,\"rating_min_value\":18596642,\"rating_max_value\":-39048943,\"rating_min_label\":\"mollit nostrud esse culpa\",\"rating_max_label\":\"ad velit\"}]}",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "show_in_the_follow_up_email",
              "value": "false",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "show_in_the_browser",
              "value": "true",
              "description": "undefined",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/survey",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "survey"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404` <br> Not Found \n\n **Error Code:** `300` <br>\n Webinar ID does not exist. \n\n **Error Code:** `3001` <br>\n Webinar does not exist: {webinarId}.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "third_party_survey",
              "value": "eu ut in amet e",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "custom_survey",
              "value": "{\"anonymous\":false,\"questions\":[{\"name\":\"qui est magna\",\"type\":\"rating_scale\",\"show_as_dropdown\":false,\"answer_required\":false,\"answers\":[\"sed dolor\",\"irure deserunt\"],\"answer_min_character\":70990159,\"answer_max_character\":44743900,\"rating_min_value\":10835653,\"rating_max_value\":-88768510,\"rating_min_label\":\"Lorem quis\",\"rating_max_label\":\"magna labore consectetur dolore est\"},{\"name\":\"nisi Ut non\",\"type\":\"multiple\",\"show_as_dropdown\":false,\"answer_required\":false,\"answers\":[\"sed proident\",\"magna dolore adipisicing ut\"],\"answer_min_character\":83676632,\"answer_max_character\":46051900,\"rating_min_value\":18596642,\"rating_max_value\":-39048943,\"rating_min_label\":\"mollit nostrud esse culpa\",\"rating_max_label\":\"ad velit\"}]}",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "show_in_the_follow_up_email",
              "value": "false",
              "description": "undefined",
              "type": "text"
            },
            {
              "key": "show_in_the_browser",
              "value": "true",
              "description": "undefined",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/survey",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "survey"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}