Skip to main content

Struggling to schedule a campaign via REST api

Hello all πŸ‘‹,
I studied the REST api documentation and I'm probably just missing a tiny thing, why I'm not succeeding. Hope anybody can make me see my mistake.

My goal: create and schedule a campaign without touching FluentCRM/Wordpress

After it wasn't working in just one api call, I divided my http requests to the REST api in the same steps, as FluentCRM lets me manually schedule a campaign.

  1. Create the campaign

    api-url: domain.tld/wp-json/fluent-crm/v2/campaigns

    method: POST

    "title": "My title",

    "email_subject": "my subject",

    "email_pre_header":
    "my pre header",

    "status": "draft",

    "type": "campaign",

  2. Set Campaign Content

    api-url: domain.tld/wp-json/fluent-crm/v2/campaigns/{ID} <- here I put the actual ID of course

    method: PUT

    "title": "My title",

    "design_template": "raw_html",

    "email_body":
    "my raw html email body",

  3. Configure recipients
    api-url: domain.tld/wp-json/fluent-crm/v2/campaigns/{ID} <- here I put the actual ID of course

    method: PUT

    "title": "My title",

    "design_template": "raw_html",

    "settings":

    "sending_filter": "list_tag",
    "mailer_settings": {
    
       "from_name": "My from name",
    
       "from_email": "my from mail",
    
       "is_custom": "yes"
    
       },
    
      "subscribers": \[
    
            { "list": "1", "tag": "all" }
    
      ],
    
       "excludedSubscribers": \[]
    
       }

    }

  4. Schedule

    api-url: domain.tld/wp-json/fluent-crm/v2/campaigns/{ID} <- here I put the actual ID of course

    method: PUT

    "title": "My title",

    "status": "scheduled",

    "scheduled_at": "Time in Format: yyyy-LL-dd HH:mm:ss",

    "settings":

     "sending_type": "schedule",

Step 1 & 2 seem to work well. βœ…

Step 3 is an odd one, as it does work (no errors), but on the campaign overview in the column "Recipients" is still "n/a".

And now step 4: I'm not getting an error either, as all steps before I'm getting back statusCode: 200, statusMessage: OK. All my settings are visable and correct in the response EXCEPT for the status, the status falls back to "draft".

I suspect it has to be something in step 3, that the Contacts are not being attached to the campaign, like it happens when you click the button "Continue To Next Step [Review and Send]"."

Any ideas what I'm missing?

Please check the response JSON after calling the Create or Update APIβ€”you’ll find the correct structure for recipient settings within the settings object. To schedule a campaign, use the campaigns/{id}/schedule API route with the following payload: 'scheduled_at': '2025-08-30 00:00:00', 'sending_type': 'schedule'.
Additionally, we have plan to include the full email campaign creation workflow in our REST API documentation soon.