> ## AI Agent Context
> - Full documentation index: https://aistudio.google.com/llms.txt
> - Gemini Docs MCP server (consistent live info): https://gemini-api-docs-mcp.dev
> - Coding agent skills & setup guide: https://aistudio.google.com/docs/coding-agents.md

# Running a trigger

{% callout type="note" %}
  This API is in Beta. Endpoints are under `/v1beta/`.

{% /callout %}

{% mark class="http-post" %}{% icon name="north_east" /%}`POST`{% /mark %} `https://generativelanguage.googleapis.com/v1beta/triggers/{triggerId}/executions`

Runs a trigger immediately.

{% two-column-layout %}
  {% left-column %}
## Parameters  {% class="hide-from-toc" id="parameters" %}

  {% section class="api-ref-property-list" %}
  **triggerId**: {% mark %}required{% /mark %} `string`

  Resource name of the trigger.

  {% /section %}

  {% /left-column %}

  {% right-column class="sticky" %}
  **Example request** {% class="example-heading" %}

  {% tabs %}
  {% tab label="REST" %}
  ```sh
  curl -X POST "https://generativelanguage.googleapis.com/v1beta/triggers/$TRIGGER_ID/executions" \
    -H "x-goog-api-key: $GEMINI_API_KEY"
  ```

  {% /tab %}

  {% /tabs %}

  {% /right-column %}

{% /two-column-layout %}

{% two-column-layout %}
  {% left-column %}
## Response  {% class="hide-from-toc" id="response" %}

  {% section class="api-ref-property-list" %}
  **id**: {% mark %}required{% /mark %} `string`

  Output only. Identifier. The ID of the trigger execution.

  {% hr /%}

  **trigger_id**: {% mark %}required{% /mark %} `string`

  Output only. Identifier. The ID of the trigger that created this execution.

  {% hr /%}

  **scheduled_time**: `string`

  Output only. The time when the execution was scheduled to run.

  {% hr /%}

  **start_time**: `string`

  Output only. The time when the execution started.

  {% hr /%}

  **end_time**: `string`

  Output only. The time when the execution finished.

  {% hr /%}

  {% details %}
  {% summary %}
  **status**: `string enum`

  Output only. The status of the execution.

  {% /summary %}

  Possible values:

  - `in_progress`: The execution is currently in progress.
  - `completed`: The execution completed successfully.
  - `failed`: The execution failed.
  - `skipped`: The execution was skipped (e.g., previous execution still running).
  - `timed_out`: The execution timed out.

  {% /details %}

  {% hr /%}

  **interaction_id**: `string`

  Output only. The ID of the interaction created by this execution, if any.

  {% hr /%}

  **environment_id**: `string`

  Output only. The environment ID used for the execution.

  {% hr /%}

  **error**: `string`

  Output only. The error message if the execution failed.

  {% /section %}

  {% /left-column %}

  {% right-column class="sticky" %}
  **Example response** {% class="example-heading" %}

  ```json
  {
    "id": "string",
    "trigger_id": "string",
    "scheduled_time": "string",
    "start_time": "string",
    "end_time": "string",
    "status": "in_progress",
    "interaction_id": "string",
    "environment_id": "string",
    "error": "string"
  }
  ```

  {% /right-column %}

{% /two-column-layout %}

