Criar coletor no SurveyMonkey, por uma API

Cria um coletor para uma pesquisa. Um coletor weblink retorna o link para compartilhar em url, e é o único tipo que o plano gratuito pode criar. Um coletor email só prepara o convite: destinatários e envio ficam no SurveyMonkey.

Identificador
surveymonkey_create_collector

A chamada

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>"
  }
}

Seu sistema envia o id da conexão do cliente e os argumentos da tool. Os headers são os mesmos de toda a API do Connect: o token do seu produto e o token do cliente.

Parâmetros

As descrições dos parâmetros seguem a documentação oficial do app, em inglês.

ParâmetroTipoObrigatórioDescrição
survey_idstringSimId of the survey, from List surveys.
typestringSimweblink gives a link to share, returned in url. email needs a paid plan, and its invitations are sent from SurveyMonkey.Valores: weblink, email
namestringSimName of the collector, shown only to the account.
thank_you_pageobjectNãoCustom thank-you page shown after a response.
redirect_typestringNãoEnd 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_urlstringNãoURL the respondent goes to after finishing.
close_datestringNãoWhen the collector stops accepting responses, as an ISO 8601 date and time.
closed_page_messagestringNãoMessage shown when the collector is closed.
response_limitintegerNãoCloses the collector after this many responses.
allow_multiple_responsesbooleanNãoLets the same browser answer more than once. Not for email collectors.
anonymous_typestringNãoTurns 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_typestringNãoWhen a respondent can still change the answers.Valores: until_complete, never, always
display_survey_resultsbooleanNãoShows the current results to the respondent at the end.
passwordstringNãoPassword the respondent must type to open the survey.
disqualification_messagestringNãoMessage for a respondent who is disqualified by the survey logic.
disqualification_urlstringNãoURL a disqualified respondent goes to.

Conexões possíveis

O seu cliente conecta a conta do SurveyMonkey uma vez, por um dos modos abaixo. A mesma conexão serve para todas as tools do toolkit.

OAuth com o app do seu produto

Você cadastra o app OAuth do seu produto uma vez, em POST /api/merchants/credentials/surveymonkey, e o cliente autoriza a conta numa tela de consentimento. O Connect renova o token quando ele está para vencer.

A resposta

Em caso de sucesso, o Connect preserva o status e o corpo da resposta do app. Erros HTTP retornados pelo app usam o envelope {error, api_error}; falhas de autenticação ou validação podem ocorrer antes da execução. O header X-Toolkit-Execution-Id identifica a execução registrada, consultável em GET /api/tools/executions/{uuid}.

Pronta para agentes de IA

O input desta tool é um JSON Schema, disponível em GET /api/tools/surveymonkey_create_collector. Ele vira a definição de tool do seu agente sem conversão.

Outras tools do SurveyMonkey

Ver as 11 tools

Toolkits da mesma categoria

Ver os 100 toolkits

Veja o Connect aplicado ao seu produto.

Teste por 15 dias sem cartão, ou mostre seu cenário ao nosso time.