---
title: "Update Custom Event Schema"
method: PUT
path: "/management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId}"
tags: ["Management"]
---

# Update Custom Event Schema

`PUT /management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId}`

Updates a custom event schema.

With this request, you can:
- Add a nonexistent property to a custom event schema.
- Update an existing property.

In the request, you can provide only those properties you want to add or update. Definitions omitted in the request remain unchanged.

> 👍 Additional Notes
>
>- You can change the type of an existing property, e.g. from `"string"` to `"number"`.
>
>- You can remove a custom property with this endpoint by providing `"deleted": true` in the request. However, you cannot permanently remove an event definition or its property with this endpoint.

> 📘 Custom Event Documentation
>
> Read [Custom Events](/prepare/custom-events) article to learn how custom events work in Voucherify.
>
>Read also the details about the [Track Custom Event](/api-reference/events/track-custom-event) endpoint and the [Custom Event Object](/api-reference/events/event-object).

## Request body

- ManagementProjectsCustomEventSchemasUpdateRequestBody — Object representing a custom event schema.
  - `schema` object — Object containing custom event schema and its custom attributes (metadata).
    - `properties` object, required — Defines custom event custom attributes (metadata).

## Response `200`

Returns the details about the updated custom event schema.

- ManagementProjectsCustomEventSchemasUpdateResponseBody — Object representing a custom event schema.
  - `id` string, required — Unique identifier of the custom event schema.
  - `name` string, required — User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard.
  - `schema` object, required — Object containing custom event schema and its custom attributes (metadata).
    - `properties` object, required — Defines custom event custom attributes (metadata).
  - `created_at` string, date-time, required — Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format.
  - `updated_at` string, date-time — Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format.
  - `object` 'custom-event-schema', required — The type of the object represented by JSON.

## Other responses

- `400` — Returns an error if the payload includes incorrect details.
- `401` — Returns an error if an invalid token was provided.
- `402` — Returns an error if the current plan does not include the Management API feature.
- `404` — Returns an error when a resource could not be found.

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-api-async-actions/versions/4982266e0494/schema)
