# Update identity

{% post /%}
{% path text="/v1/senderIdentities/update" /%}

This API allows for the modification of an existing sender identity. The request requires the email address of the specific sender identity to be updated. You can update any of the supported properties, including the identity's name, redirect URL, metadata fields, notification settings, or the configured locale.

## Code snippet

{% codetab %}

cURL

```shell
curl -X 'POST' \
  'https://api.boldsign.com/v1/senderIdentities/update?email=luthercooper%40cubeflakes.com' \
      -H 'accept: */*' \
      -H 'X-API-KEY: {your API key}' \
      -H 'Content-Type: application/json;odata.metadata=minimal;odata.streaming=true' \
      -d '{
          "Name": "Luther",
          "RedirectUrl": "https://boldsign.com",
          "NotificationSettings": {
            "Viewed": true,
            "Sent": false,
            "DeliveryFailed": true,
            "Declined": true,
            "Revoked": true,
            "Reassigned": true,
            "Completed": true,
            "Signed": true,
            "Expired": true,
            "AuthenticationFailed": true,
            "Reminders": true,
            "AttachSignedDocument": false
          },
          "MetaData": {
            "AccountPlan": "Paid"
          },
          "Locale": "EN"
        }'
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var senderIdentityClient = new SenderIdentityClient(apiClient);

var senderIdentityRequest = new SenderIdentityRequest("Luther", "luthercooper@cubeflakes.com", null);
senderIdentityRequest.MetaData = new Dictionary<string, string>()
{
  ["accountPlan"] = "Paid"
};

senderIdentityClient.UpdateSenderIdentity(senderIdentityRequest);
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    
    sender_identities_api = boldsign.SenderIdentitiesApi(api_client) 
	
    sender_identity_request = boldsign.EditSenderIdentityRequest(name="Luther")
    
    sender_identities_api.update_sender_identities(email="luthercooper@cubeflakes.com", edit_sender_identity_request=sender_identity_request)
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\SenderIdentitiesApi;
use BoldSign\Model\EditSenderIdentityRequest;

$config = new Configuration();
$config->setApiKey('YOUR_API_KEY');

$sender_identities_api = new SenderIdentitiesApi($config);

$sender_identity_request = new EditSenderIdentityRequest();
$sender_identity_request->setName('Luther');

$sender_identities_api->updateSenderIdentities($email = 'luthercooper@cubeflakes.com', $sender_identity_request);
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
            
SenderIdentitiesApi senderIdentitiesApi = new SenderIdentitiesApi(client);

EditSenderIdentityRequest senderIdentityRequest = new EditSenderIdentityRequest();
senderIdentityRequest.setName("Luther");

senderIdentitiesApi.updateSenderIdentities("luthercooper@cubeflakes.com", senderIdentityRequest);
```

NodeJS

```js
import { SenderIdentitiesApi, EditSenderIdentityRequest } from "boldsign";

const senderIdentitiesApi = new SenderIdentitiesApi("https://api.boldsign.com");
senderIdentitiesApi.setApiKey("YOUR_API_KEY");

const senderIdentityRequest = new EditSenderIdentityRequest();
senderIdentityRequest.name = "Luther";

senderIdentitiesApi.updateSenderIdentities("luthercooper@cubeflakes.com", senderIdentityRequest);
```

{% /codetab %}

## Query parameters

{% nestedtable %}

- {% arguments name="email" /%}{% batch datatype="String" /%}{% required /%}
- Email address of the sender identity.

{% /nestedtable %}

## Request body

{% nestedtable %}

- {% arguments name="Name" /%}{% batch datatype="String" /%}
- Name of the sender identity.

---

- {% arguments name="RedirectUrl" /%}{% batch datatype="string" /%}
- The `redirectUrl` property specifies the destination URL to which the user will be automatically sent once they have completed the required action, whether they approve or reject the request.

---

- {% arguments name="NotificationSettings" /%}{% batch datatype="object" /%}
- Notification Settings of the sender identity.

  {% nestedtable %}

    - {% arguments name="Viewed" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the document is viewed.

    ---

    - {% arguments name="Sent" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the document is sent.

    ---

    - {% arguments name="DeliveryFailed" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the delivery is failed.

    ---

    - {% arguments name="Declined" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the document is declined.

    ---

    - {% arguments name="Revoked" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the document is revoked.

    ---

    - {% arguments name="Reassigned" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the document is reassigned.

    ---

    - {% arguments name="Completed" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the document is completed.

    ---

    - {% arguments name="Signed" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the document is signed.

    ---

    - {% arguments name="Expired" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the document is expired.

    ---

    - {% arguments name="AuthenticationFailed" /%}{% batch datatype="boolean" /%}
    - When it is enabled, an email will be automatically sent to the sender identity email address if the authentication is failed for the document.

    ---

    - {% arguments name="Reminders" /%}{% batch datatype="boolean" /%}
    - When it is enabled, all reminder email will be automatically sent to the sender identity email address.

    ---

    - {% arguments name="AttachSignedDocument" /%}{% batch datatype="boolean" /%}
    - When it is enabled, the email sent to the sender's identity address upon document completion will include the completed document, an audit trail, and a view document link. Note that it is applicable only if the `completed` option is enabled.

    {% /nestedtable %}

---

- {% arguments name="MetaData" /%}{% batch datatype="dictionary" /%}
- The metadata update operation performs a partial update for the sender identity metadata. If the metadata key is already present, it will be updated with the new value. If the metadata key is absent, it will be added to the sender identity. If the metadata value is empty for a key, it will be removed from the sender identity. Any existing metadata that is not included in the request will remain unchanged.

---
- {% arguments name="Locale" /%}{% batch datatype="string" /%}
- Configure the preferred language for your sender identity. This setting ensures that all associated emails and sender identity related pages are displayed in the specified language.

{% /nestedtable %}

**Notes:**
To successfully update the sender identity, your request must include at least one of the following parameters:

- `name`
- `redirectUrl`
- `metaData`
- `notificationSettings`
- `locale`

## Partial update

The metadata update always performs a partial update. If the metadata already exists, it will be updated with the new value. If the metadata does not exist, it will be added to the sender identity. If any of the existing metadata is not passed in the request, the existing key-value pairs will not be affected.

## Deleting metadata

The metadata can be removed by providing an empty string as the value for the key. This will eliminate the key-value pair from the sender identity metadata.

## Example response

***204 No content***
