Access the Task API. You can instantiate a [Task.Client](./task-client.mdx) to receive tasks from a different application. Please check [Task Events](./task-client.mdx#events) for the full list of events that a [Task.Client](./task-client.mdx) can subscribe to. #### Example The following example listens for incoming tasks. javascript import { Task } from @signalwire/realtime-api; const client = new Task.Client({ project: , token: , topics: [office], }); client.on(task.received, (payload) => { console.log(Task Received, payload); // Do something with the payload... }); From a different process, even on a different machine, you can then send tasks: js import { Task } from @signalwire/realtime-api; await Task.send({ project: , token: , topic: office, message: { hello: [world, true] } }); ## Classes - [Client](./task-client.mdx) ## Functions ### send ▸ Const **send**(params): Promise Send a job to your Task Client in a specific topic. #### Parameters | Name | Type | Description | |:--|:--|:--| | params | Object | - | | params.topic | string | Topic to send the task to. Previously known as context. | | params.message | Record | Message to send. | | params.project | string | SignalWire project id, e.g. a10d8a9f-2166-4e82-56ff-118bc3a4840f. | | params.token | string | SignalWire project token, e.g. PT9e5660c101...a360079c9. | #### Returns Promise #### Example Sending a task with a message to then make an outbound Call. Please note that the call is _not_ performed automatically: your [Task.Client](./task-client.mdx) gives you back your payload, which you should interpret by your own custom logic. js const message = { action: call, from: +18881112222, to: +18881113333 } await Task.send({ project: , token: , topic: office, message: message })