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

# Trigger an event

This API triggers a Refold [event](https://app.gocobalt.io/developer/events). This would trigger
all the workflows associated with the specified event.

## Request description

#### Headers

<ParamField header="linked_account_id" type="string" required>
  Unique customer identification id. For Eg: [markwood@some\_email.com](mailto:markwood@some_email.com)
</ParamField>

<ParamField header="config_id" type="string">
  Config Id for the linked account. If not provided, `linked_account_id` is considered by default.
</ParamField>

<ParamField header="slug" type="string">
  Application slug to scope the trigger to a specific app. For Eg: `hubspot`. If not provided, all workflows associated with the event will be triggered.
</ParamField>

#### Body Parameters

<ParamField body="event" type="string" required>
  Event Name
</ParamField>

<ParamField body="payload" type="object">
  Event payload with user data required for the workflow.

  ```JSON Example payload theme={null}
    {
      "first_name": "Mark",
      "last_name": "Wood",
      "employee_id": 221,
      "is_new": false,
      "address": {
        "house_no": "221",
        "street": "lorem ipsum",
        "pincode": 560103
      }
    }
  ```
</ParamField>

## Response description

<Tabs>
  <Tab title="200">
    <ResponseField name="message" type="string">
      System generated message
    </ResponseField>
  </Tab>

  <Tab title="Error">
    <ResponseField name="status_code" type="integer">
      System generated status Code
    </ResponseField>

    <ResponseField name="http_error_type" type="string">
      System generated error type
    </ResponseField>

    <ResponseField name="error_code" type="string">
      Specific error code to identify the error
    </ResponseField>

    <ResponseField name="message" type="string">
      Error message
    </ResponseField>
  </Tab>
</Tabs>

<ResponseExample>
  ```JSON 200 theme={null}
  {
      "message": "Webhook Fired Success"
  }
  ```

  ```JSON 401 theme={null}
  {
      "status_code": 401,
      "http_error_type": "UNAUTHORIZED",
      "error_code": "SERVER_ERROR",
      "message": "Invalid Credentials"
  }
  ```

  ```JSON 404 theme={null}
  {
      "status_code": 404,
      "http_error_type": "NOT_FOUND",
      "error_code": "INVALID_EVENT",
      "message": "Trigger not found"
  }
  ```
</ResponseExample>
