Crear colector en SurveyMonkey, con una API

Crea un colector para una encuesta. Un colector weblink devuelve el enlace para compartir en url, y es el único tipo que puede crear el plan gratuito. Un colector email solo prepara la invitación: destinatarios y envío quedan en SurveyMonkey.

Identificador
surveymonkey_create_collector

La llamada

POST https://connect.reportei.com/api/tools/surveymonkey_create_collector/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "survey_id": "<survey_id>",
    "type": "weblink",
    "name": "<name>"
  }
}

Tu sistema envía el id de la conexión de tu cliente y los argumentos de la tool. Los headers son los mismos de toda la API de Connect: el token de tu producto y el token de tu cliente.

Parámetros

Las descripciones de los parámetros siguen la documentación oficial de la app, en inglés.

ParámetroTipoObligatorioDescripción
survey_idstringSíId of the survey, from List surveys.
typestringSíweblink gives a link to share, returned in url. email needs a paid plan, and its invitations are sent from SurveyMonkey.Valores: weblink, email
namestringSíName of the collector, shown only to the account.
thank_you_pageobjectNoCustom thank-you page shown after a response.
redirect_typestringNoEnd of the survey: url goes to redirect_url (or the standard thank-you page when it is empty), close closes the window and loop starts over, only for a weblink with allow_multiple_responses.Valores: url, close, loop
redirect_urlstringNoURL the respondent goes to after finishing.
close_datestringNoWhen the collector stops accepting responses, as an ISO 8601 date and time.
closed_page_messagestringNoMessage shown when the collector is closed.
response_limitintegerNoCloses the collector after this many responses.
allow_multiple_responsesbooleanNoLets the same browser answer more than once. Not for email collectors.
anonymous_typestringNoTurns off IP tracking; in an email collector, fully_anonymous also drops the email and name of the respondent.Valores: not_anonymous, partially_anonymous, fully_anonymous
edit_response_typestringNoWhen a respondent can still change the answers.Valores: until_complete, never, always
display_survey_resultsbooleanNoShows the current results to the respondent at the end.
passwordstringNoPassword the respondent must type to open the survey.
disqualification_messagestringNoMessage for a respondent who is disqualified by the survey logic.
disqualification_urlstringNoURL a disqualified respondent goes to.

Conexiones posibles

Tu cliente conecta su cuenta de SurveyMonkey una sola vez, con uno de los modos de abajo. La misma conexión sirve para todas las tools del toolkit.

OAuth con la app de tu producto

Registras la app OAuth de tu producto una sola vez, con POST /api/merchants/credentials/surveymonkey, y tu cliente autoriza la cuenta en una pantalla de consentimiento. Connect renueva el token cuando está por vencer.

La respuesta

Si la llamada tiene éxito, Connect conserva el status y el cuerpo de la respuesta de la app. Los errores HTTP devueltos por la app usan el objeto {error, api_error}; la autenticación o validación pueden fallar antes de la ejecución. El header X-Toolkit-Execution-Id identifica la ejecución registrada, disponible en GET /api/tools/executions/{uuid}.

Lista para agentes de IA

El input de esta tool es un JSON Schema, disponible en GET /api/tools/surveymonkey_create_collector. Se convierte en la definición de tool de tu agente sin conversión.

Otras tools de SurveyMonkey

Ver las 11 tools

Toolkits de la misma categoría

Ver los 100 toolkits

Mira Connect aplicado a tu producto.

Pruébalo durante 15 días sin tarjeta, o cuéntale tu caso a nuestro equipo.