-4

I am working on the surveymonkey API and I am trying to send a message throw an email collector. The first send is ok but I get the error : 409 : Campaign status is completed when I send to a new contact.

Do I have to create a new collector?

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

You don't have to create a new collector but you have to create a new message (unless you close your collector, which you can re-open).

See the documentation for collectors/messages on how to create collectors and messages.

Example:

Create a new collector:

POST /surveys/<survey_id>/collectors
{
    "type": "email"
}

That'll return the collector you just created, you can then add a message to that collector:

POST /v3/collectors/<collector_id>/messages
{
    "type": "invite"
}

You can then add recipients to your message:

POST /v3/collectors/<collector_id>/messages/<message_id>/recipients
{
    "email": "test@example.com"
}

Then send that message.

POST /v3/collectors/<collector_id>/messages/<message_id>/send

You can then do steps 2-4 above on the same collector to create new messages, add recipients, then send it out. You can keep using the same collector.

General Kandalaft
  • 2,215
  • 2
  • 18
  • 25