# Add a mail to a triggered campaign

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "v1",
    "title": "BulkEmail API"
  },
  "paths": {
    "/bulkemail/v1.0/accounts/{accountID}/campaigns/{campaignID}/mails": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Add a mail to a triggered campaign",
        "operationId": "Mail_AddCampaignMailAsync",
        "parameters": [
          {
            "name": "accountID",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "campaignID",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiCampaignMail"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiCampaignMail"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiCampaignMail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiCampaignMail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiCampaignMail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiCampaignMail"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiCampaignMail"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "http://api.cm.com"
    }
  ],
  "components": {
    "schemas": {
      "CM.Tooling.BulkEmail.Api.Models.ApiCustomValue": {
        "type": "object",
        "properties": {
          "Field": {
            "type": "string"
          },
          "Value": {
            "type": "string"
          }
        }
      },
      "CM.Tooling.BulkEmail.Api.Models.ApiAttachment": {
        "type": "object",
        "properties": {
          "FileName": {
            "type": "string"
          },
          "Content": {
            "type": "string"
          },
          "ContentID": {
            "type": "string"
          }
        }
      },
      "CM.Tooling.BulkEmail.Api.Models.ApiCampaignMail": {
        "type": "object",
        "properties": {
          "ID": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "AccountID": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "CampaignID": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "ToAddress": {
            "type": "string"
          },
          "ToName": {
            "type": "string"
          },
          "CustomValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiCustomValue"
            }
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CM.Tooling.BulkEmail.Api.Models.ApiAttachment"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 185,
      "2": 237,
      "3": 253,
      "4": 116,
      "5": 245,
      "6": 103,
      "7": 0,
      "8": 154,
      "9": 36,
      "10": 170,
      "11": 110
    }
  }
}
```