POST
/
v1
/
events
/
{event_name}
/
wait
JavaScript
import Anchorbrowser from 'anchorbrowser';

const client = new Anchorbrowser({
  apiKey: 'My API Key',
});

const response = await client.events.waitFor('workflow_completed');

console.log(response.data);
{
  "data": {
    "message": "Task completed",
    "result": "success",
    "timestamp": "2024-01-01T12:00:00Z"
  }
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Path Parameters

event_name
string
required

The name of the event to wait for

Example:

"workflow_completed"

Body

application/json

Response

200
application/json

Event was signaled successfully

The response is of type object.