
When a customer registers, they become the owner of their account. They can change their own data and security settings.

The requests for self-management do not require parameters that identify the customer. Identity information is encoded in the JSON Web Token used for authorization.

## Retrieving customers' own data

Method reference available [here](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/getAccountDataGET).

A customer can access their own data stored in the database.


<pre><code class="language-plaintext">curl --location --request \
GET 'https://{SYNERISE_API_BASE_PATH}/v4/my-account/personal-information' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Version: 4.4' \
--header 'Authorization: Bearer eyJh...1FG5M'</code></pre>


The response includes all of the customer's data from the database.

## Updating customers' own data

Method reference available [here](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/updateAccountDataUsingPOST).

A customer can update their personal data.

When sending the request, include only the fields that you want to update. Sending a null value deletes an attribute (if it's a custom attribute) or sets it to null/default value (if the attribute is Synerise-native). Empty strings are not accepted.

The following example request updates the customer's avatar:


<pre><code class="language-plaintext">curl --location --request \
POST 'https://{SYNERISE_API_BASE_PATH}/v4/my-account/personal-information' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Version: 4.4' \
--header 'Authorization: Bearer eyJh...JxkM5o' \
--data-raw '{
    "avatarUrl": "https://www.gravatar.com/avatar/21b3b5d704c1a5169d16cef176ad4415?s=100&amp;r=g&amp;d=blank"
}'</code></pre>


## Changing email addresses

A customer can change their own email address. 

**Prerequisites**:  
[SMS sender integration](/docs/settings/tool/integrating-sms-gateways) must be enabled.


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

Email address is the primary unique identifier of a recognized/authenticated customer.

</div></div></div>


1. [Request an email change](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/requestClientEmailChange).
  
   <pre><code class="language-plaintext">curl --request POST 
     --url https://{SYNERISE_API_BASE_PATH}/sauth/my-account/email-change/request 
     --header 'authorization: Bearer eyJh...JxkM5o' 
     --header 'content-type: application/json' 
     --data '{
         "email":"newemail@synerise.com",
         "password":"strongpassword",
         "uuid":"07243772-008a-42e1-ba37-c3807cebde8f",
         "deviceId":"b3f56868-9667-4843-a8e5-0509456baa9b"
       }'</code></pre>

   **Result:** A confirmation token is sent to the customer's phone number.
2. [Confirm email change](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/confirmClientEmailChange).  
  You can also use this request to enable newsletter agreements for the new email.
  
   <pre><code class="language-plaintext">curl --request POST 
     --url https://{SYNERISE_API_BASE_PATH}/sauth/my-account/email-change/confirmation 
     --header 'authorization: Bearer eyJh...JxkM5o' 
     --header 'content-type: application/json' 
     --data '{
         "token":"string",
         "newsletterAgreement":true
       }'</code></pre>


## Changing phone numbers

A customer can change their own phone number.

**Prerequisites**:  
[SMS sender integration](/docs/settings/tool/integrating-sms-gateways) must be enabled.

1. [Request a phone number change](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/RequestClientPhoneNumberChange).
  
   <pre><code class="language-plaintext">curl --request POST 
     --url https://{SYNERISE_API_BASE_PATH}/v4/my-account/phone-update/request 
     --header 'authorization: Bearer eyJh...JxkM5o' 
     --data '{
         "phone":"555015332"
       }'</code></pre>

   **Result:** A confirmation token is sent to the new phone number.
2. Confirm the phone number change.  
  You can also use this request to enable SMS marketing permissions for the new number.
  
   <pre><code class="language-plaintext">curl --request POST 
     --url https://{SYNERISE_API_BASE_PATH}/v4/my-account/phone-update/confirmation 
     --header 'authorization: Bearer eyJh...JxkM5o' 
     --data '{
         "phone":"string",
         "confirmationCode":"string",
         "deviceId":"string",
         "smsAgreement":true
       }'</code></pre>


## Account deletion

Customers can delete their own accounts. Depending on the registration method, you need to use one of the following methods:
- [Delete RaaS account](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/deleteAccountUsingPOST)
- [Delete OAuth account](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/deleteOauthClientUsingPOST)
- [Delete Log in with Facebook account](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/DeleteAFacebookClientAccount)
- [Delete Sign in with Apple account](https://developers.synerise.com/ClientManagement/ClientManagement.html#operation/deleteAppleClientUsingPOST)

When an account is deleted, its events (anonymized) are retained in the database. The customer profile stops being visible in the list of profiles and is deleted.
