To partially update an event with the provided fields, make a PATCH call to the /events/{event_id} endpoint. Only the specified fields are updated. This endpoint only works for events in DRAFT or ACTIVE status.
Parameters
event_id: (path, string) Required. The ID that uniquely identifies the event. Example:1697732a-8664-4675-8415-c4aabaa17dae.
Request Examples
PATCH https://api.cc.email/v3/events/{event_id}
Endpoint Requirements
User privileges: campaign:write
Authorization scopes: campaign_data
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.cc.email/v3/events/1697732a-8664-4675-8415-c4aabaa17dae',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS =>'{
"title": "Updated Event Title",
"description": "Updated event description."
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer {access_token}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location --request PATCH 'https://api.cc.email/v3/events/1697732a-8664-4675-8415-c4aabaa17dae' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data '{
"title": "Updated Event Title",
"description": "Updated event description."
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"title\": \"Updated Event Title\",\n \"description\": \"Updated event description.\"\n}");
Request request = new Request.Builder()
.url("https://api.cc.email/v3/events/1697732a-8664-4675-8415-c4aabaa17dae")
.method("PATCH", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.build();
Response response = client.newCall(request).execute();
Example Response
A successful update returns a 204 No Content response with no body.
To learn more about event schema, see Event Schema
Test the endpoint using our reference tester: Try it!