{ "opencollection": "1.0.0", "info": { "name": "Twilio SendGrid Provisioning Account Campaigns API API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Campaigns API", "type": "folder" }, "items": [ { "info": { "name": "Retrieve all Campaigns", "type": "http" }, "http": { "method": "GET", "url": "https://api.sendgrid.com/v3/campaigns", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "limit", "value": "", "type": "query", "description": "`limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used." }, { "name": "offset", "value": "", "type": "query", "description": "The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list." } ] }, "docs": "**This endpoint allows you to retrieve a paginated list of all of your campaigns.**\n\nReturns campaigns in reverse order they were created (newest first).\n\nReturns an empty array if no campaigns exist.\n\nYou can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items." }, { "info": { "name": "Create a Campaign", "type": "http" }, "http": { "method": "POST", "url": "https://api.sendgrid.com/v3/campaigns", "headers": [ { "name": "on-behalf-of", "value": "" } ], "body": { "type": "json", "data": "{}" } }, "docs": "**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." }, { "info": { "name": "Retrieve a single campaign", "type": "http" }, "http": { "method": "GET", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path", "description": "The id of the campaign you would like to retrieve." } ] }, "docs": "**This endpoint allows you to retrieve a specific campaign.**" }, { "info": { "name": "Update a Campaign", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path", "description": "The id of the campaign you would like to retrieve." } ], "body": { "type": "json", "data": "{}" } }, "docs": "**This endpoint allows you to update a specific campaign.**\n\nThis is especially useful if you only set up the campaign using POST /campaigns, but didn't set many of the parameters." }, { "info": { "name": "Delete a Campaign", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path", "description": "The id of the campaign you would like to retrieve." } ] }, "docs": "**This endpoint allows you to delete a specific campaign.**" }, { "info": { "name": "View Scheduled Time of a Campaign", "type": "http" }, "http": { "method": "GET", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id/schedules", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path" } ] }, "docs": "**This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.**" }, { "info": { "name": "Schedule a Campaign", "type": "http" }, "http": { "method": "POST", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id/schedules", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "**This endpoint allows you to schedule a specific date and time for your campaign to be sent.**\n\nIf you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid those times (for example, scheduling at 10:53) can result in lower deferral rates because it won't be going through our servers at the same times as everyone else's mail." }, { "info": { "name": "Update a Scheduled Campaign", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id/schedules", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "**This endpoint allows to you change the scheduled time and date for a campaign to be sent.**" }, { "info": { "name": "Unschedule a Scheduled Campaign", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id/schedules", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path" } ] }, "docs": "**This endpoint allows you to unschedule a campaign that has already been scheduled to be sent.**\n\nA successful unschedule will return a 204.\nIf the specified campaign is in the process of being sent, the only option is to cancel (a different method)." }, { "info": { "name": "Send a Campaign", "type": "http" }, "http": { "method": "POST", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id/schedules/now", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path" } ] }, "docs": "**This endpoint allows you to immediately send an existing campaign.**\n\nNormally a POST request would have a body, but since this endpoint is telling us to send a resource that is already created, a request body is not needed." }, { "info": { "name": "Send a Test Campaign", "type": "http" }, "http": { "method": "POST", "url": "https://api.sendgrid.com/v3/campaigns/:campaign_id/schedules/test", "headers": [ { "name": "on-behalf-of", "value": "" } ], "params": [ { "name": "campaign_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "**This endpoint allows you to send a test campaign.**\n\nTo send to multiple addresses, use an array for the JSON \"to\" value [\"one@address\",\"two@address\"]" } ] } ], "bundled": true }