Signup Confirmation email not sent (API)

Hi there,

I use N8N with an http post request node and this code:

{
  "members": [
    {
      "email": "iflubberdopler12@byom.de",
      "labels": ["Community", "Warteliste"],
      "email_settings": {"send_email": true, "email_type": "subscribe"}  
    }
  ]
}

Member Creation

Works fine in Ghost i dont get any errors here is a pic:

The Problem

The new User dont get an “Subscription eMail” to confirm.

Alternative Test in Zapier

In Zapier it works fine with the same settings:

here is the email i mean

Conclusion

What i am doing wrong in my JSON-Code to send this email to new members ?

Thx a lot for support!

You don’t pass options as part of the body. Pass it as a query string. Like this:

  let result = await fetch(GHOST_API_URL + '/ghost/api/admin/members/?send_email=true', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Ghost ' + token
    },
    body: JSON.stringify({

      members: [{
        ...data,
        
      }]

    })
  })
1 Like

Hey Cathy,

Thanks, that worked almost perfectly. The “Please confirm” email is now incoming:

The String Query Parameter

Ghost in a hurry ?

But the Ghost Member is directly created, its seems that Ghost doesn’t wait to Confirm the Subscription for creating the member. When i register over the website the systems waits the opt-in confirmation.

Do i need to change anything in the code, or is it the way ghost works :) ?

Oh, wrong endpoint then. You need send-magic-link.

Details:

Thxs for your documentation, with the magic link endpoint.

Just to clarify:

When i use the magic-link endpoint. The user will be only created as Member when he click on the magic link and not via the api correct?

(With the normal API it creates a user,independly which email he gets)

Correct.

You may also need an integrity token. Updated the link above to include it.

(Hard to keep all the posts up to date at all times! Especially for changes that aren’t super obvious.)

1 Like

THX i got it :)