createUserWithHttpInfo method

Future<Response> createUserWithHttpInfo(
  1. String account,
  2. CreateUserRequest createUserRequest
)

Create a user

Creates a new user resource. Users may be created with only an email address — no name or password is necessarily required. This can act as a way to associate an email address with a license, which can later be claimed and turned into a full user profile, if needed, using the password reset flow. This is particularly great for custom license recovery flows, where you may need to email a user their lost license keys.

Note: This method returns the HTTP Response.

Parameters:

  • String account (required): The identifier (UUID) or slug of your Keygen account.

  • CreateUserRequest createUserRequest (required):

Implementation

Future<Response> createUserWithHttpInfo(String account, CreateUserRequest createUserRequest,) async {
  // ignore: prefer_const_declarations
  final path = r'/accounts/{account}/users'
    .replaceAll('{account}', account);

  // ignore: prefer_final_locals
  Object? postBody = createUserRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/vnd.api+json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}