> ## 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.

# Create Automated Placement Test

> Create automated recurring spam test with scheduled monitoring

<Note>
  **Smart Delivery API**: This is part of SmartLead's deliverability testing suite. Contact [support@smartlead.ai](mailto:support@smartlead.ai) for access and API details.
</Note>

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://smartdelivery.smartlead.ai/api/v1/spam-test/schedule?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```

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

  API_KEY = "YOUR_API_KEY"

  response = requests.post(
      "https://smartdelivery.smartlead.ai/api/v1/spam-test/schedule",
      params={"api_key": API_KEY},
      json={}
  )

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

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

  const response = await fetch(
    `https://smartdelivery.smartlead.ai/api/v1/spam-test/schedule?api_key=${API_KEY}`,
    {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({})
    }
  );

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

## Response Codes

<ResponseField name="200" type="Success">
  Request successful
</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="404" type="Not Found">
  The requested resource (campaign, lead, email account, etc.) does not exist or you don't have access to it
</ResponseField>

<ResponseField name="422" type="Validation Error">
  Request validation failed. Check parameter types, required fields, and value constraints.
</ResponseField>

<ResponseField name="429" type="Rate Limit Exceeded">
  Too many requests. Please slow down and retry after the rate limit resets.
</ResponseField>

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

<ResponseField name="503" type="Service Unavailable">
  API is temporarily unavailable or under maintenance. Please try again later.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "created_at": "2026-03-15T14:30:00Z",
    "updated_at": "2026-03-15T14:30:00Z",
    "id": "test_888888",
    "test_name": "Automated Recurring Test",
    "description": "Weekly automated deliverability monitoring",
    "spam_filters": true,
    "link_checker": true,
    "campaign_id": "camp_234567",
    "sequence_mapping_id": "seq_890123",
    "all_email_sent_without_time_gap": true,
    "min_time_btwn_emails": 60,
    "min_time_unit": "minutes",
    "is_warmup": false,
    "test_with_sl_account": true,
    "has_seed_mapping": true,
    "status": "active",
    "user_id": "user_567890",
    "test_type": "automated",
    "email_track_id": "track_432109",
    "provider_id": "outlook_eu",
    "schedule_start_time": "2026-03-15T10:00:00Z",
    "test_end_date": "2026-06-15T10:00:00Z",
    "every_days": 7,
    "scheduler_cron_value": "0 10 * * 0"
  }
  ```

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

  ```json 404 - Not Found theme={null}
  {
    "error": "Resource not found"
  }
  ```

  ```json 422 - Validation Error theme={null}
  {
    "error": "Invalid parameters provided"
  }
  ```
</ResponseExample>
