Is it possible to set an expiration date for user accounts?

Every time a user registers with an invitation link, I would like that account to only last x months and once the deadline has reached the user must renew their account, is it possible to do so?

It is basically a membership with an expiration date and renewal. If this feature does not exist in Discourse, is it possible to program it through a plugin or something similar without touching the core? or is there no support in the API and webhooks for something like this?

You’d add them to a group when they joined. You’d then have a plugin that removed them from the group after the time limit was up. Just how you’d keep up with the month isn’t clear. Probably a user custom field with the end date would be the most simple.

“You’d then have a plugin that removed them from the group after the time limit was up.” which plugin?

“Probably a user custom field with the end date would be the most simple.” Do I add that information during signup? Then I should use a webhook at that point, correct?

There is no such plugin. Someone would need to write it.

No. The plugin would do that. And it’s likely that there’s a way to discern when they got added via the database and data explorer, though I’m not really sure.

If you’re not self hosted, or for other reason don’t want a plugin,
It might also be possible to hack something together using the data explorer plugin (to get data on when they were added and hence, should be deleted) and use an automation/api tool (like zapier, though I’ve also used github actions) to remove them from the group when the time comes.