---
updatedAt: 2026-09-17T12:58:47.000Z
---

# Profiles - Update Consumer Profile - Headers

```json JSON
curl --request PUT \
     --url https://sandboxapi.moneygram.com/consumer/v2/profiles/0042e97d-4f9e-4089-b443-10ece08b60d4 \
     --header 'X-MG-ClientRequestId: 4c79b06f-a2af-4859-82c8-28cbb0bf361b' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer WZP6hjNLNh9rU4RRiDc4GsIXidI4' \
     --header 'content-type: application/json' \
     --data '
{
  "targetAudience": "AGENT_FACING",
  "agentPartnerId": 30150519,
  "userLanguage": "en-US",
  "consumerDetails": {
    "address": {
      "line1": "100 Main St",
      "city": "Dallas",
      "countrySubdivisionCode": "US-TX",
      "countryCode": "USA",
      "postalCode": "75001"
    },
    "mobilePhone": {
      "number": "5551231234",
      "countryDialCode": "1"
    }
  }
}
'
```

```node Node
import moneygramDeveloper from '@api/moneygram-developer';

moneygramDeveloper.auth('WZP6hjNLNh9rU4RRiDc4GsIXidI4');
moneygramDeveloper.putUpdateConsumerProfile({
  targetAudience: 'AGENT_FACING',
  agentPartnerId: 30150519,
  userLanguage: 'en-US',
  consumerDetails: {
    address: {
      line1: '100 Main St',
      city: 'Dallas',
      countrySubdivisionCode: 'US-TX',
      countryCode: 'USA',
      postalCode: '75001'
    },
    mobilePhone: {
      number: '5551231234',
      countryDialCode: '1'
    }
  }
}, {
  profileId: '0042e97d-4f9e-4089-b443-10ece08b60d4',
  'X-MG-ClientRequestId': '4c79b06f-a2af-4859-82c8-28cbb0bf361b'
})
  .then(({ data }) => console.log(data))
  .catch(err => console.error(err));
```

```python Python
import requests

url = "https://sandboxapi.moneygram.com/consumer/v2/profiles/0042e97d-4f9e-4089-b443-10ece08b60d4"

payload = {
    "targetAudience": "AGENT_FACING",
    "agentPartnerId": 30150519,
    "userLanguage": "en-US",
    "consumerDetails": {
        "address": {
            "line1": "100 Main St",
            "city": "Dallas",
            "countrySubdivisionCode": "US-TX",
            "countryCode": "USA",
            "postalCode": "75001"
        },
        "mobilePhone": {
            "number": "5551231234",
            "countryDialCode": "1"
        }
    }
}
headers = {
    "accept": "application/json",
    "X-MG-ClientRequestId": "4c79b06f-a2af-4859-82c8-28cbb0bf361b",
    "content-type": "application/json",
    "authorization": "Bearer WZP6hjNLNh9rU4RRiDc4GsIXidI4"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

```java Java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"targetAudience\":\"AGENT_FACING\",\"agentPartnerId\":30150519,\"userLanguage\":\"en-US\",\"consumerDetails\":{\"address\":{\"line1\":\"100 Main St\",\"city\":\"Dallas\",\"countrySubdivisionCode\":\"US-TX\",\"countryCode\":\"USA\",\"postalCode\":\"75001\"},\"mobilePhone\":{\"number\":\"5551231234\",\"countryDialCode\":\"1\"}}}");
Request request = new Request.Builder()
  .url("https://sandboxapi.moneygram.com/consumer/v2/profiles/0042e97d-4f9e-4089-b443-10ece08b60d4")
  .put(body)
  .addHeader("accept", "application/json")
  .addHeader("X-MG-ClientRequestId", "4c79b06f-a2af-4859-82c8-28cbb0bf361b")
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Bearer WZP6hjNLNh9rU4RRiDc4GsIXidI4")
  .build();

Response response = client.newCall(request).execute();
```

```json Response Example
{
    "updateSuccess": true,
    "profileId": "0042e97d-4f9e-4089-b443-10ece08b60d4"
}
```

# Headers

<!-- json@2-6 -->
<!-- node@3,23 -->
<!-- python@7-8,27 -->
<!-- java@4,11 -->

The application must call the  <a href="https://developer.moneygram.com/moneygram-developer/reference/putupdateconsumerprofile" target="_blank">Update consumer profile</a> endpoint with a GET HTTP method, providing the OAuth `access_token` in the header and all other required header values.

**NOTE**: MoneyGram uses the OAuth 2.0 framework. The application must use their OAuth client credentials to generate an `access_token` by calling the <a href="https://developer.moneygram.com/moneygram-developer/reference/getaccesstoken" target="_blank">Get Access Token</a> endpoint. The token is valid for 1 hour and must be passed as a header value in all subsequent API HTTP calls. <a href="https://developer.moneygram.com/moneygram-developer/docs/o-auth-api" target="_blank">Learn More</a>

# Authorixation Bearer Token

<!-- json@5 -->
<!-- node@ -->

MoneyGram uses OAuth 2.0 to generate access tokens for interacting with our APIs. To generate a Bearer Access Token, use your OAuth client credentials and call the Get Access Token endpoint. The token is valid for one hour and must be passed as a header value in API HTTP calls.