> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/tenant-configuration/automations.md).

# Automations

## List automations

> Returns every automation, enabled or not, in declaration order. Unpaged.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"Automation":{"required":["id","trigger","type"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"Unique within the tenant, immutable. Letters, digits, `_`, `-`; up to 200 characters."},"displayName":{"type":["null","string"],"description":"Label shown in the admin, up to 200 characters."},"type":{"minLength":1,"type":"string","description":"Task type, e.g. `wallet.pushUpdates`; must be available to the tenant. Decides the shape of Neo.Web.Api.Scheduler.Controllers.Automation.Settings."},"isEnabled":{"type":"boolean","description":"Whether it fires. A disabled automation is kept but does not run. Defaults to `true`.","default":true},"trigger":{"oneOf":[{"description":"Fires on a cron schedule.","$ref":"#/components/schemas/AutomationRecurrenceTrigger"},{"$ref":"#/components/schemas/AutomationFixedDateTrigger"},{"$ref":"#/components/schemas/AutomationDateRelativeTrigger"},{"$ref":"#/components/schemas/AutomationEventTrigger"}],"description":"When the automation fires."},"settings":{"type":["null","object"],"additionalProperties":{},"description":"Type-specific configuration, validated against Neo.Web.Api.Scheduler.Controllers.Automation.Type on write: undeclared keys, wrong\ntypes and unknown pass templates, themes or benefit templates give a 400. Omitted applies defaults."},"actions":{"type":"array","items":{"type":"string"},"description":"What it does to each matching pass: `applyBenefitTemplate`, `updateData`, `changePassType`,\n`applyTheme`, `notify`. Derived from Neo.Web.Api.Scheduler.Controllers.Automation.Settings; read-only."},"tags":{"type":"array","items":{"type":"string"},"description":"Labels to filter and group in the admin. At most 20 tags of 50 characters; trimmed, blanks dropped,\ncase-insensitive duplicates kept once."},"creationDate":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"Creation time in UTC, server-set. `null` if not created through this API. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."},"lastModificationDate":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"Last write through this API, in UTC, server-set. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."}},"additionalProperties":false,"description":"One automation."},"AutomationRecurrenceTrigger":{"required":["scheduleExpression","type"],"type":"object","allOf":[{"description":"When an automation fires. Discriminated by `type`.","$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"scheduleExpression":{"minLength":1,"type":"string","description":"Six-field cron expression (seconds first) in UTC, e.g. `0 0 9 * * *` for daily 09:00. An optional\ntrailing year limits it to that year. A new or changed expression with occurrences under five minutes\napart is refused."},"type":{"enum":["recurrence"],"type":"string","description":"Discriminator. Always `recurrence` for this shape."}},"additionalProperties":false,"description":"Fires on a cron schedule."},"AutomationTrigger":{"type":"object","properties":{"monitoringPeriod":{"oneOf":[{"description":"Runs until disabled or deleted.","$ref":"#/components/schemas/AutomationUntilStoppedMonitoringPeriod"},{"$ref":"#/components/schemas/AutomationUntilDateMonitoringPeriod"},{"$ref":"#/components/schemas/AutomationUntilBenefitTemplateEndMonitoringPeriod"},{"type":"null"}],"description":"When the automation stops; omitted means until disabled or deleted. Required on a continuous\n`fixedDate` trigger, refused on a snapshot one."}},"description":"When an automation fires. Discriminated by `type`."},"AutomationUntilStoppedMonitoringPeriod":{"required":["mode"],"type":"object","allOf":[{"description":"When a trigger stops. Discriminated by `mode`.","$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"mode":{"enum":["untilStopped"],"type":"string","description":"Discriminator. Always `untilStopped` for this shape."}},"additionalProperties":false,"description":"Runs until disabled or deleted."},"AutomationMonitoringPeriod":{"type":"object","description":"When a trigger stops. Discriminated by `mode`."},"AutomationUntilDateMonitoringPeriod":{"required":["endDate","mode"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"endDate":{"type":"string","description":"When the automation stops. Must be in the future on create, and after `runAt` on a `fixedDate` trigger.","format":"date-time"},"mode":{"enum":["untilDate"],"type":"string","description":"Discriminator. Always `untilDate` for this shape."}},"additionalProperties":false,"description":"Stops at Neo.Web.Api.Scheduler.Controllers.AutomationUntilDateMonitoringPeriod.EndDate."},"AutomationUntilBenefitTemplateEndMonitoringPeriod":{"required":["mode"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"mode":{"enum":["untilBenefitTemplateEnd"],"type":"string","description":"Discriminator. Always `untilBenefitTemplateEnd` for this shape."}},"additionalProperties":false,"description":"Stops when the benefit template's validity ends. Only for tasks with `settings.benefitTemplateId`\nwhose template has a fixed end date; else 400."},"AutomationFixedDateTrigger":{"required":["runAt","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"runAt":{"type":"string","description":"When it fires. A new or changed value must be in the future.","format":"date-time"},"audienceEvaluationMode":{"description":"`snapshot` evaluates the audience once at `runAt`; `continuous` keeps applying to newly\n            matching passes while `monitoringPeriod` is open. Defaults to `snapshot`.","default":"snapshot","$ref":"#/components/schemas/AudienceEvaluationMode"},"type":{"enum":["fixedDate"],"type":"string","description":"Discriminator. Always `fixedDate` for this shape."}},"additionalProperties":false,"description":"Fires once, at an instant."},"AudienceEvaluationMode":{"enum":["snapshot","continuous"],"type":"string","description":"Whether a Neo.Runtime.Scheduler.Configuration.FixedDateTrigger acts only on the passes matching at Neo.Runtime.Scheduler.Configuration.FixedDateTrigger.RunAt,\nor also on passes that come to match later."},"AutomationDateRelativeTrigger":{"required":["direction","offset","referenceField","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"referenceField":{"minLength":1,"type":"string","description":"Pass data field the moment is computed from, e.g. `birthDate`. Must be a `datetime` on at\nleast one pass template."},"direction":{"description":"Fires before or after the reference field.","$ref":"#/components/schemas/AutomationTriggerDirection"},"offset":{"description":"Distance from the reference field.","$ref":"#/components/schemas/AutomationTriggerOffset"},"pinnedTime":{"description":"Snaps the moment to this time of day in its timezone. Omitted keeps the computed time.","$ref":"#/components/schemas/AutomationPinnedTime"},"type":{"enum":["dateRelative"],"type":"string","description":"Discriminator. Always `dateRelative` for this shape."}},"additionalProperties":false,"description":"Fires per pass, relative to one of its date fields."},"AutomationTriggerDirection":{"enum":["before","after"],"type":"string","description":"Side of the reference field a trigger fires on."},"AutomationTriggerOffset":{"required":["unit","value"],"type":"object","properties":{"value":{"maximum":2147483647,"minimum":0,"type":"integer","description":"Number of units, not negative.","format":"int32"},"unit":{"description":"Unit of Neo.Web.Api.Scheduler.Controllers.AutomationTriggerOffset.Value.","$ref":"#/components/schemas/AutomationOffsetUnit"}},"additionalProperties":false,"description":"A duration in a chosen unit."},"AutomationOffsetUnit":{"enum":["minutes","hours","days","weeks"],"type":"string","description":"Offset unit."},"AutomationPinnedTime":{"required":["hour","timezone"],"type":"object","properties":{"hour":{"minLength":1,"type":"string","description":"Time of day as 24-hour `HH:mm`, e.g. `09:30`."},"timezone":{"minLength":1,"type":"string","description":"IANA timezone id, e.g. `Europe/Paris`."}},"additionalProperties":false,"description":"A wall-clock time in a timezone."},"AutomationEventTrigger":{"required":["settings","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"settings":{"oneOf":[{"description":"A pass is installed on a device.","$ref":"#/components/schemas/AutomationPassInstalledEventSettings"},{"$ref":"#/components/schemas/AutomationBenefitRedeemedEventSettings"},{"$ref":"#/components/schemas/AutomationMetadataChangedEventSettings"}],"description":"Event and its conditions."},"type":{"enum":["event"],"type":"string","description":"Discriminator. Always `event` for this shape."}},"additionalProperties":false,"description":"Fires per pass on a pass event."},"AutomationPassInstalledEventSettings":{"required":["condition","type"],"type":"object","allOf":[{"description":"Pass event to react to. Discriminated by `type`.","$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"condition":{"description":"First install only, or every install.","$ref":"#/components/schemas/PassInstalledCondition"},"offset":{"description":"Delay after the install. Omitted means shortly after.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Pass:Installed"],"type":"string","description":"Discriminator. Always `Pass:Installed` for this shape."}},"additionalProperties":false,"description":"A pass is installed on a device."},"AutomationEventSettings":{"type":"object","description":"Pass event to react to. Discriminated by `type`."},"PassInstalledCondition":{"enum":["firstInstallationOnly","anyInstallation"],"type":"string","description":"Controls when a Neo.Runtime.Scheduler.Configuration.PassInstalledSettings trigger fires relative to installs."},"AutomationBenefitRedeemedEventSettings":{"required":["direction","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"benefitTemplates":{"type":"array","items":{"description":"One watched benefit template.","$ref":"#/components/schemas/AutomationBenefitTemplateSelection"},"description":"Templates to watch. Empty or omitted means all."},"options":{"description":"Conditions for templates that declare none, and for all when Neo.Web.Api.Scheduler.Controllers.AutomationBenefitRedeemedEventSettings.BenefitTemplates is empty.","$ref":"#/components/schemas/AutomationBenefitTemplateSelectionOptions"},"direction":{"description":"Redemption (negative value), award (positive value), or either.","$ref":"#/components/schemas/MovementDirection"},"offset":{"description":"Delay after the movement. Omitted means shortly after.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Benefit:MovementApplied"],"type":"string","description":"Discriminator. Always `Benefit:MovementApplied` for this shape."}},"additionalProperties":false,"description":"A movement (redemption, award or either) on a benefit issued by a benefit template."},"AutomationBenefitTemplateSelection":{"required":["benefitTemplateId"],"type":"object","properties":{"benefitTemplateId":{"minLength":1,"type":"string","description":"Benefit template id. Not blank, not repeated in `benefitTemplates`."},"options":{"description":"Conditions for this template. Omitted falls back to the settings-level options.","$ref":"#/components/schemas/AutomationBenefitTemplateSelectionOptions"}},"additionalProperties":false,"description":"One watched benefit template."},"AutomationBenefitTemplateSelectionOptions":{"type":"object","properties":{"whenFullyRedeemed":{"type":"boolean","description":"Fire only when the movement brings the benefit's total value to zero. Defaults to `false`."}},"additionalProperties":false,"description":"Extra conditions on a watched benefit template."},"MovementDirection":{"enum":["redemption","award","any"],"type":"string","description":"Which movements on a benefit-template-issued benefit an Neo.Runtime.Scheduler.Configuration.BenefitRedeemedSettings trigger reacts to."},"AutomationMetadataChangedEventSettings":{"required":["key","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"key":{"minLength":1,"type":"string","description":"Metadata key to watch."},"offset":{"description":"Delay after the change. Omitted means the same update.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Pass:MetadataChanged"],"type":"string","description":"Discriminator. Always `Pass:MetadataChanged` for this shape."}},"additionalProperties":false,"description":"A pass metadata key's value appears, changes or disappears."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations":{"get":{"tags":["Automations"],"summary":"List automations","description":"Returns every automation, enabled or not, in declaration order. Unpaged.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Automations returned.","content":{"text/plain":{"schema":{"type":"array","items":{"description":"One automation.","$ref":"#/components/schemas/Automation"}}},"application/json":{"schema":{"type":"array","items":{"description":"One automation.","$ref":"#/components/schemas/Automation"}}},"text/json":{"schema":{"type":"array","items":{"description":"One automation.","$ref":"#/components/schemas/Automation"}}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:read</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Create automation

> The id is unique within the tenant and immutable. The automation is live at once; send\
> \`isEnabled: false\` to stage it. Emits \`Automation:Created\`.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:write"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"Automation":{"required":["id","trigger","type"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"Unique within the tenant, immutable. Letters, digits, `_`, `-`; up to 200 characters."},"displayName":{"type":["null","string"],"description":"Label shown in the admin, up to 200 characters."},"type":{"minLength":1,"type":"string","description":"Task type, e.g. `wallet.pushUpdates`; must be available to the tenant. Decides the shape of Neo.Web.Api.Scheduler.Controllers.Automation.Settings."},"isEnabled":{"type":"boolean","description":"Whether it fires. A disabled automation is kept but does not run. Defaults to `true`.","default":true},"trigger":{"oneOf":[{"description":"Fires on a cron schedule.","$ref":"#/components/schemas/AutomationRecurrenceTrigger"},{"$ref":"#/components/schemas/AutomationFixedDateTrigger"},{"$ref":"#/components/schemas/AutomationDateRelativeTrigger"},{"$ref":"#/components/schemas/AutomationEventTrigger"}],"description":"When the automation fires."},"settings":{"type":["null","object"],"additionalProperties":{},"description":"Type-specific configuration, validated against Neo.Web.Api.Scheduler.Controllers.Automation.Type on write: undeclared keys, wrong\ntypes and unknown pass templates, themes or benefit templates give a 400. Omitted applies defaults."},"actions":{"type":"array","items":{"type":"string"},"description":"What it does to each matching pass: `applyBenefitTemplate`, `updateData`, `changePassType`,\n`applyTheme`, `notify`. Derived from Neo.Web.Api.Scheduler.Controllers.Automation.Settings; read-only."},"tags":{"type":"array","items":{"type":"string"},"description":"Labels to filter and group in the admin. At most 20 tags of 50 characters; trimmed, blanks dropped,\ncase-insensitive duplicates kept once."},"creationDate":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"Creation time in UTC, server-set. `null` if not created through this API. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."},"lastModificationDate":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"Last write through this API, in UTC, server-set. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."}},"additionalProperties":false,"description":"One automation."},"AutomationRecurrenceTrigger":{"required":["scheduleExpression","type"],"type":"object","allOf":[{"description":"When an automation fires. Discriminated by `type`.","$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"scheduleExpression":{"minLength":1,"type":"string","description":"Six-field cron expression (seconds first) in UTC, e.g. `0 0 9 * * *` for daily 09:00. An optional\ntrailing year limits it to that year. A new or changed expression with occurrences under five minutes\napart is refused."},"type":{"enum":["recurrence"],"type":"string","description":"Discriminator. Always `recurrence` for this shape."}},"additionalProperties":false,"description":"Fires on a cron schedule."},"AutomationTrigger":{"type":"object","properties":{"monitoringPeriod":{"oneOf":[{"description":"Runs until disabled or deleted.","$ref":"#/components/schemas/AutomationUntilStoppedMonitoringPeriod"},{"$ref":"#/components/schemas/AutomationUntilDateMonitoringPeriod"},{"$ref":"#/components/schemas/AutomationUntilBenefitTemplateEndMonitoringPeriod"},{"type":"null"}],"description":"When the automation stops; omitted means until disabled or deleted. Required on a continuous\n`fixedDate` trigger, refused on a snapshot one."}},"description":"When an automation fires. Discriminated by `type`."},"AutomationUntilStoppedMonitoringPeriod":{"required":["mode"],"type":"object","allOf":[{"description":"When a trigger stops. Discriminated by `mode`.","$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"mode":{"enum":["untilStopped"],"type":"string","description":"Discriminator. Always `untilStopped` for this shape."}},"additionalProperties":false,"description":"Runs until disabled or deleted."},"AutomationMonitoringPeriod":{"type":"object","description":"When a trigger stops. Discriminated by `mode`."},"AutomationUntilDateMonitoringPeriod":{"required":["endDate","mode"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"endDate":{"type":"string","description":"When the automation stops. Must be in the future on create, and after `runAt` on a `fixedDate` trigger.","format":"date-time"},"mode":{"enum":["untilDate"],"type":"string","description":"Discriminator. Always `untilDate` for this shape."}},"additionalProperties":false,"description":"Stops at Neo.Web.Api.Scheduler.Controllers.AutomationUntilDateMonitoringPeriod.EndDate."},"AutomationUntilBenefitTemplateEndMonitoringPeriod":{"required":["mode"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"mode":{"enum":["untilBenefitTemplateEnd"],"type":"string","description":"Discriminator. Always `untilBenefitTemplateEnd` for this shape."}},"additionalProperties":false,"description":"Stops when the benefit template's validity ends. Only for tasks with `settings.benefitTemplateId`\nwhose template has a fixed end date; else 400."},"AutomationFixedDateTrigger":{"required":["runAt","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"runAt":{"type":"string","description":"When it fires. A new or changed value must be in the future.","format":"date-time"},"audienceEvaluationMode":{"description":"`snapshot` evaluates the audience once at `runAt`; `continuous` keeps applying to newly\n            matching passes while `monitoringPeriod` is open. Defaults to `snapshot`.","default":"snapshot","$ref":"#/components/schemas/AudienceEvaluationMode"},"type":{"enum":["fixedDate"],"type":"string","description":"Discriminator. Always `fixedDate` for this shape."}},"additionalProperties":false,"description":"Fires once, at an instant."},"AudienceEvaluationMode":{"enum":["snapshot","continuous"],"type":"string","description":"Whether a Neo.Runtime.Scheduler.Configuration.FixedDateTrigger acts only on the passes matching at Neo.Runtime.Scheduler.Configuration.FixedDateTrigger.RunAt,\nor also on passes that come to match later."},"AutomationDateRelativeTrigger":{"required":["direction","offset","referenceField","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"referenceField":{"minLength":1,"type":"string","description":"Pass data field the moment is computed from, e.g. `birthDate`. Must be a `datetime` on at\nleast one pass template."},"direction":{"description":"Fires before or after the reference field.","$ref":"#/components/schemas/AutomationTriggerDirection"},"offset":{"description":"Distance from the reference field.","$ref":"#/components/schemas/AutomationTriggerOffset"},"pinnedTime":{"description":"Snaps the moment to this time of day in its timezone. Omitted keeps the computed time.","$ref":"#/components/schemas/AutomationPinnedTime"},"type":{"enum":["dateRelative"],"type":"string","description":"Discriminator. Always `dateRelative` for this shape."}},"additionalProperties":false,"description":"Fires per pass, relative to one of its date fields."},"AutomationTriggerDirection":{"enum":["before","after"],"type":"string","description":"Side of the reference field a trigger fires on."},"AutomationTriggerOffset":{"required":["unit","value"],"type":"object","properties":{"value":{"maximum":2147483647,"minimum":0,"type":"integer","description":"Number of units, not negative.","format":"int32"},"unit":{"description":"Unit of Neo.Web.Api.Scheduler.Controllers.AutomationTriggerOffset.Value.","$ref":"#/components/schemas/AutomationOffsetUnit"}},"additionalProperties":false,"description":"A duration in a chosen unit."},"AutomationOffsetUnit":{"enum":["minutes","hours","days","weeks"],"type":"string","description":"Offset unit."},"AutomationPinnedTime":{"required":["hour","timezone"],"type":"object","properties":{"hour":{"minLength":1,"type":"string","description":"Time of day as 24-hour `HH:mm`, e.g. `09:30`."},"timezone":{"minLength":1,"type":"string","description":"IANA timezone id, e.g. `Europe/Paris`."}},"additionalProperties":false,"description":"A wall-clock time in a timezone."},"AutomationEventTrigger":{"required":["settings","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"settings":{"oneOf":[{"description":"A pass is installed on a device.","$ref":"#/components/schemas/AutomationPassInstalledEventSettings"},{"$ref":"#/components/schemas/AutomationBenefitRedeemedEventSettings"},{"$ref":"#/components/schemas/AutomationMetadataChangedEventSettings"}],"description":"Event and its conditions."},"type":{"enum":["event"],"type":"string","description":"Discriminator. Always `event` for this shape."}},"additionalProperties":false,"description":"Fires per pass on a pass event."},"AutomationPassInstalledEventSettings":{"required":["condition","type"],"type":"object","allOf":[{"description":"Pass event to react to. Discriminated by `type`.","$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"condition":{"description":"First install only, or every install.","$ref":"#/components/schemas/PassInstalledCondition"},"offset":{"description":"Delay after the install. Omitted means shortly after.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Pass:Installed"],"type":"string","description":"Discriminator. Always `Pass:Installed` for this shape."}},"additionalProperties":false,"description":"A pass is installed on a device."},"AutomationEventSettings":{"type":"object","description":"Pass event to react to. Discriminated by `type`."},"PassInstalledCondition":{"enum":["firstInstallationOnly","anyInstallation"],"type":"string","description":"Controls when a Neo.Runtime.Scheduler.Configuration.PassInstalledSettings trigger fires relative to installs."},"AutomationBenefitRedeemedEventSettings":{"required":["direction","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"benefitTemplates":{"type":"array","items":{"description":"One watched benefit template.","$ref":"#/components/schemas/AutomationBenefitTemplateSelection"},"description":"Templates to watch. Empty or omitted means all."},"options":{"description":"Conditions for templates that declare none, and for all when Neo.Web.Api.Scheduler.Controllers.AutomationBenefitRedeemedEventSettings.BenefitTemplates is empty.","$ref":"#/components/schemas/AutomationBenefitTemplateSelectionOptions"},"direction":{"description":"Redemption (negative value), award (positive value), or either.","$ref":"#/components/schemas/MovementDirection"},"offset":{"description":"Delay after the movement. Omitted means shortly after.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Benefit:MovementApplied"],"type":"string","description":"Discriminator. Always `Benefit:MovementApplied` for this shape."}},"additionalProperties":false,"description":"A movement (redemption, award or either) on a benefit issued by a benefit template."},"AutomationBenefitTemplateSelection":{"required":["benefitTemplateId"],"type":"object","properties":{"benefitTemplateId":{"minLength":1,"type":"string","description":"Benefit template id. Not blank, not repeated in `benefitTemplates`."},"options":{"description":"Conditions for this template. Omitted falls back to the settings-level options.","$ref":"#/components/schemas/AutomationBenefitTemplateSelectionOptions"}},"additionalProperties":false,"description":"One watched benefit template."},"AutomationBenefitTemplateSelectionOptions":{"type":"object","properties":{"whenFullyRedeemed":{"type":"boolean","description":"Fire only when the movement brings the benefit's total value to zero. Defaults to `false`."}},"additionalProperties":false,"description":"Extra conditions on a watched benefit template."},"MovementDirection":{"enum":["redemption","award","any"],"type":"string","description":"Which movements on a benefit-template-issued benefit an Neo.Runtime.Scheduler.Configuration.BenefitRedeemedSettings trigger reacts to."},"AutomationMetadataChangedEventSettings":{"required":["key","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"key":{"minLength":1,"type":"string","description":"Metadata key to watch."},"offset":{"description":"Delay after the change. Omitted means the same update.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Pass:MetadataChanged"],"type":"string","description":"Discriminator. Always `Pass:MetadataChanged` for this shape."}},"additionalProperties":false,"description":"A pass metadata key's value appears, changes or disappears."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations":{"post":{"tags":["Automations"],"summary":"Create automation","description":"The id is unique within the tenant and immutable. The automation is live at once; send\n`isEnabled: false` to stage it. Emits `Automation:Created`.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The automation to create.","content":{"application/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"text/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"application/*+json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}}},"required":true},"responses":{"201":{"description":"Automation created.","content":{"text/plain":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"application/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"text/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}}}},"400":{"description":"Missing body, invalid id, type, trigger or settings, or an undeclared property. The problem names the field.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:write</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"409":{"description":"Id already exists, or a concurrent automation write; retry.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## GET /api/{tenantId}/admin/automations/{automationId}

> Get automation

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"Automation":{"required":["id","trigger","type"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"Unique within the tenant, immutable. Letters, digits, `_`, `-`; up to 200 characters."},"displayName":{"type":["null","string"],"description":"Label shown in the admin, up to 200 characters."},"type":{"minLength":1,"type":"string","description":"Task type, e.g. `wallet.pushUpdates`; must be available to the tenant. Decides the shape of Neo.Web.Api.Scheduler.Controllers.Automation.Settings."},"isEnabled":{"type":"boolean","description":"Whether it fires. A disabled automation is kept but does not run. Defaults to `true`.","default":true},"trigger":{"oneOf":[{"description":"Fires on a cron schedule.","$ref":"#/components/schemas/AutomationRecurrenceTrigger"},{"$ref":"#/components/schemas/AutomationFixedDateTrigger"},{"$ref":"#/components/schemas/AutomationDateRelativeTrigger"},{"$ref":"#/components/schemas/AutomationEventTrigger"}],"description":"When the automation fires."},"settings":{"type":["null","object"],"additionalProperties":{},"description":"Type-specific configuration, validated against Neo.Web.Api.Scheduler.Controllers.Automation.Type on write: undeclared keys, wrong\ntypes and unknown pass templates, themes or benefit templates give a 400. Omitted applies defaults."},"actions":{"type":"array","items":{"type":"string"},"description":"What it does to each matching pass: `applyBenefitTemplate`, `updateData`, `changePassType`,\n`applyTheme`, `notify`. Derived from Neo.Web.Api.Scheduler.Controllers.Automation.Settings; read-only."},"tags":{"type":"array","items":{"type":"string"},"description":"Labels to filter and group in the admin. At most 20 tags of 50 characters; trimmed, blanks dropped,\ncase-insensitive duplicates kept once."},"creationDate":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"Creation time in UTC, server-set. `null` if not created through this API. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."},"lastModificationDate":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"Last write through this API, in UTC, server-set. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."}},"additionalProperties":false,"description":"One automation."},"AutomationRecurrenceTrigger":{"required":["scheduleExpression","type"],"type":"object","allOf":[{"description":"When an automation fires. Discriminated by `type`.","$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"scheduleExpression":{"minLength":1,"type":"string","description":"Six-field cron expression (seconds first) in UTC, e.g. `0 0 9 * * *` for daily 09:00. An optional\ntrailing year limits it to that year. A new or changed expression with occurrences under five minutes\napart is refused."},"type":{"enum":["recurrence"],"type":"string","description":"Discriminator. Always `recurrence` for this shape."}},"additionalProperties":false,"description":"Fires on a cron schedule."},"AutomationTrigger":{"type":"object","properties":{"monitoringPeriod":{"oneOf":[{"description":"Runs until disabled or deleted.","$ref":"#/components/schemas/AutomationUntilStoppedMonitoringPeriod"},{"$ref":"#/components/schemas/AutomationUntilDateMonitoringPeriod"},{"$ref":"#/components/schemas/AutomationUntilBenefitTemplateEndMonitoringPeriod"},{"type":"null"}],"description":"When the automation stops; omitted means until disabled or deleted. Required on a continuous\n`fixedDate` trigger, refused on a snapshot one."}},"description":"When an automation fires. Discriminated by `type`."},"AutomationUntilStoppedMonitoringPeriod":{"required":["mode"],"type":"object","allOf":[{"description":"When a trigger stops. Discriminated by `mode`.","$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"mode":{"enum":["untilStopped"],"type":"string","description":"Discriminator. Always `untilStopped` for this shape."}},"additionalProperties":false,"description":"Runs until disabled or deleted."},"AutomationMonitoringPeriod":{"type":"object","description":"When a trigger stops. Discriminated by `mode`."},"AutomationUntilDateMonitoringPeriod":{"required":["endDate","mode"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"endDate":{"type":"string","description":"When the automation stops. Must be in the future on create, and after `runAt` on a `fixedDate` trigger.","format":"date-time"},"mode":{"enum":["untilDate"],"type":"string","description":"Discriminator. Always `untilDate` for this shape."}},"additionalProperties":false,"description":"Stops at Neo.Web.Api.Scheduler.Controllers.AutomationUntilDateMonitoringPeriod.EndDate."},"AutomationUntilBenefitTemplateEndMonitoringPeriod":{"required":["mode"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"mode":{"enum":["untilBenefitTemplateEnd"],"type":"string","description":"Discriminator. Always `untilBenefitTemplateEnd` for this shape."}},"additionalProperties":false,"description":"Stops when the benefit template's validity ends. Only for tasks with `settings.benefitTemplateId`\nwhose template has a fixed end date; else 400."},"AutomationFixedDateTrigger":{"required":["runAt","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"runAt":{"type":"string","description":"When it fires. A new or changed value must be in the future.","format":"date-time"},"audienceEvaluationMode":{"description":"`snapshot` evaluates the audience once at `runAt`; `continuous` keeps applying to newly\n            matching passes while `monitoringPeriod` is open. Defaults to `snapshot`.","default":"snapshot","$ref":"#/components/schemas/AudienceEvaluationMode"},"type":{"enum":["fixedDate"],"type":"string","description":"Discriminator. Always `fixedDate` for this shape."}},"additionalProperties":false,"description":"Fires once, at an instant."},"AudienceEvaluationMode":{"enum":["snapshot","continuous"],"type":"string","description":"Whether a Neo.Runtime.Scheduler.Configuration.FixedDateTrigger acts only on the passes matching at Neo.Runtime.Scheduler.Configuration.FixedDateTrigger.RunAt,\nor also on passes that come to match later."},"AutomationDateRelativeTrigger":{"required":["direction","offset","referenceField","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"referenceField":{"minLength":1,"type":"string","description":"Pass data field the moment is computed from, e.g. `birthDate`. Must be a `datetime` on at\nleast one pass template."},"direction":{"description":"Fires before or after the reference field.","$ref":"#/components/schemas/AutomationTriggerDirection"},"offset":{"description":"Distance from the reference field.","$ref":"#/components/schemas/AutomationTriggerOffset"},"pinnedTime":{"description":"Snaps the moment to this time of day in its timezone. Omitted keeps the computed time.","$ref":"#/components/schemas/AutomationPinnedTime"},"type":{"enum":["dateRelative"],"type":"string","description":"Discriminator. Always `dateRelative` for this shape."}},"additionalProperties":false,"description":"Fires per pass, relative to one of its date fields."},"AutomationTriggerDirection":{"enum":["before","after"],"type":"string","description":"Side of the reference field a trigger fires on."},"AutomationTriggerOffset":{"required":["unit","value"],"type":"object","properties":{"value":{"maximum":2147483647,"minimum":0,"type":"integer","description":"Number of units, not negative.","format":"int32"},"unit":{"description":"Unit of Neo.Web.Api.Scheduler.Controllers.AutomationTriggerOffset.Value.","$ref":"#/components/schemas/AutomationOffsetUnit"}},"additionalProperties":false,"description":"A duration in a chosen unit."},"AutomationOffsetUnit":{"enum":["minutes","hours","days","weeks"],"type":"string","description":"Offset unit."},"AutomationPinnedTime":{"required":["hour","timezone"],"type":"object","properties":{"hour":{"minLength":1,"type":"string","description":"Time of day as 24-hour `HH:mm`, e.g. `09:30`."},"timezone":{"minLength":1,"type":"string","description":"IANA timezone id, e.g. `Europe/Paris`."}},"additionalProperties":false,"description":"A wall-clock time in a timezone."},"AutomationEventTrigger":{"required":["settings","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"settings":{"oneOf":[{"description":"A pass is installed on a device.","$ref":"#/components/schemas/AutomationPassInstalledEventSettings"},{"$ref":"#/components/schemas/AutomationBenefitRedeemedEventSettings"},{"$ref":"#/components/schemas/AutomationMetadataChangedEventSettings"}],"description":"Event and its conditions."},"type":{"enum":["event"],"type":"string","description":"Discriminator. Always `event` for this shape."}},"additionalProperties":false,"description":"Fires per pass on a pass event."},"AutomationPassInstalledEventSettings":{"required":["condition","type"],"type":"object","allOf":[{"description":"Pass event to react to. Discriminated by `type`.","$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"condition":{"description":"First install only, or every install.","$ref":"#/components/schemas/PassInstalledCondition"},"offset":{"description":"Delay after the install. Omitted means shortly after.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Pass:Installed"],"type":"string","description":"Discriminator. Always `Pass:Installed` for this shape."}},"additionalProperties":false,"description":"A pass is installed on a device."},"AutomationEventSettings":{"type":"object","description":"Pass event to react to. Discriminated by `type`."},"PassInstalledCondition":{"enum":["firstInstallationOnly","anyInstallation"],"type":"string","description":"Controls when a Neo.Runtime.Scheduler.Configuration.PassInstalledSettings trigger fires relative to installs."},"AutomationBenefitRedeemedEventSettings":{"required":["direction","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"benefitTemplates":{"type":"array","items":{"description":"One watched benefit template.","$ref":"#/components/schemas/AutomationBenefitTemplateSelection"},"description":"Templates to watch. Empty or omitted means all."},"options":{"description":"Conditions for templates that declare none, and for all when Neo.Web.Api.Scheduler.Controllers.AutomationBenefitRedeemedEventSettings.BenefitTemplates is empty.","$ref":"#/components/schemas/AutomationBenefitTemplateSelectionOptions"},"direction":{"description":"Redemption (negative value), award (positive value), or either.","$ref":"#/components/schemas/MovementDirection"},"offset":{"description":"Delay after the movement. Omitted means shortly after.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Benefit:MovementApplied"],"type":"string","description":"Discriminator. Always `Benefit:MovementApplied` for this shape."}},"additionalProperties":false,"description":"A movement (redemption, award or either) on a benefit issued by a benefit template."},"AutomationBenefitTemplateSelection":{"required":["benefitTemplateId"],"type":"object","properties":{"benefitTemplateId":{"minLength":1,"type":"string","description":"Benefit template id. Not blank, not repeated in `benefitTemplates`."},"options":{"description":"Conditions for this template. Omitted falls back to the settings-level options.","$ref":"#/components/schemas/AutomationBenefitTemplateSelectionOptions"}},"additionalProperties":false,"description":"One watched benefit template."},"AutomationBenefitTemplateSelectionOptions":{"type":"object","properties":{"whenFullyRedeemed":{"type":"boolean","description":"Fire only when the movement brings the benefit's total value to zero. Defaults to `false`."}},"additionalProperties":false,"description":"Extra conditions on a watched benefit template."},"MovementDirection":{"enum":["redemption","award","any"],"type":"string","description":"Which movements on a benefit-template-issued benefit an Neo.Runtime.Scheduler.Configuration.BenefitRedeemedSettings trigger reacts to."},"AutomationMetadataChangedEventSettings":{"required":["key","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"key":{"minLength":1,"type":"string","description":"Metadata key to watch."},"offset":{"description":"Delay after the change. Omitted means the same update.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Pass:MetadataChanged"],"type":"string","description":"Discriminator. Always `Pass:MetadataChanged` for this shape."}},"additionalProperties":false,"description":"A pass metadata key's value appears, changes or disappears."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations/{automationId}":{"get":{"tags":["Automations"],"summary":"Get automation","parameters":[{"name":"automationId","in":"path","description":"Automation id, case-sensitive.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Automation returned.","content":{"text/plain":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"application/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"text/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:read</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"No automation with that id.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Replace automation

> Full replace, not a merge. The route id wins over the body id. To disable, send \`isEnabled: false\`.\
> Time-sensitive rules (future \`runAt\`, 5-minute cron floor, \`displayName\` length) apply only to\
> changed values, so a body read with \`GET\` can be sent back.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:write"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"Automation":{"required":["id","trigger","type"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"Unique within the tenant, immutable. Letters, digits, `_`, `-`; up to 200 characters."},"displayName":{"type":["null","string"],"description":"Label shown in the admin, up to 200 characters."},"type":{"minLength":1,"type":"string","description":"Task type, e.g. `wallet.pushUpdates`; must be available to the tenant. Decides the shape of Neo.Web.Api.Scheduler.Controllers.Automation.Settings."},"isEnabled":{"type":"boolean","description":"Whether it fires. A disabled automation is kept but does not run. Defaults to `true`.","default":true},"trigger":{"oneOf":[{"description":"Fires on a cron schedule.","$ref":"#/components/schemas/AutomationRecurrenceTrigger"},{"$ref":"#/components/schemas/AutomationFixedDateTrigger"},{"$ref":"#/components/schemas/AutomationDateRelativeTrigger"},{"$ref":"#/components/schemas/AutomationEventTrigger"}],"description":"When the automation fires."},"settings":{"type":["null","object"],"additionalProperties":{},"description":"Type-specific configuration, validated against Neo.Web.Api.Scheduler.Controllers.Automation.Type on write: undeclared keys, wrong\ntypes and unknown pass templates, themes or benefit templates give a 400. Omitted applies defaults."},"actions":{"type":"array","items":{"type":"string"},"description":"What it does to each matching pass: `applyBenefitTemplate`, `updateData`, `changePassType`,\n`applyTheme`, `notify`. Derived from Neo.Web.Api.Scheduler.Controllers.Automation.Settings; read-only."},"tags":{"type":"array","items":{"type":"string"},"description":"Labels to filter and group in the admin. At most 20 tags of 50 characters; trimmed, blanks dropped,\ncase-insensitive duplicates kept once."},"creationDate":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"Creation time in UTC, server-set. `null` if not created through this API. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."},"lastModificationDate":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"Last write through this API, in UTC, server-set. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."}},"additionalProperties":false,"description":"One automation."},"AutomationRecurrenceTrigger":{"required":["scheduleExpression","type"],"type":"object","allOf":[{"description":"When an automation fires. Discriminated by `type`.","$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"scheduleExpression":{"minLength":1,"type":"string","description":"Six-field cron expression (seconds first) in UTC, e.g. `0 0 9 * * *` for daily 09:00. An optional\ntrailing year limits it to that year. A new or changed expression with occurrences under five minutes\napart is refused."},"type":{"enum":["recurrence"],"type":"string","description":"Discriminator. Always `recurrence` for this shape."}},"additionalProperties":false,"description":"Fires on a cron schedule."},"AutomationTrigger":{"type":"object","properties":{"monitoringPeriod":{"oneOf":[{"description":"Runs until disabled or deleted.","$ref":"#/components/schemas/AutomationUntilStoppedMonitoringPeriod"},{"$ref":"#/components/schemas/AutomationUntilDateMonitoringPeriod"},{"$ref":"#/components/schemas/AutomationUntilBenefitTemplateEndMonitoringPeriod"},{"type":"null"}],"description":"When the automation stops; omitted means until disabled or deleted. Required on a continuous\n`fixedDate` trigger, refused on a snapshot one."}},"description":"When an automation fires. Discriminated by `type`."},"AutomationUntilStoppedMonitoringPeriod":{"required":["mode"],"type":"object","allOf":[{"description":"When a trigger stops. Discriminated by `mode`.","$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"mode":{"enum":["untilStopped"],"type":"string","description":"Discriminator. Always `untilStopped` for this shape."}},"additionalProperties":false,"description":"Runs until disabled or deleted."},"AutomationMonitoringPeriod":{"type":"object","description":"When a trigger stops. Discriminated by `mode`."},"AutomationUntilDateMonitoringPeriod":{"required":["endDate","mode"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"endDate":{"type":"string","description":"When the automation stops. Must be in the future on create, and after `runAt` on a `fixedDate` trigger.","format":"date-time"},"mode":{"enum":["untilDate"],"type":"string","description":"Discriminator. Always `untilDate` for this shape."}},"additionalProperties":false,"description":"Stops at Neo.Web.Api.Scheduler.Controllers.AutomationUntilDateMonitoringPeriod.EndDate."},"AutomationUntilBenefitTemplateEndMonitoringPeriod":{"required":["mode"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationMonitoringPeriod"}],"properties":{"mode":{"enum":["untilBenefitTemplateEnd"],"type":"string","description":"Discriminator. Always `untilBenefitTemplateEnd` for this shape."}},"additionalProperties":false,"description":"Stops when the benefit template's validity ends. Only for tasks with `settings.benefitTemplateId`\nwhose template has a fixed end date; else 400."},"AutomationFixedDateTrigger":{"required":["runAt","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"runAt":{"type":"string","description":"When it fires. A new or changed value must be in the future.","format":"date-time"},"audienceEvaluationMode":{"description":"`snapshot` evaluates the audience once at `runAt`; `continuous` keeps applying to newly\n            matching passes while `monitoringPeriod` is open. Defaults to `snapshot`.","default":"snapshot","$ref":"#/components/schemas/AudienceEvaluationMode"},"type":{"enum":["fixedDate"],"type":"string","description":"Discriminator. Always `fixedDate` for this shape."}},"additionalProperties":false,"description":"Fires once, at an instant."},"AudienceEvaluationMode":{"enum":["snapshot","continuous"],"type":"string","description":"Whether a Neo.Runtime.Scheduler.Configuration.FixedDateTrigger acts only on the passes matching at Neo.Runtime.Scheduler.Configuration.FixedDateTrigger.RunAt,\nor also on passes that come to match later."},"AutomationDateRelativeTrigger":{"required":["direction","offset","referenceField","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"referenceField":{"minLength":1,"type":"string","description":"Pass data field the moment is computed from, e.g. `birthDate`. Must be a `datetime` on at\nleast one pass template."},"direction":{"description":"Fires before or after the reference field.","$ref":"#/components/schemas/AutomationTriggerDirection"},"offset":{"description":"Distance from the reference field.","$ref":"#/components/schemas/AutomationTriggerOffset"},"pinnedTime":{"description":"Snaps the moment to this time of day in its timezone. Omitted keeps the computed time.","$ref":"#/components/schemas/AutomationPinnedTime"},"type":{"enum":["dateRelative"],"type":"string","description":"Discriminator. Always `dateRelative` for this shape."}},"additionalProperties":false,"description":"Fires per pass, relative to one of its date fields."},"AutomationTriggerDirection":{"enum":["before","after"],"type":"string","description":"Side of the reference field a trigger fires on."},"AutomationTriggerOffset":{"required":["unit","value"],"type":"object","properties":{"value":{"maximum":2147483647,"minimum":0,"type":"integer","description":"Number of units, not negative.","format":"int32"},"unit":{"description":"Unit of Neo.Web.Api.Scheduler.Controllers.AutomationTriggerOffset.Value.","$ref":"#/components/schemas/AutomationOffsetUnit"}},"additionalProperties":false,"description":"A duration in a chosen unit."},"AutomationOffsetUnit":{"enum":["minutes","hours","days","weeks"],"type":"string","description":"Offset unit."},"AutomationPinnedTime":{"required":["hour","timezone"],"type":"object","properties":{"hour":{"minLength":1,"type":"string","description":"Time of day as 24-hour `HH:mm`, e.g. `09:30`."},"timezone":{"minLength":1,"type":"string","description":"IANA timezone id, e.g. `Europe/Paris`."}},"additionalProperties":false,"description":"A wall-clock time in a timezone."},"AutomationEventTrigger":{"required":["settings","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationTrigger"}],"properties":{"settings":{"oneOf":[{"description":"A pass is installed on a device.","$ref":"#/components/schemas/AutomationPassInstalledEventSettings"},{"$ref":"#/components/schemas/AutomationBenefitRedeemedEventSettings"},{"$ref":"#/components/schemas/AutomationMetadataChangedEventSettings"}],"description":"Event and its conditions."},"type":{"enum":["event"],"type":"string","description":"Discriminator. Always `event` for this shape."}},"additionalProperties":false,"description":"Fires per pass on a pass event."},"AutomationPassInstalledEventSettings":{"required":["condition","type"],"type":"object","allOf":[{"description":"Pass event to react to. Discriminated by `type`.","$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"condition":{"description":"First install only, or every install.","$ref":"#/components/schemas/PassInstalledCondition"},"offset":{"description":"Delay after the install. Omitted means shortly after.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Pass:Installed"],"type":"string","description":"Discriminator. Always `Pass:Installed` for this shape."}},"additionalProperties":false,"description":"A pass is installed on a device."},"AutomationEventSettings":{"type":"object","description":"Pass event to react to. Discriminated by `type`."},"PassInstalledCondition":{"enum":["firstInstallationOnly","anyInstallation"],"type":"string","description":"Controls when a Neo.Runtime.Scheduler.Configuration.PassInstalledSettings trigger fires relative to installs."},"AutomationBenefitRedeemedEventSettings":{"required":["direction","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"benefitTemplates":{"type":"array","items":{"description":"One watched benefit template.","$ref":"#/components/schemas/AutomationBenefitTemplateSelection"},"description":"Templates to watch. Empty or omitted means all."},"options":{"description":"Conditions for templates that declare none, and for all when Neo.Web.Api.Scheduler.Controllers.AutomationBenefitRedeemedEventSettings.BenefitTemplates is empty.","$ref":"#/components/schemas/AutomationBenefitTemplateSelectionOptions"},"direction":{"description":"Redemption (negative value), award (positive value), or either.","$ref":"#/components/schemas/MovementDirection"},"offset":{"description":"Delay after the movement. Omitted means shortly after.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Benefit:MovementApplied"],"type":"string","description":"Discriminator. Always `Benefit:MovementApplied` for this shape."}},"additionalProperties":false,"description":"A movement (redemption, award or either) on a benefit issued by a benefit template."},"AutomationBenefitTemplateSelection":{"required":["benefitTemplateId"],"type":"object","properties":{"benefitTemplateId":{"minLength":1,"type":"string","description":"Benefit template id. Not blank, not repeated in `benefitTemplates`."},"options":{"description":"Conditions for this template. Omitted falls back to the settings-level options.","$ref":"#/components/schemas/AutomationBenefitTemplateSelectionOptions"}},"additionalProperties":false,"description":"One watched benefit template."},"AutomationBenefitTemplateSelectionOptions":{"type":"object","properties":{"whenFullyRedeemed":{"type":"boolean","description":"Fire only when the movement brings the benefit's total value to zero. Defaults to `false`."}},"additionalProperties":false,"description":"Extra conditions on a watched benefit template."},"MovementDirection":{"enum":["redemption","award","any"],"type":"string","description":"Which movements on a benefit-template-issued benefit an Neo.Runtime.Scheduler.Configuration.BenefitRedeemedSettings trigger reacts to."},"AutomationMetadataChangedEventSettings":{"required":["key","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/AutomationEventSettings"}],"properties":{"key":{"minLength":1,"type":"string","description":"Metadata key to watch."},"offset":{"description":"Delay after the change. Omitted means the same update.","$ref":"#/components/schemas/AutomationTriggerOffset"},"type":{"enum":["Pass:MetadataChanged"],"type":"string","description":"Discriminator. Always `Pass:MetadataChanged` for this shape."}},"additionalProperties":false,"description":"A pass metadata key's value appears, changes or disappears."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations/{automationId}":{"put":{"tags":["Automations"],"summary":"Replace automation","description":"Full replace, not a merge. The route id wins over the body id. To disable, send `isEnabled: false`.\nTime-sensitive rules (future `runAt`, 5-minute cron floor, `displayName` length) apply only to\nchanged values, so a body read with `GET` can be sent back.","parameters":[{"name":"automationId","in":"path","description":"Automation id, case-sensitive.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The automation as it should now stand.","content":{"application/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"text/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"application/*+json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}}},"required":true},"responses":{"200":{"description":"Automation updated.","content":{"text/plain":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"application/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}},"text/json":{"schema":{"description":"One automation.","$ref":"#/components/schemas/Automation"}}}},"400":{"description":"Missing body, invalid type, trigger or settings, or an undeclared property. The problem names the field.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:write</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"No automation with that id.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"409":{"description":"Concurrent automation write; retry.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Delete automation

> Stops it at once and deletes its pending per-pass runs. Execution history is kept. To pause instead,\
> replace it with \`isEnabled: false\`. Emits \`Automation:Deleted\`.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:write"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations/{automationId}":{"delete":{"tags":["Automations"],"summary":"Delete automation","description":"Stops it at once and deletes its pending per-pass runs. Execution history is kept. To pause instead,\nreplace it with `isEnabled: false`. Emits `Automation:Deleted`.","parameters":[{"name":"automationId","in":"path","description":"Automation id, case-sensitive.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Automation deleted."},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:write</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"No automation with that id.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"409":{"description":"Concurrent automation write; retry.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## List automation executions

> Runs of one automation over the last 90 days: occurrences, per-pass runs and backfills. A deleted\
> automation keeps its history; an unknown id returns an empty list. Sort keys as on the all-automations list.\
> Total count in the \`x-pagination-total\` header.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"AutomationSortModel":{"type":"object","properties":{"field":{"type":"string","description":"`startDate`, `taskId`, `taskType`, `duration` or `retryIndex`, case-sensitive; else 400."},"direction":{"description":"`ASC` or `DESC`.","$ref":"#/components/schemas/AutomationSortModelDirection"}},"additionalProperties":false,"description":"One sort key, passed as `sortBy[i].field` and `sortBy[i].direction`. Keys apply in order; ties break by execution id, descending."},"AutomationSortModelDirection":{"enum":[0,1],"type":"integer","description":"Sort direction of one Neo.Web.Api.Scheduler.Controllers.AutomationSortModel.","format":"int32"},"Execution":{"required":["duration","id","retryIndex","startDate","success"],"type":"object","properties":{"id":{"type":"string","description":"Delivery id, used as `executionId` on the detail endpoint."},"startDate":{"type":"string","description":"When the delivery started, in UTC.","format":"date-time"},"retryIndex":{"type":"integer","description":"Times the occurrence was postponed before this delivery; `0` on the first.","format":"int32"},"success":{"type":["null","boolean"],"description":"Whether it succeeded."},"duration":{"type":["null","string"],"description":"Run time, as `[d.]hh:mm:ss[.fffffff]`.","format":"date-span"}},"additionalProperties":false,"description":"One delivery of an automation run; a postponed occurrence appears once per delivery."},"ExecutionSummary":{"required":["taskId","taskType"],"type":"object","allOf":[{"$ref":"#/components/schemas/Execution"}],"properties":{"taskId":{"type":"string","description":"Owning automation id; may be a deleted automation."},"taskType":{"type":["null","string"],"description":"Task type that ran, e.g. `wallet.pushUpdates`."}},"additionalProperties":false,"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its automation."},"ExecutionDetail":{"required":["logs"],"type":"object","allOf":[{"$ref":"#/components/schemas/Execution"}],"properties":{"logs":{"type":"array","items":{"description":"One log message or outgoing call.","$ref":"#/components/schemas/ExecutionLog"},"description":"Log messages and outgoing calls, newest first."}},"additionalProperties":false,"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its logs."},"ExecutionLog":{"required":["data","entryType","eventDate","id"],"type":"object","properties":{"id":{"type":"string","description":"Id of the entry."},"eventDate":{"type":"string","description":"When logged, in UTC.","format":"date-time"},"entryType":{"type":"string","description":"`Trace` for a log message, `Dependencies` for an outgoing call."},"data":{"type":["null","string"],"description":"A log message, or a one-line summary of an outgoing call."}},"additionalProperties":false,"description":"One log message or outgoing call."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations/{taskId}/executions":{"get":{"tags":["Automations"],"summary":"List automation executions","description":"Runs of one automation over the last 90 days: occurrences, per-pass runs and backfills. A deleted\nautomation keeps its history; an unknown id returns an empty list. Sort keys as on the all-automations list.\nTotal count in the `x-pagination-total` header.","parameters":[{"name":"taskId","in":"path","description":"Automation id, case-sensitive. A trailing `*` matches every id with that prefix.","required":true,"schema":{"type":"string"}},{"name":"pageIndex","in":"query","description":"Zero-based page index. Default 0.","schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","description":"Page size, 1 to 200. Default 20.","schema":{"type":"integer","format":"int32","default":20}},{"name":"sortBy","in":"query","description":"Sort keys, as `sortBy[0].field` and `sortBy[0].direction`. Defaults to `startDate` descending.","schema":{"type":"array","items":{"description":"One sort key, passed as `sortBy[i].field` and `sortBy[i].direction`. Keys apply in order; ties break by execution id, descending.","$ref":"#/components/schemas/AutomationSortModel"}}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Executions returned.","content":{"text/plain":{"schema":{"type":"array","items":{"oneOf":[{"description":"One delivery of an automation run; a postponed occurrence appears once per delivery.","$ref":"#/components/schemas/Execution"},{"$ref":"#/components/schemas/ExecutionSummary"},{"$ref":"#/components/schemas/ExecutionDetail"}],"description":"One delivery of an automation run; a postponed occurrence appears once per delivery."}}},"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Execution"},{"$ref":"#/components/schemas/ExecutionSummary"},{"$ref":"#/components/schemas/ExecutionDetail"}],"description":"One delivery of an automation run; a postponed occurrence appears once per delivery."}}},"text/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Execution"},{"$ref":"#/components/schemas/ExecutionSummary"},{"$ref":"#/components/schemas/ExecutionDetail"}],"description":"One delivery of an automation run; a postponed occurrence appears once per delivery."}}}}},"400":{"description":"Invalid taskId or query parameter.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:read</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Get execution

> One delivery with its logs and outgoing calls. Searches the last 90 days.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ExecutionDetail":{"required":["logs"],"type":"object","allOf":[{"$ref":"#/components/schemas/Execution"}],"properties":{"logs":{"type":"array","items":{"description":"One log message or outgoing call.","$ref":"#/components/schemas/ExecutionLog"},"description":"Log messages and outgoing calls, newest first."}},"additionalProperties":false,"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its logs."},"Execution":{"required":["duration","id","retryIndex","startDate","success"],"type":"object","properties":{"id":{"type":"string","description":"Delivery id, used as `executionId` on the detail endpoint."},"startDate":{"type":"string","description":"When the delivery started, in UTC.","format":"date-time"},"retryIndex":{"type":"integer","description":"Times the occurrence was postponed before this delivery; `0` on the first.","format":"int32"},"success":{"type":["null","boolean"],"description":"Whether it succeeded."},"duration":{"type":["null","string"],"description":"Run time, as `[d.]hh:mm:ss[.fffffff]`.","format":"date-span"}},"additionalProperties":false,"description":"One delivery of an automation run; a postponed occurrence appears once per delivery."},"ExecutionLog":{"required":["data","entryType","eventDate","id"],"type":"object","properties":{"id":{"type":"string","description":"Id of the entry."},"eventDate":{"type":"string","description":"When logged, in UTC.","format":"date-time"},"entryType":{"type":"string","description":"`Trace` for a log message, `Dependencies` for an outgoing call."},"data":{"type":["null","string"],"description":"A log message, or a one-line summary of an outgoing call."}},"additionalProperties":false,"description":"One log message or outgoing call."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations/{taskId}/executions/{executionId}":{"get":{"tags":["Automations"],"summary":"Get execution","description":"One delivery with its logs and outgoing calls. Searches the last 90 days.","parameters":[{"name":"taskId","in":"path","description":"Automation id, case-sensitive; the execution must belong to it.","required":true,"schema":{"type":"string"}},{"name":"executionId","in":"path","description":"Execution `id` from the list endpoints.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Execution returned.","content":{"text/plain":{"schema":{"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its logs.","$ref":"#/components/schemas/ExecutionDetail"}},"application/json":{"schema":{"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its logs.","$ref":"#/components/schemas/ExecutionDetail"}},"text/json":{"schema":{"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its logs.","$ref":"#/components/schemas/ExecutionDetail"}}}},"400":{"description":"Invalid taskId or executionId.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:read</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"No such execution in the last 90 days.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Reset automation

> Recomputes which passes still need handling; idempotent. By trigger type:\
> &#x20;           \
> \- \*\*dateRelative:\*\* discards unfired per-pass runs, then reschedules them\
> &#x20; in the background. Fired runs are kept, so a pass is never acted on twice.\
> \- \*\*fixedDate (continuous):\*\* re-evaluates the audience in the background to pick up newly matching\
> &#x20; passes; nothing is discarded.\
> \- \*\*recurrence, fixedDate (snapshot), event:\*\* 409.\
> &#x20;           \
> Returns once the background run is started; follow it in the executions via \`correlationId\`.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:write"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ResetResult":{"required":["action","correlationId","taskId","triggerType"],"type":"object","properties":{"taskId":{"type":"string","description":"Id of the automation that was reset."},"triggerType":{"type":"string","description":"Trigger type: `dateRelative` or `fixedDate`."},"action":{"type":"string","description":"`reset-and-backfill-enqueued` (dateRelative) or `backfill-enqueued` (continuous fixedDate)."},"rowsDeleted":{"type":["null","integer"],"description":"Unfired per-pass runs discarded. `null` on a continuous fixedDate reset.","format":"int32"},"correlationId":{"type":"string","description":"Correlation id of the background run; its executions appear in the automation's executions."}},"additionalProperties":false,"description":"Outcome of a reset. The background run continues after the response."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations/{taskId}/reset":{"post":{"tags":["Automations"],"summary":"Reset automation","description":"Recomputes which passes still need handling; idempotent. By trigger type:\n            \n- **dateRelative:** discards unfired per-pass runs, then reschedules them\n  in the background. Fired runs are kept, so a pass is never acted on twice.\n- **fixedDate (continuous):** re-evaluates the audience in the background to pick up newly matching\n  passes; nothing is discarded.\n- **recurrence, fixedDate (snapshot), event:** 409.\n            \nReturns once the background run is started; follow it in the executions via `correlationId`.","parameters":[{"name":"taskId","in":"path","description":"Automation id, case-sensitive.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Reset accepted; the background run is started.","content":{"text/plain":{"schema":{"description":"Outcome of a reset. The background run continues after the response.","$ref":"#/components/schemas/ResetResult"}},"application/json":{"schema":{"description":"Outcome of a reset. The background run continues after the response.","$ref":"#/components/schemas/ResetResult"}},"text/json":{"schema":{"description":"Outcome of a reset. The background run continues after the response.","$ref":"#/components/schemas/ResetResult"}}}},"400":{"description":"Invalid taskId.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:write</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"No automation with that id.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"409":{"description":"Reset unavailable for the trigger type.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## List recent executions

> Runs of every automation over the last 90 days.\
> Sortable by \`startDate\`, \`taskId\`, \`taskType\`, \`duration\`, \`retryIndex\`.\
> Total count in the \`x-pagination-total\` header.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Automations"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.configuration.automation:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"AutomationSortModel":{"type":"object","properties":{"field":{"type":"string","description":"`startDate`, `taskId`, `taskType`, `duration` or `retryIndex`, case-sensitive; else 400."},"direction":{"description":"`ASC` or `DESC`.","$ref":"#/components/schemas/AutomationSortModelDirection"}},"additionalProperties":false,"description":"One sort key, passed as `sortBy[i].field` and `sortBy[i].direction`. Keys apply in order; ties break by execution id, descending."},"AutomationSortModelDirection":{"enum":[0,1],"type":"integer","description":"Sort direction of one Neo.Web.Api.Scheduler.Controllers.AutomationSortModel.","format":"int32"},"ExecutionSummary":{"required":["taskId","taskType"],"type":"object","allOf":[{"$ref":"#/components/schemas/Execution"}],"properties":{"taskId":{"type":"string","description":"Owning automation id; may be a deleted automation."},"taskType":{"type":["null","string"],"description":"Task type that ran, e.g. `wallet.pushUpdates`."}},"additionalProperties":false,"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its automation."},"Execution":{"required":["duration","id","retryIndex","startDate","success"],"type":"object","properties":{"id":{"type":"string","description":"Delivery id, used as `executionId` on the detail endpoint."},"startDate":{"type":"string","description":"When the delivery started, in UTC.","format":"date-time"},"retryIndex":{"type":"integer","description":"Times the occurrence was postponed before this delivery; `0` on the first.","format":"int32"},"success":{"type":["null","boolean"],"description":"Whether it succeeded."},"duration":{"type":["null","string"],"description":"Run time, as `[d.]hh:mm:ss[.fffffff]`.","format":"date-span"}},"additionalProperties":false,"description":"One delivery of an automation run; a postponed occurrence appears once per delivery."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/automations/executions":{"get":{"tags":["Automations"],"summary":"List recent executions","description":"Runs of every automation over the last 90 days.\nSortable by `startDate`, `taskId`, `taskType`, `duration`, `retryIndex`.\nTotal count in the `x-pagination-total` header.","parameters":[{"name":"pageIndex","in":"query","description":"Zero-based page index. Default 0.","schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","description":"Page size, 1 to 200. Default 20.","schema":{"type":"integer","format":"int32","default":20}},{"name":"sortBy","in":"query","description":"Sort keys, as `sortBy[0].field` and `sortBy[0].direction`. Defaults to `startDate` descending.","schema":{"type":"array","items":{"description":"One sort key, passed as `sortBy[i].field` and `sortBy[i].direction`. Keys apply in order; ties break by execution id, descending.","$ref":"#/components/schemas/AutomationSortModel"}}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Executions returned.","content":{"text/plain":{"schema":{"type":"array","items":{"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its automation.","$ref":"#/components/schemas/ExecutionSummary"}}},"application/json":{"schema":{"type":"array","items":{"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its automation.","$ref":"#/components/schemas/ExecutionSummary"}}},"text/json":{"schema":{"type":"array","items":{"description":"An Neo.Web.Api.Scheduler.Controllers.AutomationsController.Execution with its automation.","$ref":"#/components/schemas/ExecutionSummary"}}}}},"400":{"description":"Invalid query parameter.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.configuration.automation:read</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/api-reference/tenant-configuration/automations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
