API ReferenceapicommsPOST /v1/admin/campaigns/{id}/cancel

POST /v1/admin/campaigns/\{id\}/cancel

Service: comms · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Responses

200 Campaign cancelled

{
  "type": "object",
  "properties": {
    "campaign": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "brand_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "channel": {
          "type": "string"
        },
        "template_key": {
          "type": "string"
        },
        "segment_criteria": {
          "type": "object",
          "additionalProperties": {}
        },
        "variables": {
          "type": "object",
          "additionalProperties": {}
        },
        "status": {
          "type": "string"
        },
        "scheduled_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "sent_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "cancelled_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_by": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "brand_id",
        "name",
        "subject",
        "channel",
        "template_key",
        "segment_criteria",
        "variables",
        "status",
        "scheduled_at",
        "sent_at",
        "cancelled_at",
        "created_by",
        "created_at",
        "updated_at"
      ]
    }
  },
  "required": [
    "campaign"
  ]
}

404 Campaign not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

500 Cancel failed

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://comms.platform.loop.health/v1/admin/campaigns/{id}/cancel \
  -H "Authorization: Bearer $ACCESS_TOKEN"