{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"**This endpoint allows you to create a campaign.**\n\nIn order to send or schedule the campaign, you will be required to provide a subject, sender ID, content (we suggest both html and plain text), and at least one list or segment ID. This information is not required when you create a campaign.","properties":{"headers":{"type":"object","properties":{"on-behalf-of":{"type":"string","description":"The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information."}},"required":[],"additionalProperties":false},"body":{"$ref":"#/definitions/PostCampaignsRequest"}},"required":[],"additionalProperties":false,"definitions":{"PostCampaignsRequest":{"title":"Campaigns Request","type":"object","properties":{"title":{"type":"string","description":"The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI."},"subject":{"description":"The subject of your campaign that your recipients will see.","type":["string","null"]},"sender_id":{"description":"The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails.","type":["integer","null"]},"list_ids":{"description":"The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs","items":{"type":"integer"},"type":["array","null"]},"segment_ids":{"description":"The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs.","items":{"type":"integer"},"type":["array","null"]},"categories":{"description":"The categories you would like associated to this campaign.","items":{"type":"string"},"type":["array","null"]},"suppression_group_id":{"description":"The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type.","type":["integer","null"]},"custom_unsubscribe_url":{"description":"This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups.","type":["string","null"]},"ip_pool":{"description":"The pool of IPs that you would like to send this email from.","type":["string","null"]},"html_content":{"description":"The HTML of your marketing email.","type":["string","null"]},"plain_content":{"description":"The plain text content of your emails.","type":["string","null"]},"editor":{"allOf":[{"$ref":"#/definitions/Editor"},{"type":"string"}]}},"required":["title"],"examples":[{"id":986724,"title":"May Newsletter","subject":"New Products for Summer!","sender_id":124451,"list_ids":[110,124],"segment_ids":[110],"categories":["summer line"],"suppression_group_id":42,"custom_unsubscribe_url":"","ip_pool":"marketing","html_content":"<html><head><title></title></head><body><p>Check out our summer line!</p></body></html>","plain_content":"Check out our summer line!","status":"Draft"}]},"Editor":{"type":"string","enum":["code","design"]}}},"name":"Create a Campaign","id":"sendgrid.lmc_campaigns.createcampaign","example":{},"maxRequests":1,"summary":false}}