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

# Auto Generate Mailboxes

> Auto-generate professional mailbox email addresses for one or more domains

<Note>
  **Smart Senders API**: Mailbox marketplace feature. Contact [support@smartlead.ai](mailto:support@smartlead.ai) for access.
</Note>

## Query Parameters

<ParamField query="api_key" type="string" required>
  API key used to authenticate and authorize the request.
</ParamField>

## Body Parameters

<ParamField body="vendor_id" type="string" required>
  Unique identifier of the vendor whose mailbox generation logic will be used.
</ParamField>

<ParamField body="domains" type="object">
  List of domains for which mailboxes need to be generated.
</ParamField>

## Headers

<ParamField header="Content-Type" type="string">
  Must be `application/json`
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://smart-senders.smartlead.ai/api/v1/smart-senders/auto-generate-mailboxes?api_key=YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "vendor_id": "1",
      "domains": {
        "example.com": {
          "count": 3
        }
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  API_KEY = "YOUR_API_KEY"

  payload = {
      "vendor_id": "1",
      "domains": {
          "example.com": {
              "count": 3
          }
      }
  }

  response = requests.post(
      "https://smart-senders.smartlead.ai/api/v1/smart-senders/auto-generate-mailboxes",
      params={"api_key": API_KEY},
      json=payload
  )

  result = response.json()
  print(result)
  ```

  ```javascript JavaScript theme={null}
  const API_KEY = 'YOUR_API_KEY';

  const payload = {
    vendor_id: '1',
    domains: {
      'example.com': {
        count: 3
      }
    }
  };

  const response = await fetch(
    `https://smart-senders.smartlead.ai/api/v1/smart-senders/auto-generate-mailboxes?api_key=${API_KEY}`,
    {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(payload)
    }
  );

  const result = await response.json();
  console.log(result);
  ```
</RequestExample>

## Response Codes

<ResponseField name="200" type="Success">
  Returns auto-generated mailbox email addresses for the requested domains.
</ResponseField>

<ResponseField name="400" type="Bad Request">
  Invalid request parameters or malformed request body
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Invalid or missing API key. Check your authentication.
</ResponseField>

<ResponseField name="500" type="Internal Server Error">
  Server error occurred. Please try again or contact support if the issue persists.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "ok": true,
    "data": []
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "message": "Invalid API Key"
  }
  ```
</ResponseExample>
