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"
}{
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property .properties.Size.eq.0 must be number",
"request_id": "v-0ea5a9b9b3402940a9"
}{
"code": 401,
"message": "Unauthorized",
"key": "unauthorized"
}{
"code": 402,
"message": "Payment required",
"details": "Your current plan does not include a feature required to perform this operation.",
"key": "missing_required_feature"
}{
"code": 404,
"message": "Resource not found",
"details": "Cannot find project with id proj_2F3txY7"
}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.
-
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.
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"
}{
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property .properties.Size.eq.0 must be number",
"request_id": "v-0ea5a9b9b3402940a9"
}{
"code": 401,
"message": "Unauthorized",
"key": "unauthorized"
}{
"code": 402,
"message": "Payment required",
"details": "Your current plan does not include a feature required to perform this operation.",
"key": "missing_required_feature"
}{
"code": 404,
"message": "Resource not found",
"details": "Cannot find project with id proj_2F3txY7"
}Path Parameters
Body
Defines the custom event schema to be updated.
Response
Returns the details about the updated custom event schema.
Response body schema for POST /management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}.

