Delete a campaign group
Contents
- Overview
- Version-specific information
- Permissions and authentication
- HTTP parameters
- Headers
- Sample request
- Sample response
- Possible error responses
Overview
Call name | delete-campaign-group |
---|---|
Endpoint URL | https://api0.spaaza.com/internal/delete-campaign-group |
Request methods | DELETE |
Request Content-Type | application/json, application/x-www-form-urlencoded |
Response Content-Type | application/json |
Auth required | yes |
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:
Parameter | Description |
---|---|
id | (integer, mandatory) The ID of the campaign group to delete |
Headers
The following headers can/must be passed to the API call:
Parameter | Description |
---|---|
N/A | N/A |
Sample request
curl -X DELETE https://api0.spaaza.com/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:
Code | Name and Description | HTTP Status Code |
---|---|---|
6 | no_valid_session The user needs to be logged in and a valid session key needs to be sent | 401 |
68 | permission_denied_or_non_existent This user has insufficient permissions for this object or the object does not exist. | 403 |
419 | parameter_invalid One of the parameters is invalid and should be in a different format. | 400 |
441 | parameter_missing A parameter is missing | 400 |