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

# Update a Signal's Backpack Rules

> Add new goodies or change the property rules of an existing event.

Did your app start sending a new detail in an event's backpack (like adding `referral_code` to `user.signup`)?

Use this endpoint to update the event's rulebook so Mailofly knows how to recognize and format the new property!

### Path Parameters

<ParamField path="id" type="string" required>
  The ID badge or the name of the event (e.g. `"evt_4b219081..."` or `"user.signup"`).
</ParamField>

### Body

<ParamField body="schema" type="object" required>
  The updated map of backpack items and their types (`string`, `number`, or `boolean`).
</ParamField>

### Response

<ResponseField name="object" type="string">
  Always says `"event"`.
</ResponseField>

<ResponseField name="id" type="string">
  The ID badge of the updated event.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH 'https://api.mailofly.com/events/user.signup' \
    -H 'Authorization: Bearer mf_live_xxxxxxxx' \
    -H 'Content-Type: application/json' \
    -d '{
      "schema": {
        "first_name": "string",
        "plan": "string",
        "referral_code": "string"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  import { Mailofly } from "@mailofly/node";

  const mailofly = new Mailofly("mf_live_xxxxxxxx");

  const updated = await mailofly.events.update("user.signup", {
    schema: {
      first_name: "string",
      plan: "string",
      referral_code: "string"
    }
  });

  console.log("Updated signal:", updated.id);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "object": "event",
    "id": "evt_4b219081-3a11-4821-b810-091827361821"
  }
  ```
</ResponseExample>


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