> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create User

> Use this endpoint to create a user. This endpoint accepts the optional `MX-SKIP-WEBHOOK` header.

## Body Parameters

<ParamField body="birthdate" type="string" />

<ParamField body="credit_score" type="string" />

<ParamField body="email" type="string" />

<ParamField body="first_name" type="string" />

<ParamField body="gender" type="string" />

<ParamField body="id" required type="string" />

<ParamField body="is_disabled" type="string" />

<ParamField body="last_name" type="string" />

<ParamField body="metadata" type="string" />

<ParamField body="phone" type="string" />

<ParamField body="zip_code" type="string" />

<RequestExample>
  ```shell Request theme={null}
  import java.io.BufferedReader;
  import java.io.InputStreamReader;
  import java.io.OutputStream;
  import java.net.URL;
  import javax.net.ssl.HttpsURLConnection;
  import org.json.JSONObject;

  public class MDX_RealTime {
  	private String BaseUrl, ClientId, ApiKey;

  	public MDX_RealTime(String BaseUrl, String ClientId, String ApiKey) {
  		this.BaseUrl = BaseUrl;
  		this.ClientId = ClientId;
  		this.ApiKey = ApiKey;
  	}

  	public static void main(String[] args) throws Exception {
  		String base_url = "https://int-live.moneydesktop.com";
  		String client_id = ":client_id";
  		String api_key = ":api_key";

  		MDX_RealTime mdx = new MDX_RealTime(base_url, client_id, api_key);

  		/// Setup User Create json object
  		String user_id = "U-39XBF7";
  		JSONObject user = new JSONObject();
  		JSONObject fields = new JSONObject();
  		fields.put("id", user_id);
  		user.put("user", fields);

  		mdx.CreateUser(user);
  	}		

  	public void CreateUser(JSONObject user) {
  		try {
  			String uri = BaseUrl + "/" + ClientId + "/users.json";
  			URL url = new URL(uri);
  			
  			HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
  			con.setRequestMethod("POST");
  			con.setRequestProperty("Accept", "application/vnd.moneydesktop.mdx.v5+json");
  			con.setRequestProperty("Content-Type", "application/vnd.moneydesktop.mdx.v5+json");
  			con.setRequestProperty("MD-API-KEY", ApiKey);
  			con.setDoOutput(true);

  			OutputStream out = con.getOutputStream();
  			out.write(user.toString().getBytes("UTF-8"));
  			out.close();

  			BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
  			String inputLine;
  			StringBuffer response = new StringBuffer();
  			while ((inputLine = in.readLine()) != null) {
  				response.append(inputLine);
  			}
  			in.close();
  			con.disconnect();

  			System.out.println(response.toString());
  		} catch (Exception e) {
  			System.out.println(e);
  		}
  	}
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
     "user": {
        "id": "U-39XBF7",
        "birthdate": "1959-07-17",
        "gender": "MALE",
        "first_name": "John",
        "guid": "USR-c4321d57a-9ae4-1fe3-6c4e-96a84fb92b50",
        "last_name": "Smith",
        "metadata": "Additional Information",
        "credit_score": 718,
        "email": "example@example.com",
        "phone": "(505) 555-1234",
        "zip_code": "87101",
        "is_disabled": false,
        "logged_in_at": null
     }
  }
  ```
</ResponseExample>
