Creating a new user through API

I found the solution:

const res = await strapi.entityService.create(
        'plugin::users-permissions.user',
        {
          data: {
            username: 'your-user-name',
            provider: 'local',
            blocked: false,
            password: 'raw-password',
            role: 3,
          },
        }
      );
1 Like