It seems that with current admin API it’s possible to invite users - but unfortunately, it’s not simple.
Even discarding the lack of documentation on
admin/invites endpoint, the endpoint itself is pretty hard to use.
- It requires session authentication. If you try to use the JWT token auth, that is intended for integrations after all, you will get a 501 error with little indication as to what you did wrong. I spent far too long searching for any reason for request failure before I stumbled into a post here that said that it requires session auth.
- It needs a role id instead of a name - which I think will differ between each ghost instance, so you need to get it by using the
admin/rolesapi endpoint, which once again needs session auth or it’ll return http 501.
I feel like even just allowing token auth for these endpoints would help with creating integrations that create users.
However, ideally I’d also like
admin/invites to accept a role name instead of id - it’d allow to skip using api to find the role id, and since AFAIK you can’t create custom roles, and in the UI you select them by names anyway, so I don’t see a reason for having to use the id other than it possibly requiring a bit of work to add (so I understand if it’s not a priority for ghost team, but might be something that open source contributors can add)