<commit_before>
.. code-block:: bash

    curl -s --user 'api:YOUR_API_KEY' -X PUT \
	https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/credentials/alice \
	-F password='<PASSWORD>'

.. code-block:: java

 import com.mashape.unirest.http.HttpResponse;
 import com.mashape.unirest.http.JsonNode;
 import com.mashape.unirest.http.Unirest;
 import com.mashape.unirest.http.exceptions.UnirestException;
 
 public class MGSample {
 
     // ...
 
     public static JsonNode updatePassword() throws UnirestException {
 
         HttpResponse<JsonNode> jsonResponse = Unirest.put("https://api.mailgun.net/v3/domains/YOUR_DOMAIN_NAME/credentials/alice")
             .basicAuth("api", API_KEY)
             .field("password", "<PASSWORD>")
             .asJson();
 
         return jsonResponse.getBody();
     }
 }

.. code-block:: php

  # Include the Autoloader (see "Libraries" for install instructions)
  require 'vendor/autoload.php';
  use Mailgun\Mailgun;

  # Instantiate the client.
  $mgClient = new Mailgun('YOUR_API_KEY');
  $domain = 'YOUR_DOMAIN_NAME';
  $login= 'alice';

  # Issue the call to the client.
  $result = $mgClient->put("$domain/credentials/$login", array(
      'password' => '<PASSWORD>'
  ));

.. code-block:: py

 def change_credential_password():
     return requests.put(
         "https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/credentials/alice",
         auth=("api", "YOUR_API_KEY"),
         data={"password": "<PASSWORD>"})

.. code-block:: rb

 def change_credential_password
   RestClient.put "https://api:YOUR_API_KEY"\
   "@api.mailgun.net/v3/YOUR_DOMAIN_NAME/credentials/alice",
   :password => "<PASSWORD>"
 end

.. code-block:: csharp

 using System;
 using System.IO;
 using RestSharp;
 using RestSharp.Authenticators;

 public class ChangePwdCredentialsChunk
 {

     public static void Main (string[] args)
     {
         Console.WriteLine (ChangeCredentialPassword ().Content.ToString ());
     }

     public static IRestResponse ChangeCredentialPassword ()
     {
         RestClient client = new RestClient ();
         client.BaseUrl = new Uri ("https://api.mailgun.net/v3");
         client.Authenticator =
             new HttpBasicAuthenticator ("api",
                                         "YOUR_API_KEY");
         RestRequest request = new RestRequest ();
         request.AddParameter ("domain", "YOUR_DOMAIN_NAME", ParameterType.UrlSegment);
         request.Resource = "{domain}/credentials/{username}";
         request.AddUrlSegment ("username", "alice");
         request.AddParameter ("password", "<PASSWORD>");
         request.Method = Method.PUT;
         return client.Execute (request);
     }

 }

.. code-block:: go

 // coming soon

.. code-block:: js

 var DOMAIN = 'YOUR_DOMAIN_NAME';
 var mailgun = require('mailgun-js')({ apiKey: "YOUR_API_KEY", domain: DOMAIN });

 mailgun.put(`/domain/${DOMAIN}/credentials/alice`, {"password" : "<PASSWORD>"}, function (error, body) {
   console.log(body);
 });<commit_msg>Corrected url to change credentials<commit_after>
.. code-block:: bash

    curl -s --user 'api:YOUR_API_KEY' -X PUT \
	https://api.mailgun.net/v3/domains/YOUR_DOMAIN_NAME/credentials/alice \
	-F password='<PASSWORD>'

.. code-block:: java

 import com.mashape.unirest.http.HttpResponse;
 import com.mashape.unirest.http.JsonNode;
 import com.mashape.unirest.http.Unirest;
 import com.mashape.unirest.http.exceptions.UnirestException;
 
 public class MGSample {
 
     // ...
 
     public static JsonNode updatePassword() throws UnirestException {
 
         HttpResponse<JsonNode> jsonResponse = Unirest.put("https://api.mailgun.net/v3/domains/YOUR_DOMAIN_NAME/credentials/alice")
             .basicAuth("api", API_KEY)
             .field("password", "<PASSWORD>")
             .asJson();
 
         return jsonResponse.getBody();
     }
 }

.. code-block:: php

  # Include the Autoloader (see "Libraries" for install instructions)
  require 'vendor/autoload.php';
  use Mailgun\Mailgun;

  # Instantiate the client.
  $mgClient = new Mailgun('YOUR_API_KEY');
  $domain = 'YOUR_DOMAIN_NAME';
  $login= 'alice';

  # Issue the call to the client.
  $result = $mgClient->put("domains/$domain/credentials/$login", array(
      'password' => '<PASSWORD>'
  ));

.. code-block:: py

 def change_credential_password():
     return requests.put(
         "https://api.mailgun.net/v3/domains/YOUR_DOMAIN_NAME/credentials/alice",
         auth=("api", "YOUR_API_KEY"),
         data={"password": "<PASSWORD>"})

.. code-block:: rb

 def change_credential_password
   RestClient.put "https://api:YOUR_API_KEY"\
   "@api.mailgun.net/v3/domains/YOUR_DOMAIN_NAME/credentials/alice",
   :password => "<PASSWORD>"
 end

.. code-block:: csharp

 using System;
 using System.IO;
 using RestSharp;
 using RestSharp.Authenticators;

 public class ChangePwdCredentialsChunk
 {

     public static void Main (string[] args)
     {
         Console.WriteLine (ChangeCredentialPassword ().Content.ToString ());
     }

     public static IRestResponse ChangeCredentialPassword ()
     {
         RestClient client = new RestClient ();
         client.BaseUrl = new Uri ("https://api.mailgun.net/v3");
         client.Authenticator =
             new HttpBasicAuthenticator ("api",
                                         "YOUR_API_KEY");
         RestRequest request = new RestRequest ();
         request.AddParameter ("domain", "YOUR_DOMAIN_NAME", ParameterType.UrlSegment);
         request.Resource = "domains/{domain}/credentials/{username}";
         request.AddUrlSegment ("username", "alice");
         request.AddParameter ("password", "<PASSWORD>");
         request.Method = Method.PUT;
         return client.Execute (request);
     }

 }

.. code-block:: go

 // coming soon

.. code-block:: js

 var DOMAIN = 'YOUR_DOMAIN_NAME';
 var mailgun = require('mailgun-js')({ apiKey: "YOUR_API_KEY", domain: DOMAIN });

 mailgun.put(`/domains/${DOMAIN}/credentials/alice`, {"password" : "<PASSWORD>"}, function (error, body) {
   console.log(body);
 });
{'fraction_non_alphanumeric': 0.14200298953662183, 'fraction_numerical': 0.0016608536787908986, 'mean_word_length': 3.014666666666667, 'pattern_counts': {'":': 2, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6601480', 'n_tokens_mistral': 1962, 'n_tokens_neox': 1868, 'n_words': 364}