Email CampaignsRename an Email Campaign
Rename an Email Campaign
Use PATCH /emails/{campaign_id} to rename an existing campaign.
The campaign name cannot exceed 80 characters and it is not visible to contacts. You cannot rename email campaigns that have a Removed status.
Authorization Requirements
User privileges: campaign:readAuthorization scopes: campaign_data
Parameters
Required parameters include the campaign_id and the name parameter in the request body.
-
Use the
campaign_idparameter in the URL to specify the campaign that you want to rename. For example:PATCH https://api.cc.email/v3/emails/{campaign_id} -
Use the
nameproperty in the request body parameter to specify the new unique email campaign name.
The response body returns general email campaign information, the new campaign name, and lists the role and campaign activity IDs associated with the campaign.
Example PATCH Email Campaign Name Request
PATCH
https://api.cc.email/v3/emails/{campaign_id}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"December Newsletter for Dog Lovers\"\n}");
Request request = new Request.Builder()
.url("https://api.cc.email/v3/emails/c71a1f71-8349-4bda-8387-855c003c2ce2")
.patch(body)
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("Content-Type", "application/json")
.addHeader("cache-control", "no-cache")
.addHeader("Postman-Token", "67bc6b49-496c-49b3-ae47-bccbe89a6f66")
.build();
Response response = client.newCall(request).execute();Response
{
"campaign_activities": [
{
"campaign_activity_id": "9aacbeea-82b3-47c1-ab50-e8014c2b1e72",
"role": "permalink"
},
{
"campaign_activity_id": "b8165ae1-338e-4946-a92c-6402e2ebd609",
"role": "primary_email"
}
],
"campaign_id": "c71a1f71-8349-4bda-8387-855c003c2ce2",
"created_at": "2019-01-25T19:58:28.000Z",
"current_status": "DRAFT",
"name": "December Newsletter for Dog Lovers",
"type": "CUSTOM_CODE_EMAIL",
"updated_at": "2019-01-31T22:20:04.000Z"
}