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

# emit

> Emit an event to start workflows and wake waiting runs.

```ts theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
nelkap.emit(input: EmitEventInput): Promise<{ runIds: string[] }>
```

## Parameters

**event** `string` *required*

The event's name. Every enabled workflow of the project listening for it starts a run. Up to 256 characters.

**payload** `unknown`

Any JSON value. The runs the event starts get it as their payload, and the runs it wakes get it from `step.wait`.

**tags** `string[]`

Tags given to the runs the event starts. Up to 10, each up to 128 characters.

**wakeOn** `string`

The key of the runs to wake. Every run of the project waiting on it goes on. Up to 256 characters.

## Returns

**runIds** `string[]`

The ids of the runs the event started.

## Errors

| Error | When |
| - | - |
| `NelkapError` `badRequest` | A field breaks a rule above. |

Any call can also get the errors listed in [Errors](https://docs.nelkap.com/reference/errors.md#api-errors).

## Example

```ts theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
await nelkap.emit({ event: 'refund.reviewed', payload: { approved: true }, wakeOn: 'refund_ord_42' });
```


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