You can get a list of all the campaign styles of a campaign by using the following endpoint. Note that this feature is reserved to premium campaigns.
{warning} Don't forget that all endpoints documented here need to be prefixed with
1.0/campaigns/{campaign.id}/
.
Method | URI | Headers |
---|---|---|
GET/HEAD | campaign_styles |
Default |
{
"data": [
{
"id": 1,
"name": "Campaign style",
"content": "css content",
"is_enabled": 1,
"is_theme": 0,
"created_by": "1",
"created_at": "2021-09-27T11:04:31.000000Z",
"updated_at": "2021-09-27T11:04:31.000000Z"
}
]
}
To get the details of a single campaign Style, use the following endpoint.
Method | URI | Headers |
---|---|---|
GET/HEAD | campaign_styles/{campaign-campaign-style.id} |
Default |
{
"data": {
"id": 1,
"name": "Campaign style",
"content": "css content",
"is_enabled": 1,
"is_theme": 0,
"created_by": "1",
"created_at": "2021-09-27T11:04:31.000000Z",
"updated_at": "2021-09-27T11:04:31.000000Z"
}
}
To create a campaign Style, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | campaign_styles |
Default |
Parameter | Type | Detail |
---|---|---|
name |
string (Required) |
The style name |
content |
string (Required) |
The css rules |
is_enabled |
boolean |
If the style is enabled or not |
{success} Code 200 with JSON body of the new campaign Style.
To update a campaign style, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | campaign_styles/{campaign-campaign-style.id} |
Default |
The same body parameters are available as for when creating a campaign Style.
{success} Code 200 with JSON body of the updated campaign Style.
To delete a campaign style, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | campaign_styles/{campaign-campaign-style.id} |
Default |
{success} Code 200 with JSON.