> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emailbison.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding and Removing Sender Emails

## Adding Sender Emails

Send a `POST` request to the [following endpoint](https://dedi.emailbison.com/api/reference#tag/campaigns/post/api/campaigns/\{campaign_id}/attach-sender-emails).

```bash theme={null}
/api/campaigns/{campaign_id}/attach-sender-emails
```

The request takes 1 required body parameter:

<ParamField body="sender_email_ids" type="array" required>
  An array containing the IDs of the sender emails to add
</ParamField>

An example of this request:

<CodeGroup>
  ```bash curl theme={null}
  curl 'https://dedi.emailbison.com/api/campaigns/6/attach-sender-emails' \
    --request POST \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
    --data '{
    "sender_email_ids": [1,2,3]
  }'
  ```

  ```JavaScript JavaScript theme={null}
  fetch('https://dedi.emailbison.com/api/campaigns/6/attach-sender-emails', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer YOUR_SECRET_TOKEN'
    },
    body: JSON.stringify({
      sender_email_ids: [1, 2, 3]
    })
  })
  ```

  ```Python Python theme={null}
  headers = {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_SECRET_TOKEN',
  }

  json_data = {
      'sender_email_ids': [1,2,3,],
  }

  response = requests.post('https://dedi.emailbison.com/api/campaigns/6/attach-sender-emails', headers=headers, json=json_data)
  ```
</CodeGroup>

## Removing Sender Emails

Send a `DELETE` request to the [following endpoint](https://dedi.emailbison.com/api/reference#tag/campaigns/delete/api/campaigns/\{campaign_id}/remove-sender-emails).

```bash theme={null}
/api/campaigns/{campaign_id}/remove-sender-emails
```

The request takes 1 required body parameter:

<ParamField body="sender_email_ids" type="array" required>
  An array containing the IDs of the sender emails to add
</ParamField>

An example of this request:

<CodeGroup>
  ```bash curl theme={null}
  curl 'https://dedi.emailbison.com/api/campaigns/6/remove-sender-emails' \
    --request POST \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
    --data '{
    "sender_email_ids": [1,2,3]
  }'
  ```

  ```JavaScript JavaScript theme={null}
  fetch('https://dedi.emailbison.com/api/campaigns/6/remove-sender-emails', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer YOUR_SECRET_TOKEN'
    },
    body: JSON.stringify({
      sender_email_ids: [1, 2, 3]
    })
  })
  ```

  ```Python Python theme={null}
  headers = {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_SECRET_TOKEN',
  }

  json_data = {
      'sender_email_ids': [1,2,3,],
  }

  response = requests.post('https://dedi.emailbison.com/api/campaigns/6/remove-sender-emails', headers=headers, json=json_data)
  ```
</CodeGroup>
