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

# Configure Warmup

> Update warmup settings for an active warmup

## Path Parameters

<ParamField path="accountId" type="string" required>
  The unique account identifier.
</ParamField>

## Request Body

<ParamField body="duration" type="number">
  Update number of days for the warmup process (3-14 days).
</ParamField>

<ParamField body="keywords" type="array">
  Update keywords for content discovery.
</ParamField>

## Response

<ResponseField name="accountId" type="string">
  The account identifier.
</ResponseField>

<ResponseField name="platform" type="string">
  Platform: `tiktok` or `instagram`.
</ResponseField>

<ResponseField name="warmupStatus" type="object">
  Updated warmup configuration.

  <Expandable title="properties">
    <ResponseField name="enabled" type="boolean">
      Whether warmup is currently active.
    </ResponseField>

    <ResponseField name="startedAt" type="string">
      ISO 8601 timestamp of when warmup started.
    </ResponseField>

    <ResponseField name="completionDate" type="string">
      ISO 8601 timestamp of when warmup is expected to complete.
    </ResponseField>

    <ResponseField name="duration" type="number">
      Total duration in days.
    </ResponseField>

    <ResponseField name="keywords" type="array">
      Keywords being used for content discovery.
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      ISO 8601 timestamp of when configuration was updated.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.infinipost.co/v1/accounts/acc_1a2b3c4d5e/warmup/configure \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "keywords": ["streetwear", "sneakers", "hypebeast"],
      "duration": 10
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.infinipost.co/v1/accounts/acc_1a2b3c4d5e/warmup/configure', {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      keywords: ['streetwear', 'sneakers', 'hypebeast'],
      duration: 10
    })
  });

  const data = await response.json();
  ```

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

  response = requests.patch(
      'https://api.infinipost.co/v1/accounts/acc_1a2b3c4d5e/warmup/configure',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'keywords': ['streetwear', 'sneakers', 'hypebeast'],
          'duration': 10
      }
  )

  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "accountId": "acc_1a2b3c4d5e",
    "platform": "tiktok",
    "warmupStatus": {
      "enabled": true,
      "startedAt": "2024-04-21T20:00:00Z",
      "completionDate": "2024-05-01T20:00:00Z",
      "duration": 10,
      "keywords": ["streetwear", "sneakers", "hypebeast"],
      "updatedAt": "2024-04-23T20:10:00Z"
    }
  }
  ```
</ResponseExample>

<Info>
  Changes to warmup configuration take effect immediately but won't retroactively affect completed days.
</Info>

## Error Responses

```json Unauthorized theme={null}
{
  "error": {
    "code": "unauthenticated",
    "message": "Invalid or missing API key"
  }
}
```

```json Account Not Found theme={null}
{
  "error": {
    "code": "not_found",
    "message": "Account acc_1a2b3c4d5e not found"
  }
}
```

```json Warmup Not Active theme={null}
{
  "error": {
    "code": "warmup_not_active",
    "message": "No active warmup found for this account"
  }
}
```

```json Invalid Duration theme={null}
{
  "error": {
    "code": "invalid_parameter",
    "message": "Duration must be between 3 and 14 days"
  }
}
```

```json Server Error theme={null}
{
  "error": {
    "code": "internal",
    "message": "An unexpected error occurred"
  }
}
```
