---
title: "EventWolf API: Config"
description: "Get the config or update the config, with the EventWolf API."
url: "https://agentpost.tools/docs/eventwolf/reference/config"
kind: reference
---

# Config

The project’s one versioned config: whether unknown event types are accepted, the most data an event may hold, the delivery timeout and retry schedule, how long records are kept, and for push whether EventWolf sets the badge, the retry schedule, and the Expo access token, which is never returned.

[Deliveries](/docs/eventwolf/concepts/deliveries.md#retries) explains the retry schedule, and [Event types](/docs/eventwolf/concepts/event-types.md#unknown-types) what accepting or rejecting unknown types means.

Paths are relative to `https://api.agentpost.tools/v1/events`, and every request follows the [API basics](/docs/platform/api-basics.md). [Who may call](/docs/eventwolf/reference.md#who-may-call) explains each kind of caller.

## Get the config

`GET /config`

The current config and its version.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `config` | [`ConfigRecord`](/docs/eventwolf/reference/config.md#the-configrecord-object) | Always |  |

### Errors

Only the codes any operation can answer with, which [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/events/config \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "config": {
    "ingest": {
      "unknownTypes": "accept",
      "maxDataBytes": 65536
    },
    "delivery": {
      "timeout": "15s",
      "retrySchedule": ["5s", "5m", "30m", "2h", "5h", "10h", "10h"],
      "disableAfterFailing": "5d"
    },
    "retention": {
      "events": "forever",
      "deliveries": "90d",
      "ingestFailures": "30d",
      "notifications": "180d"
    },
    "push": {
      "badge": true,
      "retrySchedule": ["30s", "5m", "30m"],
      "expo": {
        "hasAccessToken": false
      }
    },
    "version": 3,
    "updatedAt": "2026-11-02T14:05:00.000Z",
    "updatedBy": "key:backend"
  }
}
```

## Update the config

`PUT /config`

Replaces the config. Send every setting except `push.expo`, which you can omit to keep the stored access token. EventWolf answers `config_invalid` if a required setting is missing. To guard against changes since you read the config, send the version you read in the optional `If-Match` header. If the version has changed, EventWolf answers `stale_version`.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.
-   **If-Match:** Optional. The config `version` you read, as a number.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ingest` | `object` | Yes |  |
| `ingest.unknownTypes` | `"accept"` or `"reject"` | Yes | `accept` takes an event whose type isn’t registered; `reject` refuses it, with `unknown_type`. |
| `ingest.maxDataBytes` | `integer` | Yes | The most bytes an event’s `data` may hold, from 1024 to 1048576; 1024–1048576. |
| `delivery` | `object` | Yes |  |
| `delivery.timeout` | `string` | Yes | How long an attempt waits for the receiver’s answer: a duration from `"1s"` to `"60s"`. |
| `delivery.retrySchedule` | `string[]` | Yes | The wait before each retry after a failed attempt, as durations; the first attempt goes at once. A delivery is failed when an attempt fails with no retry left. `[]` makes one attempt only; up to 19 items. |
| `delivery.disableAfterFailing` | `string` | Yes | An endpoint with no success for this long is disabled: a duration from `"1d"` to `"365d"`. |
| `retention` | `object` | Yes |  |
| `retention.events` | `"forever"` or `string` | Yes | How long an event is kept after EventWolf received it: `"forever"`, or a duration of at least `"1d"`. |
| `retention.deliveries` | `"forever"` or `string` | Yes | How long a delivery is kept after it finished, with its attempts: `"forever"`, or a duration of at least `"1d"`. |
| `retention.ingestFailures` | `"forever"` or `string` | Yes | How long an ingestion failure is kept: `"forever"`, or a duration of at least `"1d"`. |
| `retention.notifications` | `"forever"` or `string` | Yes | How long a notification is kept after it was made: `"forever"`, or a duration of at least `"1d"`. |
| `push` | `object` | Yes |  |
| `push.badge` | `boolean` | Yes | `true` sets the app icon’s badge on each push to the recipient’s unseen notifications on that device. `false` sends pushes with no badge, so the app keeps the badge itself. |
| `push.retrySchedule` | `string[]` | Yes | The wait before each retry after a send that failed and is worth another try, such as a rate limit, as durations; the first send goes at once. `[]` sends once only; up to 19 items. |
| `push.expo` | `object` | No | The Expo credential. Leave it out to keep the access token stored. |
| `push.expo.accessToken` | `string` or `null` | No | Your Expo access token, which Expo asks for when your Expo project turns on enhanced push security. Stored encrypted and never returned: the config shows only whether one is set. Leave it out to keep the one stored, or send `null` to remove it. |
| `push.expo.hasAccessToken` | `boolean` | No | Read only: whether an access token is stored. Accepted and ignored, so a config you read can be put back as it is. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `config` | [`ConfigRecord`](/docs/eventwolf/reference/config.md#the-configrecord-object) | Always |  |

### Errors

-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)
-   [`config_invalid`](/docs/eventwolf/errors.md#config_invalid) (422)
-   [`stale_version`](/docs/eventwolf/errors.md#stale_version) (409)
-   [`payload_too_large`](/docs/eventwolf/errors.md#payload_too_large) (413)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X PUT https://api.agentpost.tools/v1/events/config \
  -H "Authorization: Bearer sk_test_…" \
  -H "If-Match: 3" \
  -H "Content-Type: application/json" \
  -d '{
    "ingest": {
      "unknownTypes": "reject",
      "maxDataBytes": 65536
    },
    "delivery": {
      "timeout": "15s",
      "retrySchedule": [
        "5s",
        "5m",
        "30m",
        "2h",
        "5h",
        "10h",
        "10h"
      ],
      "disableAfterFailing": "5d"
    },
    "retention": {
      "events": "forever",
      "deliveries": "90d",
      "ingestFailures": "30d",
      "notifications": "180d"
    },
    "push": {
      "badge": true,
      "retrySchedule": [
        "30s",
        "5m",
        "30m"
      ]
    }
  }'
```

```json title="Response"
{
  "config": {
    "ingest": {
      "unknownTypes": "reject",
      "maxDataBytes": 65536
    },
    "delivery": {
      "timeout": "15s",
      "retrySchedule": ["5s", "5m", "30m", "2h", "5h", "10h", "10h"],
      "disableAfterFailing": "5d"
    },
    "retention": {
      "events": "forever",
      "deliveries": "90d",
      "ingestFailures": "30d",
      "notifications": "180d"
    },
    "push": {
      "badge": true,
      "retrySchedule": ["30s", "5m", "30m"],
      "expo": {
        "hasAccessToken": false
      }
    },
    "version": 4,
    "updatedAt": "2026-11-13T09:30:00.000Z",
    "updatedBy": "key:backend"
  }
}
```

## The ConfigRecord object

A config in the API’s answer: the settings, their version, and who last changed them.

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `ingest` | `object` | Always |  |
| `ingest.unknownTypes` | `"accept"` or `"reject"` | Always | `accept` takes an event whose type isn’t registered; `reject` refuses it, with `unknown_type`. |
| `ingest.maxDataBytes` | `integer` | Always | The most bytes an event’s `data` may hold, from 1024 to 1048576; 1024–1048576. |
| `delivery` | `object` | Always |  |
| `delivery.timeout` | `string` | Always | How long an attempt waits for the receiver’s answer: a duration from `"1s"` to `"60s"`. |
| `delivery.retrySchedule` | `string[]` | Always | The wait before each retry after a failed attempt, as durations; the first attempt goes at once. A delivery is failed when an attempt fails with no retry left. `[]` makes one attempt only; up to 19 items. |
| `delivery.disableAfterFailing` | `string` | Always | An endpoint with no success for this long is disabled: a duration from `"1d"` to `"365d"`. |
| `retention` | `object` | Always |  |
| `retention.events` | `"forever"` or `string` | Always | How long an event is kept after EventWolf received it: `"forever"`, or a duration of at least `"1d"`. |
| `retention.deliveries` | `"forever"` or `string` | Always | How long a delivery is kept after it finished, with its attempts: `"forever"`, or a duration of at least `"1d"`. |
| `retention.ingestFailures` | `"forever"` or `string` | Always | How long an ingestion failure is kept: `"forever"`, or a duration of at least `"1d"`. |
| `retention.notifications` | `"forever"` or `string` | Always | How long a notification is kept after it was made: `"forever"`, or a duration of at least `"1d"`. |
| `push` | `object` | Always | The push settings as the config shows them: never a credential, only whether one is set. |
| `push.badge` | `boolean` | Always | Whether a push sets the app icon’s badge. |
| `push.retrySchedule` | `string[]` | Always | The wait before each retry of a push, as durations. |
| `push.expo` | `object` | Always |  |
| `push.expo.hasAccessToken` | `boolean` | Always |  |
| `version` | `number` | Always |  |
| `updatedAt` | `string` | Always |  |
| `updatedBy` | `string` | Always |  |

```json title="The ConfigRecord object"
{
  "ingest": {
    "unknownTypes": "accept",
    "maxDataBytes": 65536
  },
  "delivery": {
    "timeout": "15s",
    "retrySchedule": ["5s", "5m", "30m", "2h", "5h", "10h", "10h"],
    "disableAfterFailing": "5d"
  },
  "retention": {
    "events": "forever",
    "deliveries": "90d",
    "ingestFailures": "30d",
    "notifications": "180d"
  },
  "push": {
    "badge": true,
    "retrySchedule": ["30s", "5m", "30m"],
    "expo": {
      "hasAccessToken": false
    }
  },
  "version": 3,
  "updatedAt": "2026-11-02T14:05:00.000Z",
  "updatedBy": "key:backend"
}
```
