> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# AssignSenderDetails

# Package: emails

# Namespace: AutomationEmailActionsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/emails/automation-email-action/assign-sender-details.md

## Permission Scopes:
Manage Email Marketing: SCOPE.DC-PROMOTE.EMAIL-MARKETING

## Introduction

Assigns sender details to an automation's send email action, replacing any previously assigned
sender details.

---

## REST API

### Schema

```
 Method: assignSenderDetails
 Description: Assigns sender details to an automation's send email action, replacing any previously assigned sender details.
 URL: https://www.wixapis.com/emails-automations/v1/automations/{automationId}/email-actions/{actionId}/sender-details
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  senderDetailsId
 Method parameters: 
   param name: senderDetailsId | type: senderDetailsId | description: GUID of the sender details to assign to the action. | required: true | validation: format GUID
 Return type: AssignSenderDetailsResponse
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NOT_AN_EMAIL_ACTION | Description: none
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: AUTOMATION_ACTION_NOT_FOUND | Description: none


```

### Examples

### Assign Sender Details
Assign sender details to an automation's send email action.

```curl
curl -X POST \
'https://www.wixapis.com/emails-automations/v1/automations/0029458c-a8e1-4d04-bd88-ad0af11cb678/email-actions/f6f72a5c-77ef-4672-ada1-83aa45de7f2c/sender-details' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "senderDetailsId": "3f9c1a2e-6b7d-4e8f-9a1b-5c2d3e4f5a6b"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.automationsEmailActions.automationEmailAction.assignSenderDetails(identifiers, senderDetailsId)
 Description: Assigns sender details to an automation's send email action, replacing any previously assigned sender details.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  identifiers.automationId, identifiers.actionId, senderDetailsId, identifiers
 Method parameters: 
   param name: identifiers | type: AssignSenderDetailsIdentifiers  none | required: true 
        - name: automationId | type: string | description: GUID of the automation the action belongs to. | required: true | validation: format GUID
        - name: actionId | type: string | description: GUID of the send email action within the automation. | required: true | validation: format GUID
   param name: senderDetailsId | type: string | description: GUID of the sender details to assign to the action. | required: true | validation: format GUID
 Return type: PROMISE<AssignSenderDetailsResponse>
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NOT_AN_EMAIL_ACTION | Description: none
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: AUTOMATION_ACTION_NOT_FOUND | Description: none


```

### Examples

### Assign sender details
Assign sender details to an automation's send email action.

```javascript
import { automationEmailAction } from "@wix/automations-email-actions";

async function assignSenderDetails() {
  const response = await automationEmailAction.assignSenderDetails(
    {
      automationId: "0029458c-a8e1-4d04-bd88-ad0af11cb678",
      actionId: "f6f72a5c-77ef-4672-ada1-83aa45de7f2c",
    },
    "3f9c1a2e-6b7d-4e8f-9a1b-5c2d3e4f5a6b",
  );
}

/* Promise resolves to: {} */

```

### assignSenderDetails (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { automationEmailAction } from '@wix/automations-email-actions';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { automationEmailAction },
  // Include the auth strategy and host as relevant
});


async function assignSenderDetails(identifiers,senderDetailsId) {
  const response = await myWixClient.automationEmailAction.assignSenderDetails(identifiers,senderDetailsId);
};
```

---