Creating Members with the API

Hey, I’m trying to create members through the members api. What would be the correct rest endpoint to hit? What would the request look like and what data would I have to include in the request? Any help is appreciated!

2 Likes

If you don’t know, the members API isn’t documented because it’s possible that it will change.

However, you’re more than welcome to use it. My suggestion is to manually create a member through the Admin interface with dev tools open, and you can see what data is being POSTed to what endpoint. You can also see every single validation schema here (canary=v3 at the time of writing):

https://github.com/TryGhost/Ghost/tree/master/core/server/api/canary/utils/validators/input/schemas

2 Likes

You’ll also want to look into the admin api docs (especially on authentication) if you haven’t done so already :slight_smile: https://ghost.org/docs/api/v3/admin/#authentication

3 Likes

Is there any update on the ETA for the API to become public?

1 Like

Would love to know as well if this will be a public, supported API endpoint at some point in time! :slight_smile:

Yes me too. Do you perhaps have any idea of that @vikaspotluri123?

I don’t see anything related to the Members API in the docs, I also have no information about any timelines for the members API being stable + documented :slight_smile:

1 Like

Allright, thanks Vikas!

Is there an ETA on documenting the Member API?

I’m using Ghost as a headless CMS for my company blog, so I am not utilizing the Ghost-created website. I would love for users to be able to add/remove themselves from blog emails on our site.

Thanks!

You can always inspect the API and use it, but you’ll have to make sure the methods you depend on are similar in structure between releases

1 Like

This is a great idea. I’m trying to see if I can create a member when they make a purchase in a third party service, and it looks like the only hurdle is the last part of this API.

It looks like this is completely supported using Zapier.

For example, you can use Lemon Squeezy to handle payments, then process the changes in Ghost through Zapier.

@kow You can create a member in Ghost via Zapier?
On the page for Ghost integrations, it seems like Ghost can only be the trigger for actions performed on other platforms: Ghost Integrations | Connect Your Apps with Zapier

1 Like

For anyone searching through the archives for how to solve this, the Members API is pretty easy to use. If you’re writing a python app, I’ve written a walkthrough on how to programmatically sync your users and your ghost membership here: Ghost + Flask: Programmatically Adding New App Users into your Ghost Newsletter

2 Likes