Creating Paid Members from admin API request

Hi team, firstly great work, I am having fun working with ghost API
I am able to create free members on ghost using admin api however I want them to be paid member.
I am hitting ?include=tiers endpoint, so a demo request looks like
<ghost_url>/ghost/api/admin/members/64ef1ef92e58c7000187474c/?include=tiers
and payload looks like
data={"tier": [{"id":"DemoTier1", "expiry_at":"2024-01-01T00:00:00.000Z"}]}
However, I am stuck here unfortunately. I want to ask

  1. what is the problem in above endpoint? Is there any better way to do this?
  2. do we need have tiers defined on blog only then we can use them via api or we the api is able to create tier even if doesn’t exist.
    PS: My main aim is to add paid member w/o stripe integrations.
    Kind Regards.

Since there is documentation issue in this case, I found the solution to this and the payload json in such cases would be
data = {"members": [{"email": customer_email, "tiers": [{"expiry_at": membership_expiry_date, "id": ghost_tierid}]}]}

And the endpoint is POST /admin/members/

1 Like