Create a marketing/ad campaign
SessionCookie (EDITOR) OR MCP scope mcp:links_write. ?getOrCreate=1 resolves atomically by (projectId, name) and returns 200 instead of 201.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”projectId
required
string
Tenant project id (row-level isolation on every query).
Query Parameters
Section titled “Query Parameters”getOrCreate
string
When ‘1’, reuse-or-create by name and return 200.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Marketing/ad campaign create (non-email). Budget in major units, stored as cents.
object
name
required
string
type
string
platform
string | null
budget
number | null
utmSource
string | null
utmMedium
string | null
utmCampaign
string | null
utmTerm
string | null
utmContent
string | null
startDate
string | null
endDate
string | null
status
string
config
object | null
Examplegenerated
{ "name": "example", "type": "example", "platform": "example", "budget": 1, "utmSource": "example", "utmMedium": "example", "utmCampaign": "example", "utmTerm": "example", "utmContent": "example", "startDate": "example", "endDate": "example", "status": "example", "config": "example"}Responses
Section titled “Responses”Existing/created campaign (getOrCreate mode).
Media typeapplication/json
object
campaign
object
key
additional properties
any
Created campaign.
Media typeapplication/json
object
campaign
object
key
additional properties
any
Examplegenerated
{ "campaign": {}}Missing projectId or invalid config.
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Not authenticated (no valid session/principal).
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Authenticated but lacks the required project role.
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}