# Get Campaign Dependencies

Lists dependencies of an email or SMS newsletter, follow-up or automation, with links to the automations and campaigns that still use it. These references block deletion until removed. Reads only.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "campaignId": {
      "type": "integer",
      "description": "ID of a newsletter, SMS newsletter, follow-up or automation",
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "campaignId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "campaignId",
    "family",
    "name",
    "blocksDeletion",
    "dependencies"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "campaignId": {
      "type": "integer"
    },
    "family": {
      "type": "string",
      "enum": [
        "newsletter",
        "sms-newsletter",
        "autoresponder",
        "sms-autoresponder",
        "automation"
      ]
    },
    "name": {
      "type": "string"
    },
    "blocksDeletion": {
      "type": "boolean"
    },
    "dependencies": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "category",
          "categoryCode",
          "id",
          "type",
          "name",
          "editUrl"
        ],
        "properties": {
          "category": {
            "type": "string"
          },
          "categoryCode": {
            "type": "string",
            "enum": [
              "automation-step",
              "automation-condition",
              "campaign-audience",
              "automation-template",
              "other"
            ]
          },
          "id": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "editUrl": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

