@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Twilio SendGrid Marketing Campaigns Single Sends API
@base https://api.sendgrid.com
@version 1.0.0
@auth Bearer bearer
@endpoints 11
@toc marketing(11)

@endpoint POST /v3/marketing/singlesends
@required {name: str}
@optional {categories: [str], send_at: str(date-time), send_to: map{list_ids: [str(uuid)], segment_ids: [str(uuid)], all: bool}, email_config: map{subject: str, html_content: str, plain_content: str, generate_plain_content: bool, design_id: str, editor: str, suppression_group_id: int, custom_unsubscribe_url: str(uri), sender_id: int, ip_pool: str}}
@returns(201) {id: str(uuid), name: str, status: str, categories: [str], send_at: str(date-time)?, send_to: map{list_ids: [str(uuid)], segment_ids: [str(uuid)], all: bool}, updated_at: str(date-time), created_at: str(date-time), email_config: map{subject: str, html_content: str, plain_content: str, generate_plain_content: bool, design_id: str, editor: str, suppression_group_id: int?, custom_unsubscribe_url: str(uri)?, sender_id: int?, ip_pool: str?}, warnings: [map]}
@errors {400, 500}

@endpoint GET /v3/marketing/singlesends
@optional {page_size: int, page_token: str}
@returns(200) {result: [map], _metadata: map{prev: str(uri), self: str(uri), next: str(uri), count: int}}
@errors {500}

@endpoint DELETE /v3/marketing/singlesends
@optional {ids: [str]}
@returns(204)
@errors {404, 500}

@endpoint POST /v3/marketing/singlesends/{id}
@optional {name: str}
@returns(201) {id: str(uuid), name: str, status: str, categories: [str], send_at: str(date-time)?, send_to: map{list_ids: [str(uuid)], segment_ids: [str(uuid)], all: bool}, updated_at: str(date-time), created_at: str(date-time), email_config: map{subject: str, html_content: str, plain_content: str, generate_plain_content: bool, design_id: str, editor: str, suppression_group_id: int?, custom_unsubscribe_url: str(uri)?, sender_id: int?, ip_pool: str?}, warnings: [map]}
@errors {404, 500}

@endpoint PATCH /v3/marketing/singlesends/{id}
@required {name: str}
@optional {categories: [str], send_at: str(date-time), send_to: map{list_ids: [str(uuid)], segment_ids: [str(uuid)], all: bool}, email_config: map{subject: str, html_content: str, plain_content: str, generate_plain_content: bool, design_id: str, editor: str, suppression_group_id: int, custom_unsubscribe_url: str(uri), sender_id: int, ip_pool: str}}
@returns(202) {id: str(uuid), name: str, status: str, categories: [str], send_at: str(date-time)?, send_to: map{list_ids: [str(uuid)], segment_ids: [str(uuid)], all: bool}, updated_at: str(date-time), created_at: str(date-time), email_config: map{subject: str, html_content: str, plain_content: str, generate_plain_content: bool, design_id: str, editor: str, suppression_group_id: int?, custom_unsubscribe_url: str(uri)?, sender_id: int?, ip_pool: str?}, warnings: [map]}
@errors {400, 404, 500}

@endpoint GET /v3/marketing/singlesends/{id}
@returns(200) {id: str(uuid), name: str, status: str, categories: [str], send_at: str(date-time)?, send_to: map{list_ids: [str(uuid)], segment_ids: [str(uuid)], all: bool}, updated_at: str(date-time), created_at: str(date-time), email_config: map{subject: str, html_content: str, plain_content: str, generate_plain_content: bool, design_id: str, editor: str, suppression_group_id: int?, custom_unsubscribe_url: str(uri)?, sender_id: int?, ip_pool: str?}, warnings: [map]}
@errors {404, 500}

@endpoint DELETE /v3/marketing/singlesends/{id}
@returns(204)
@errors {404, 500}

@endpoint PUT /v3/marketing/singlesends/{id}/schedule
@required {send_at: str(date-time)}
@returns(201) {send_at: str(date-time), status: str}
@errors {404, 500}

@endpoint DELETE /v3/marketing/singlesends/{id}/schedule
@returns(200) {send_at: str(date-time), status: str}
@errors {404, 500}

@endpoint GET /v3/marketing/singlesends/categories
@returns(200) {categories: [str]}
@errors {500}

@endpoint POST /v3/marketing/singlesends/search
@optional {page_size: int, page_token: str, name: str, status: [str], categories: [str]}
@returns(200) {result: [map], _metadata: map{prev: str(uri), self: str(uri), next: str(uri), count: int}}
@errors {404}

@end
