Skip to main content
Applies one event to a filing session and returns the resulting form. Events set a field, invoke an action such as advancing to the next step, or search the values of a field. This operation authenticates with the session token returned by create filing session, not an API key. See session tokens.

Request

integer
required
The state version of the session that this event applies to. Use the state_version from your most recent response.
object
required
The event to process. It has a kind that selects one of the shapes below.

Response

object
The form to render after the event was applied. See the form reference.
integer
The new state version of the session. Use it for your next request.

Concurrency

A session handles one event at a time, and every event names the state version it was based on. This keeps two clients, or a client and a retry, from overwriting each other. If a request fails after you sent it and you cannot tell whether it was applied, send it again with the same state_version: if it was applied the session has moved on, and you get stale_state with the current form instead of a second application.

Errors

The session no longer exists.
Another request for this session is in progress. Wait briefly and retry the same event.
The state_version did not match the session’s current version. The error includes the current form and state_version. Use those rather than retrying blindly, since the field or action you intended may no longer apply.
The session has expired. This is terminal.

Example

Request
Response
Stale state