# Send an event to a machine instance. **POST /machines/{machineSlug}/i/{instanceSlug}/events** Send an event to the machine instance that was previously created by calling `POST /machines/{machineSlug}`. The `allowWrite` function for the machine definition version will be called to authorize the send and, if it fails, a 403 with code `rejected-by-machine-authorizer` will be returned. Otherwise, the state of the machine instance after any transitions resulting from the event will be returned. The request will wait for the machine to settle before returning a response. Settling means that the machine has reached a stable state and has no child services running. All top-level events have a 10 second timeout for the machine to settle. If the machine does not settle within 10 seconds but has completed at least one transition successfully, a 200 with the current state will be returned, the child services will be stopped, and error events will be delivered for each stopped service before the next event is sent. ## Servers - Production server: https://api.statebacked.dev (Production server) ## Authentication methods - Bearer auth ## Parameters #### Path parameters - **machineSlug** (string) The slug/name for the machine definition. - **instanceSlug** (string) The slug/name for the machine instance. ## Body parameters Content-type: Request to send an event to an instance of a machine. - **event** (object | string) ## Responses ### 200: The event was delivered successfully. #### Body Parameters: (object) - **ts** (number) Timestamp for when the state was created - **state** (string | object) - **publicContext** (object) The public context of the machine instance. This includes all context under the `public` key. - **tags** (array[string]) Array of tags for the current states - **done** (boolean) Is the state machine complete ### 403: The request was unauthorized. #### Body Parameters: (object) - **error** (string) A description of the error. - **code** (string) A code specifying the type of error. [Powered by Bump.sh](https://bump.sh)