curl --request PUT \
--url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} \
--header 'Content-Type: application/json' \
--header 'X-Management-Id: <api-key>' \
--header 'X-Management-Token: <api-key>' \
--data '{}'{
"id": "ms_u3bIQLbdU0fi3rhqpTLiF26T",
"related_object": "reward",
"properties": {
"region": {
"type": "string",
"array": true,
"optional": false,
"object_type": null,
"eq": [
"EMEA",
"APAC",
"LATAM",
"NA",
"EU"
]
}
},
"allow_defined_only": false,
"created_at": "2024-04-29T12:03:55.991Z",
"updated_at": "2024-04-29T12:06:20.866Z",
"object": "metadata_schema"
}Update Custom Event Schema
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": truein the request. However, you cannot permanently remove an event definition or its property with this endpoint.
๐ Custom Event Documentation
Read Custom Events article to learn how custom events work in Voucherify.
Read also the details about the Track Custom Event endpoint and the Custom Event Object.
curl --request PUT \
--url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId} \
--header 'Content-Type: application/json' \
--header 'X-Management-Id: <api-key>' \
--header 'X-Management-Token: <api-key>' \
--data '{}'{
"id": "ms_u3bIQLbdU0fi3rhqpTLiF26T",
"related_object": "reward",
"properties": {
"region": {
"type": "string",
"array": true,
"optional": false,
"object_type": null,
"eq": [
"EMEA",
"APAC",
"LATAM",
"NA",
"EU"
]
}
},
"allow_defined_only": false,
"created_at": "2024-04-29T12:03:55.991Z",
"updated_at": "2024-04-29T12:06:20.866Z",
"object": "metadata_schema"
}Documentation Index
Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Provide the unique identifier of the project.
"proj_TrlkLiH4"
Provide the unique identifier of the custom event schema.
"ms_f1r5Tcu5T0m3v3nT5ch3ma"
Body
Defines the custom event schema to be updated.
Request body schema for POST /management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}.
Object containing custom event schema and its custom attributes (metadata).
Show child attributes
Show child attributes
Response
Returns the details about the updated custom event schema.
Response body schema for POST /management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}.
Unique identifier of the custom event schema.
"ms_oA8CawM07Q8i05Cx62U6euTK"
User-defined name of the custom event. This is also shown in Project Settings > Event Schema in the Voucherify Dashboard.
Object containing custom event schema and its custom attributes (metadata).
Show child attributes
Show child attributes
Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format.
"2024-03-27T08:00:09.472Z"
The type of the object represented by JSON.
custom-event-schema "custom-event-schema"
Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format.
"2024-03-27T08:00:09.472Z"
Was this page helpful?

