Skip to content
Agentpost robot in sunglasses on a red circleAgentpost

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 explains the retry schedule, and Event 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. 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 Always

Errors

Only the codes any operation can answer with, which Conventions lists.

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 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 Always

Errors

Any operation can also answer with the codes Conventions lists.

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