{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"**This endpoint allows you to create a new Single Send.**\n\nPlease note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object.\n\nThis endpoint will create a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI.","properties":{"body":{"$ref":"#/definitions/SinglesendRequest"}},"required":[],"additionalProperties":false,"definitions":{"SinglesendRequest":{"title":"singlesend_request","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The name of the Single Send."},"categories":{"type":"array","uniqueItems":true,"maxItems":10,"description":"The categories to associate with this Single Send.","items":{"type":"string"}},"send_at":{"type":["string","null"],"description":"Set this property to an ISO 8601 formatted date-time when you would like to send the Single Send. Please note that any `send_at` property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. Additionally, the `now` keyword is a valid `send_at` value only when using the Schedule Single Send endpoint. Setting this property to `now` with this endpoint will cause an error.","format":"date-time"},"send_to":{"type":"object","properties":{"list_ids":{"type":"array","description":"The recipient List IDs that will receive the Single Send.","maxItems":50,"items":{"type":"string","format":"uuid"}},"segment_ids":{"type":"array","description":"The recipient Segment IDs that will receive the Single Send.","maxItems":10,"items":{"type":"string","format":"uuid"}},"all":{"type":"boolean","description":"Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients.","default":false}}},"email_config":{"type":"object","properties":{"subject":{"type":"string","description":"The subject line of the Single Send. Do not include this field when using a `design_id`."},"html_content":{"type":"string","description":"The HTML content of the Single Send. Do not include this field when using a `design_id`."},"plain_content":{"type":"string","description":"The plain text content of the Single Send. Do not include this field when using a `design_id`."},"generate_plain_content":{"type":"boolean","description":"If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered.","default":true},"design_id":{"type":"string","description":"A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App."},"editor":{"allOf":[{"$ref":"#/definitions/Editor"},{"type":"string","default":"code"}]},"suppression_group_id":{"description":"The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`.","type":["integer","null"]},"custom_unsubscribe_url":{"description":"The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`.","format":"uri","type":["string","null"]},"sender_id":{"description":"The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App.","type":["integer","null"]},"ip_pool":{"description":"The name of the IP Pool from which the Single Send emails are sent.","type":["string","null"]}}}},"required":["name"]},"Editor":{"type":"string","enum":["code","design"]}}},"name":"Create Single Send","id":"sendgrid.mc_singlesends.createsinglesend","example":{},"maxRequests":1,"summary":false}}