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

# api.triggerTarget()

> Public low-code contract, signatures and examples for api.triggerTarget.

## `api.triggerTarget()`

Schedules generic execution against a normalized target.

Notes:

* Use `JOB_TEMPLATE` for legacy template execution or `AGENT` for agent-native dispatch.
* Pass `&#123; scheduleFor &#125;`; the maximum horizon is 30 days.
* Retired positional date and relative-delay arguments are ignored.
* Unavailable with `readOnly: true` (throws an error).
* For `JOB_TEMPLATE`, `targetId` accepts an exact active template ID or unique name.
  The third argument is copied directly into the
  target job's flat `api.input().templateInputs`. It is shallow-spread over
  template defaults, retaining non-colliding defaults and overwriting only
  matching keys; it is never nested below another input property.

### Signature

```ts theme={null}
static triggerTarget(
      targetType: ExecutionTargetType,
      targetId: string,
      input?: Record<string, JsonValue>,
      options?: AutomationScheduleOptions,
    ): Promise<string>;
```

### Example

```ts theme={null}
const jobId = await api.triggerTarget(
  'JOB_TEMPLATE',
  templateId,
  { customerId: 'c-1' },
  { scheduleFor: Date.now() + 5 * 60 * 1000 },
);
```

See [all api methods](https://docs.revoengine.com/low-code/reference/api.md) or [runtime basics](https://docs.revoengine.com/low-code/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.