# POST /v4/credits/estimate

_Merkl API_

Estimate the credit cost of a points campaign's next run, mirroring the engine pre-check. Returns `estimatedCost` (pro-rated over the next run window, capped at 1 week) and `threshold` (= max(estimatedCost, BASE_COST_PER_WEEK), the minimum balance required for the pre-check to pass).

## Request body

**`application/json`**
```json
{
  "type": "object",
  "properties": {
    "startTimestamp": {
      "description": "Campaign start timestamp (unix seconds)",
      "type": "number"
    },
    "endTimestamp": {
      "description": "Campaign end timestamp (unix seconds)",
      "type": "number"
    },
    "computedUntil": {
      "description": "Last computed-until timestamp (unix seconds). Defaults to startTimestamp.",
      "type": "number"
    },
    "recipientCount": {
      "minimum": 0,
      "description": "Expected recipient count",
      "type": "number"
    }
  },
  "required": [
    "startTimestamp",
    "endTimestamp"
  ]
}
```
**`application/x-www-form-urlencoded`**
```json
{
  "type": "object",
  "properties": {
    "startTimestamp": {
      "description": "Campaign start timestamp (unix seconds)",
      "type": "number"
    },
    "endTimestamp": {
      "description": "Campaign end timestamp (unix seconds)",
      "type": "number"
    },
    "computedUntil": {
      "description": "Last computed-until timestamp (unix seconds). Defaults to startTimestamp.",
      "type": "number"
    },
    "recipientCount": {
      "minimum": 0,
      "description": "Expected recipient count",
      "type": "number"
    }
  },
  "required": [
    "startTimestamp",
    "endTimestamp"
  ]
}
```
**`multipart/form-data`**
```json
{
  "type": "object",
  "properties": {
    "startTimestamp": {
      "description": "Campaign start timestamp (unix seconds)",
      "type": "number"
    },
    "endTimestamp": {
      "description": "Campaign end timestamp (unix seconds)",
      "type": "number"
    },
    "computedUntil": {
      "description": "Last computed-until timestamp (unix seconds). Defaults to startTimestamp.",
      "type": "number"
    },
    "recipientCount": {
      "minimum": 0,
      "description": "Expected recipient count",
      "type": "number"
    }
  },
  "required": [
    "startTimestamp",
    "endTimestamp"
  ]
}
```

## Example request

```bash
curl -X POST "https://api.merkl.xyz//v4/credits/estimate" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```