# Update Event

PATCH

/

events

/

:id

:::code-group
```typescript title="Node.js"
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.events.update('user.created', {
  schema: {
    plan: 'string',
    trial: 'boolean',
  },
});
```

```php title="PHP"
$resend = Resend::client('re_xxxxxxxxx');

$resend->events->update('user.created', [
  'schema' => [
    'plan' => 'string',
    'trial' => 'boolean',
  ],
]);
```

```python title="Python"
import resend

resend.api_key = "re_xxxxxxxxx"

params: resend.Events.UpdateParams = {
  "identifier": "user.created",
  "schema": {
    "plan": "string",
    "trial": "boolean",
  },
}

resend.Events.update(params)
```

```ruby title="Ruby"
require "resend"

Resend.api_key = "re_xxxxxxxxx"

params = {
  identifier: "user.created",
  schema: {
    plan: "string",
    trial: "boolean",
  },
}

Resend::Events.update(params)
```

```go title="Go"
package main

import "github.com/resend/resend-go/v4"

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	params := &resend.UpdateEventRequest{
		Schema: map[string]string{
			"plan":  resend.EventSchemaTypeString,
			"trial": resend.EventSchemaTypeBoolean,
		},
	}

	client.Events.Update("user.created", params)
}
```

```rust title="Rust"
use resend_rs::{json, types::UpdateEventOptions, Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let opts = UpdateEventOptions {
    schema: json!({
      "plan": "string",
      "trial": "boolean",
    }),
  };

  let _event = resend.events.update("user.created", opts).await?;

  Ok(())
}
```

```java title="Java"
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.events.model.UpdateEventOptions;
import com.resend.services.events.model.UpdateEventResponseSuccess;

public class Main {
    public static void main(String[] args) throws ResendException {
        Resend resend = new Resend("re_xxxxxxxxx");

        UpdateEventOptions params = UpdateEventOptions.builder()
                .identifier("user.created")
                .addSchema("plan", "string")
                .addSchema("trial", "boolean")
                .build();

        UpdateEventResponseSuccess data = resend.events().update(params);
    }
}
```

```csharp title=".NET"
using Resend;
using System.Text.Json;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" );

var schema = JsonSerializer.SerializeToElement( new { plan = "string", trial = "boolean" } );

var resp = await resend.EventUpdateAsync( "user.created", new EventUpdateData { Schema = schema } );
Console.WriteLine( "EventId={0}", resp.Content );
```

```shellscript title="cURL"
curl -X PATCH 'https://api.resend.com/events/user.created' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d '{
  "schema": {
    "plan": "string",
    "trial": "boolean"
  }
}'
```

```shellscript title="CLI"
resend events update user.created --schema '{"plan":"string","trial":"boolean"}'
```
:::

:::code-group
```json title="Response"
{
  "object": "event",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
```
:::

## Path Parameters

## Body Parameters

object

required

The updated schema definition for the event payload. Must be an object with flat key/type pairs, or `null` to clear the schema. Supported types: `string`, `number`, `boolean`, `date`.

:::code-group
```typescript title="Node.js"
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.events.update('user.created', {
  schema: {
    plan: 'string',
    trial: 'boolean',
  },
});
```

```php title="PHP"
$resend = Resend::client('re_xxxxxxxxx');

$resend->events->update('user.created', [
  'schema' => [
    'plan' => 'string',
    'trial' => 'boolean',
  ],
]);
```

```python title="Python"
import resend

resend.api_key = "re_xxxxxxxxx"

params: resend.Events.UpdateParams = {
  "identifier": "user.created",
  "schema": {
    "plan": "string",
    "trial": "boolean",
  },
}

resend.Events.update(params)
```

```ruby title="Ruby"
require "resend"

Resend.api_key = "re_xxxxxxxxx"

params = {
  identifier: "user.created",
  schema: {
    plan: "string",
    trial: "boolean",
  },
}

Resend::Events.update(params)
```

```go title="Go"
package main

import "github.com/resend/resend-go/v4"

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	params := &resend.UpdateEventRequest{
		Schema: map[string]string{
			"plan":  resend.EventSchemaTypeString,
			"trial": resend.EventSchemaTypeBoolean,
		},
	}

	client.Events.Update("user.created", params)
}
```

```rust title="Rust"
use resend_rs::{json, types::UpdateEventOptions, Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let opts = UpdateEventOptions {
    schema: json!({
      "plan": "string",
      "trial": "boolean",
    }),
  };

  let _event = resend.events.update("user.created", opts).await?;

  Ok(())
}
```

```java title="Java"
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.events.model.UpdateEventOptions;
import com.resend.services.events.model.UpdateEventResponseSuccess;

public class Main {
    public static void main(String[] args) throws ResendException {
        Resend resend = new Resend("re_xxxxxxxxx");

        UpdateEventOptions params = UpdateEventOptions.builder()
                .identifier("user.created")
                .addSchema("plan", "string")
                .addSchema("trial", "boolean")
                .build();

        UpdateEventResponseSuccess data = resend.events().update(params);
    }
}
```

```csharp title=".NET"
using Resend;
using System.Text.Json;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" );

var schema = JsonSerializer.SerializeToElement( new { plan = "string", trial = "boolean" } );

var resp = await resend.EventUpdateAsync( "user.created", new EventUpdateData { Schema = schema } );
Console.WriteLine( "EventId={0}", resp.Content );
```

```shellscript title="cURL"
curl -X PATCH 'https://api.resend.com/events/user.created' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d '{
  "schema": {
    "plan": "string",
    "trial": "boolean"
  }
}'
```

```shellscript title="CLI"
resend events update user.created --schema '{"plan":"string","trial":"boolean"}'
```
:::

:::callout{intent="note"}
Successful updates return **200 OK** with the JSON body below.
:::

```json
{
  "object": "event",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
```

Was this page helpful?

⌘I

## Related pages

- [Account Management](./account-management-index.md)
- [API Keys](./api-keys-2-index.md)
- [API Keys](./api-keys-index.md)
- [API Reference](./api-reference-index.md)
- [AudiencesDEPRECATED](./audiencesdeprecated-index.md)
- [Authorized Apps](./authorized-apps-index.md)
- [Automations](./automations-index.md)
- [Broadcasts](./broadcasts-index.md)
- [Build with AI](./build-with-ai-index.md)
- [Changelog](../changelog.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
