How Can I Programmatically Activate Users (is_active=True) via the Open edX REST API?

Hi everyone,

I am developing a registration system that needs to programmatically activate user accounts (is_active=True) after registration, ideally through the official Open edX REST API.
I have reviewed the accounts API documentation, and although the is_active field appears in the user schema, sending a PATCH request to update it returns a success status but does not actually change the value of is_active (the user remains inactive).

  • Is it possible to update is_active via the API out of the box in current Open edX releases (Palm, Quince, Sumac, etc.)?
  • If not, is there an officially recommended way to activate users programmatically, other than directly updating the database or using Django admin?
  • What is the current best practice for activating (or deactivating) user accounts in an automated workflow, especially for onboarding flows managed from external systems?

I have read historical discussions about the ambiguity of is_active (email verification vs. account disabling), but I am looking for a clear, maintainable way to activate users after registration that will not break with future Open edX upgrades.

Any guidance or updated best practices would be greatly appreciated!

Thanks in advance.

@Edwin75206 hmm, I’m not sure. But let me understand a bit better. You wish for users to immediately become active on registration, without having to verify their email? Or do you have a different use case in mind?

Like @sarina I’m unsure of the use case here, but I believe you can configure an entire system not to require activation email, per user_authn. I don’t see any documentation about it but here’s the relevant toggle switch.

If you do this, 'ware the warning there; I cannot stress enough that this warning is absolutely correct.

    # .. toggle_description: Turn this on to skip sending emails for user validation.
    #   Beware, as this leaves the door open to potential spam abuse.

You can also put your system into a test mode for user activations that don’t require verification, and there are couple of management commands to create test users that are auto-activated.