Beladed Docs
Help Sign in Create account

Beladed Marketing API

Create Campaign

beta

Create Campaign through the reviewed Beladed Marketing contract.

POST/api/marketing/campaign/create
curl --request POST 'https://api.beladed.dev/api/marketing/campaign/create' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Beladed-API-Key: BELADED_SECRET_KEY' \
  --data '{
  "workspaceId": "id_demo_001",
  "title": "Summer Sale Campaign",
  "description": "Automated social media campaign for summer sale",
  "tags": [
    "summer",
    "sale"
  ],
  "objective": "conversion",
  "category": "ecommerce",
  "subCategory": "seasonal",
  "automationSettings": {
    "autoPost": true,
    "autoReply": false,
    "autoEmail": "[email protected]",
    "autoSms": false,
    "scheduledPosts": [
      {
        "platform": "instagram",
        "time": "09:00",
        "content": "Summer sale starts now!"
      }
    ]
  },
  "targetAudience": {
    "demographics": {
      "age": "18-35",
      "location": "US"
    },
    "interests": [
      "fashion",
      "shopping"
    ],
    "behaviors": [
      "online_shopper"
    ]
  },
  "schedule": {
    "startDate": "2024-06-01",
    "endDate": "2024-08-31",
    "timezone": "UTC",
    "frequency": "daily"
  },
  "budget": 1000
}'

Parameters

This operation has no documented parameters.

Request body

Requestapplication/json
Schema
{
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "objective": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "subCategory": {
      "type": "string"
    },
    "automationSettings": {
      "type": "object",
      "properties": {
        "autoPost": {
          "type": "boolean"
        },
        "autoReply": {
          "type": "boolean"
        },
        "autoEmail": {
          "type": "string"
        },
        "autoSms": {
          "type": "boolean"
        },
        "scheduledPosts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "platform": {
                "type": "string"
              },
              "time": {
                "type": "string"
              },
              "content": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "targetAudience": {
      "type": "object",
      "properties": {
        "demographics": {
          "type": "object",
          "properties": {
            "age": {
              "type": "string"
            },
            "location": {
              "type": "string"
            }
          }
        },
        "interests": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "behaviors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "schedule": {
      "type": "object",
      "properties": {
        "startDate": {
          "type": "string"
        },
        "endDate": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        },
        "frequency": {
          "type": "string"
        }
      }
    },
    "budget": {
      "type": "integer"
    }
  }
}
{
  "workspaceId": "id_demo_001",
  "title": "Summer Sale Campaign",
  "description": "Automated social media campaign for summer sale",
  "tags": [
    "summer",
    "sale"
  ],
  "objective": "conversion",
  "category": "ecommerce",
  "subCategory": "seasonal",
  "automationSettings": {
    "autoPost": true,
    "autoReply": false,
    "autoEmail": "[email protected]",
    "autoSms": false,
    "scheduledPosts": [
      {
        "platform": "instagram",
        "time": "09:00",
        "content": "Summer sale starts now!"
      }
    ]
  },
  "targetAudience": {
    "demographics": {
      "age": "18-35",
      "location": "US"
    },
    "interests": [
      "fashion",
      "shopping"
    ],
    "behaviors": [
      "online_shopper"
    ]
  },
  "schedule": {
    "startDate": "2024-06-01",
    "endDate": "2024-08-31",
    "timezone": "UTC",
    "frequency": "daily"
  },
  "budget": 1000
}

Responses

200The request succeeded.
Responseapplication/json
Schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "requestId": {
      "type": "string"
    }
  }
}
{
  "data": {
    "id": "id_demo_001",
    "status": "available"
  },
  "requestId": "req_demo_001"
}

Errors

400invalid_request

The request did not satisfy the documented contract.

401authentication_required

The credential is missing or invalid.

403not_authorized

The account, product scope, permission, or origin is not eligible.

404not_found

The requested public or account-owned resource was not found.

429rate_limited

Retry after the current product limit resets.

Reliability

Idempotency
No public Idempotency-Key guarantee is declared; use a stable client reference and confirm resource state before retrying.
Pagination
Not applicable.
Rate limit
Subject to current account, product, and abuse-protection limits. Honor Retry-After when returned.
Webhook events
No related public event is declared.

Contract provenance

This operation is published from reviewed repository contracts. Source metadata is included for traceability without exposing internal implementation details.

Route owner
../beladed-api-cloudflare/src/functions/marketing.js
Handler owner
../beladed-api-cloudflare/src/functions/core/MarketingCampaign.js
Verified
2026-07-11
Type to search the complete public documentation catalog.