title: How to create a SalesForce 'User' with REST API?
body: <p>I am trying to create a User in SFDC  with REST API on Java Client.
  Please see my code below and help me to understand why I am getting the error message below:</p>
  
  <pre><code>HTTP Status 400 ::
  {
  errorCode: "NOT_FOUND"
  message: "The requested resource does not exist"
  }
  </code></pre>
  
  <p>CODE:</p>
  
  <pre><code>HttpClient httpClient = new HttpClient();
  JSONObject user = new JSONObject();
  String userId = null;
  
  try{
  
      user.put("Username", "email@domain.com");
      user.put("Alias", "DemoAPI");
      user.put("ProfileId", "00e90000000fKXB");
      user.put("Email", "email123456@domain.com");
      user.put("EmailEncodingKey", "ISO-8859-1");
      user.put("LastName", "REST API Test");
      user.put("LanguageLocaleKey", "pt_BR");
      user.put("LocaleSidKey", "pt_BR");
      user.put("TimeZoneSidKey", "America/Sao_Paulo");
  
      PostMethod post = new PostMethod( instanceURL + "/services/data/v29.0/sobjects/User");
      post.setRequestHeader("Authorization", "OAuth " + accessToken);
      post.setRequestEntity(new StringRequestEntity(user.toString(), "application/json", null));
  
      httpClient.executeMethod(post);
  
  }catch(Exception e){}
  </code></pre>