Skip to main content

Delete campaign group

Delete a campaign group

Contents

Overview

Call namedelete-campaign-group
Endpoint URLhttps://{API hostname}/internal/delete-campaign-group
Request methodsDELETE
Request Content-Typeapplication/json, application/x-www-form-urlencoded
Response Content-Typeapplication/json
Auth requiredyes

The delete-campaign-group endpoint allows you to delete a campaign group. When a campaign group is deleted, any campaigns that were associated with the group will be automatically removed from the group but the campaigns themselves will not be deleted.

Version-specific information

This endpoint is available from version 1.0.

Permissions and authentication

This endpoint requires admin authentication with DELETE access to the chain.

HTTP parameters

The following HTTP parameters can be passed to the API:

ParameterDescription
id(integer, mandatory) The ID of the campaign group to delete

Headers

The following headers can/must be passed to the API call:

ParameterDescription
N/AN/A

Sample request

curl -X DELETE https://{API hostname}/internal/delete-campaign-group \
-H "X-Spaaza-Session-User-Id: 1548854" \
-H "X-Spaaza-Session-Key: 564e5b4faa7f639dacf1983f1dae62155d5734b789b06b5986c43bfe2542854e" \
-H "X-Spaaza-API-Version: 1.5.8" \
-H "Content-Type: application/json" \
-d '{
"id": 456
}'

Sample response

{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"campaign_group": {
"id": 456,
"campaign_ids": [],
"created_date": "2025-06-01T12:00:00+00:00",
"last_modified_date": "2025-08-12T14:30:00+00:00",
"last_updated_by": [
{
"user_id": 1548854,
"name": "Admin User"
}
],
"name": "Summer Campaign Group",
"active_date_from": "2025-06-01T00:00:00+00:00",
"active_date_until": "2025-08-31T23:59:59+00:00"
},
"result_type": "delete-campaign-group"
}
}

Possible error responses

The following represents a list of possible error responses for the delete-campaign-group endpoint:

CodeName and DescriptionHTTP Status Code
6no_valid_session
The user needs to be logged in and a valid session key needs to be sent
401
68permission_denied_or_non_existent
This user has insufficient permissions for this object or the object does not exist.
403
419parameter_invalid
One of the parameters is invalid and should be in a different format.
400
441parameter_missing
A parameter is missing
400