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

# Update Domain

> Update domain configuration

## Description

Update the configuration of an existing domain.

## Parameters

<ParamField path="identifier" type="string" required>
  Domain ID or name.
</ParamField>

<ParamField body="config" type="object">
  Domain configuration:

  * `sending` (boolean): Enable/disable sending
  * `inbound` (boolean): Enable/disable receiving
</ParamField>

<ParamField body="tracking" type="object">
  Tracking settings:

  * `open_tracking` (boolean): Track opens
  * `click_tracking` (boolean): Track clicks
</ParamField>

## Response

<ResponseField name="id" type="string">
  Updated domain ID.
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.usesendly.app/v1/domains/mail.yourdomain.com \
    -H "Authorization: Bearer se_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "tracking": {
        "open_tracking": true,
        "click_tracking": true
      }
    }'
  ```

  ```javascript SDK theme={null}
  await client.domains.update('mail.yourdomain.com', {
    tracking: {
      open_tracking: true,
      click_tracking: true
    }
  })

  console.log('Tracking enabled')
  ```

  ```javascript SMTP theme={null}
  import { Sendly } from '@sendlyapp/sdk'

  const client = new Sendly()
  await client.domains.update('mail.yourdomain.com', {
    config: {
      sending: true,
      inbound: false
    }
  })
  ```
</CodeGroup>

***

Need help? Contact [support@usesendly.app](mailto:support@usesendly.app)
