---
title: "Submit an external event to a waiting instance"
method: POST
path: "/v1/workflows/instances/{id}/events"
tags: ["Instances"]
---

# Submit an external event to a waiting instance

`POST /v1/workflows/instances/{id}/events`

## Request

- Base URL: `https://api.paymongo.com`
- URL: `https://api.paymongo.com/v1/workflows/instances/{id}/events`
- Auth: HTTP basic

Delivers an external event to a workflow instance that is paused on a wait_event step, resuming its execution.

## Path parameters

- `id` string, required

## Headers

- `Organization-Id` string, required

## Request body

- SubmitEventRequest
  - `event_name` string, required
  - `payload` object
  - `resolution` string

## Response `200`

Event submitted

- SubmitEventResponse
  - `data` SubmitEventData
    - `event_name` string
    - `instance_id` string
    - `processed_at` string
    - `status` string
    - `step_index` integer

## Other responses

- `400`: invalid_request_body, missing_organization_id, invalid_resolution, invalid_instance_status when the instance is not running, invalid_event_payload or invalid_payload_schema
- `401`: authentication_failed, missing_authorization_header, unsupported_auth_method or jwt_signature_invalid when the credential is missing, malformed or rejected; accountid_identity_required when a superuser or service-to-service caller sends the Account-ID header
- `404`: instance_not_found, the instance is not found in this account and mode; wait_state_not_found, the instance has no wait state for event_name
- `409`: event_window_expired when the wait timed out or failed, wait_state_cancelled when it was cancelled
- `422`: step_not_waiting, the wait state is in an unexpected status
- `500`: Internal server error
- `502`: accountid_relationship_lookup_failed or accountid_account_lookup_failed when an upstream service does not answer
- `503`: upstream_unavailable when an upstream service does not answer
- `504`: service_timeout when the request exceeds its deadline

---

[API](https://skmtc.dev/paymongo/apis/workflow.md) - [All operations](https://skmtc.dev/paymongo/apis/workflow/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/workflow/revisions/859719cfffa2?raw)
