Email Activity (beta)

Email delivery and marketing service

sendgrid.com/docs ↗
Version
1.0.0
OpenAPI
3.0.0
Endpoints
334
Schemas
545
86
Quality
Updated
3 days ago
Email email marketing communications
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

http://api.sendgrid.com/v3

Endpoints

Clear filters

Apikeypermissions 1 endpoints

GET /scopes

This endpoint returns a list of all scopes that this user has access to.

API Keys are used to authenticate with SendGrid’s v3 API.

API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access.

This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the “Retrieve an existing API key” endpoint.

For a more detailed explanation of how you can use API Key permissions, please visit our API Keys documentation.

operationId: GET_scopes

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
403
404
500
GET /scopes

Apikeys 2 endpoints

GET /api_keys

This endpoint allows you to retrieve all API Keys that belong to the authenticated user.

A successful response from this API will include all available API keys’ names and IDs.

For security reasons, there is not a way to retrieve the key itself after it’s created. If you lose your API key, you must create a new one. Only the “Create API keys” endpoint will return a key to you and only at the time of creation.

An api_key_id can be used to update or delete the key, as well as retrieve the key’s details, such as its scopes.

operationId: ApiKeys_getAll

Parameters

Name In Required Type Description
limit query optional integer
on-behalf-of header optional string

Responses

200
401
403
404
500
GET /api_keys
GET /api_keys/{api_key_id}

This endpoint allows you to retrieve a single API key using an api_key_id.

The endpoint will return a key’s name, ID, and scopes. If the API Key ID does not, exist a 404 status will be returned.

See the API Key Permissions List for all available scopes. An API key’s scopes can be updated after creation using the “Update API keys” endpoint.

operationId: ApiKeys_getByKeyId

Parameters

Name In Required Type Description
api_key_id path required string
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /api_keys/{api_key_id}

Alerts 2 endpoints

GET /alerts

This endpoint allows you to retrieve all of your alerts.

Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics.

  • Usage alerts allow you to set the threshold at which an alert will be sent.
  • Stats notifications allow you to set how frequently you would like to receive email statistics reports. For example, “daily”, “weekly”, or “monthly”.

For more information about alerts, please see our Alerts documentation.

operationId: GET_alerts

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /alerts
GET /alerts/{alert_id}

This endpoint allows you to retrieve a specific alert.

Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics.

  • Usage alerts allow you to set the threshold at which an alert will be sent.
  • Stats notifications allow you to set how frequently you would like to receive email statistics reports. For example, “daily”, “weekly”, or “monthly”.

For more information about alerts, please see our Alerts documentation.

operationId: Alerts_getSpecificAlert

Parameters

Name In Required Type Description
alert_id path required integer

The ID of the alert you would like to retrieve.

on-behalf-of header optional string

Responses

200
GET /alerts/{alert_id}

Blocksapi 2 endpoints

GET /suppression/blocks

This endpoint allows you to retrieve all email addresses that are currently on your blocks list.

operationId: BlocksApi_getAllEmailAddresses

Parameters

Name In Required Type Description
start_time query optional integer

The start of the time range when a blocked email was created (inclusive). This is a unix timestamp.

end_time query optional integer

The end of the time range when a blocked email was created (inclusive). This is a unix timestamp.

limit query optional integer

Limit the number of results to be displayed per page.

offset query optional integer

The point in the list to begin displaying results.

on-behalf-of header optional string

Responses

200
GET /suppression/blocks
GET /suppression/blocks/{email}

This endpoint allows you to retrieve a specific email address from your blocks list.

operationId: BlocksApi_getSpecificBlock

Parameters

Name In Required Type Description
email path required string

The email address of the specific block.

on-behalf-of header optional string

Responses

200
GET /suppression/blocks/{email}

Bouncesapi 2 endpoints

GET /suppression/bounces

This endpoint allows you to retrieve all of your bounces.

operationId: BouncesApi_getAllBounces

Parameters

Name In Required Type Description
start_time query optional integer

Refers start of the time range in unix timestamp when a bounce was created (inclusive).

end_time query optional integer

Refers end of the time range in unix timestamp when a bounce was created (inclusive).

on-behalf-of header optional string

Responses

200
401
GET /suppression/bounces
GET /suppression/bounces/{email}

This endpoint allows you to retrieve a specific bounce by email address.

operationId: BouncesApi_getByEmailAddress

Parameters

Name In Required Type Description
email path required string
on-behalf-of header optional string

Responses

200
GET /suppression/bounces/{email}

Csv(uionly) 1 endpoints

GET /messages/download/{download_uuid}

This endpoint will return a presigned URL that can be used to download the CSV that was requested from the “Request a CSV” endpoint.

operationId: CsvUiOnly_generateCsvDownloadUrl

Parameters

Name In Required Type Description
download_uuid path required string

UUID used to locate the download csv request entry in the DB.

This is the UUID provided in the email sent to the user when their csv file is ready to download

Responses

200
404
500
GET /messages/download/{download_uuid}

Campaignsapi 3 endpoints

GET /campaigns

This endpoint allows you to retrieve a list of all of your campaigns.

Returns campaigns in reverse order they were created (newest first).

Returns an empty array if no campaigns exist.

operationId: GET_campaigns

Parameters

Name In Required Type Description
limit query optional integer

The number of results you would like to receive at a time.

offset query optional integer

The index of the first campaign to return, where 0 is the first campaign.

on-behalf-of header optional string

Responses

200
GET /campaigns
GET /campaigns/{campaign_id}

This endpoint allows you to retrieve a specific campaign.

operationId: CampaignsApi_getSingleCampaign

Parameters

Name In Required Type Description
campaign_id path required integer

The id of the campaign you would like to retrieve.

on-behalf-of header optional string

Responses

200
401
404

””: “not found”

GET /campaigns/{campaign_id}
GET /campaigns/{campaign_id}/schedules

This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.

operationId: CampaignsApi_getScheduledTime

Parameters

Name In Required Type Description
campaign_id path required integer
on-behalf-of header optional string

Responses

200
404

””: “not found”

GET /campaigns/{campaign_id}/schedules

Cancelscheduledsends 3 endpoints

GET /mail/batch/{batch_id}

This endpoint allows you to validate a batch ID.

When you pass a valid batch_id to this endpoint, it will return a 200 status code and the batch ID itself.

If you pass an invalid batch_id to the endpoint, you will receive a 400 level status code and an error message.

A batch_id does not need to be assigned to a scheduled send to be considered valid. A successful response means only that the batch_id has been created, but it does not indicate that it has been associated with a send.

operationId: CancelScheduledSends_validateBatchId

Parameters

Name In Required Type Description
batch_id path required string
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /mail/batch/{batch_id}
GET /user/scheduled_sends

This endpoint allows you to retrieve all cancelled and paused scheduled send information.

This endpoint will return only the scheduled sends that are associated with a batch_id. If you have scheduled a send using the /mail/send endpoint and the send_at field but no batch_id, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a batch_id to any scheduled send you may need to pause or cancel in the future.

operationId: CancelScheduledSends_allScheduledSends

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /user/scheduled_sends
GET /user/scheduled_sends/{batch_id}

This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific batch_id.

operationId: CancelScheduledSends_byBatchId

Parameters

Name In Required Type Description
batch_id path required string
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /user/scheduled_sends/{batch_id}

Categories 3 endpoints

GET /categories

This endpoint allows you to retrieve a list of all of your categories.

operationId: GET_categories

Parameters

Name In Required Type Description
limit query optional integer

The number of categories to display per page.

category query optional string

Allows you to perform a prefix search on this particular category.

offset query optional integer

The point in the list that you would like to begin displaying results.

on-behalf-of header optional string

Responses

200
400
GET /categories
GET /categories/stats

This endpoint allows you to retrieve all of your email statistics for each of your categories.

If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.

operationId: Categories_getEmailStatisticsFor

Parameters

Name In Required Type Description
start_date query required string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

categories query required string

The individual categories that you want to retrieve statistics for. You may include up to 10 different categories.

limit query optional integer

The number of results to include.

offset query optional integer

The number of results to skip.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

on-behalf-of header optional string

Responses

200
GET /categories/stats
GET /categories/stats/sums

This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.

If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.

operationId: Categories_getSums

Parameters

Name In Required Type Description
sort_by_metric query optional string

The metric that you want to sort by. Must be a single metric.

sort_by_direction query optional string

The direction you want to sort.

start_date query required string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

limit query optional integer

Limits the number of results returned.

offset query optional integer

The point in the list to begin retrieving results.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

on-behalf-of header optional string

Responses

200
GET /categories/stats/sums

Certificates 2 endpoints

GET /sso/certificates/{cert_id}

This endpoint allows you to retrieve an individual SSO certificate.

operationId: Certificates_getIndividual

Parameters

Name In Required Type Description
cert_id path required string

Responses

200
400
401
403
429
500
GET /sso/certificates/{cert_id}
GET /sso/integrations/{integration_id}/certificates

This endpoint allows you to retrieve all your IdP configurations by configuration ID.

The integration_id expected by this endpoint is the id returned in the response by the “Get All SSO Integrations” endpoint.

operationId: Certificates_getByIdpConfigurations

Parameters

Name In Required Type Description
integration_id path required string

An ID that matches a certificate to a specific IdP integration.

Responses

200
400
401
403
429
500
GET /sso/integrations/{integration_id}/certificates

Contacts 6 endpoints

GET /marketing/contacts

This endpoint will return up to 50 of the most recent contacts uploaded or attached to a list.

This list will then be sorted by email address.

The full contact count is also returned.

Please note that pagination of the contacts has been deprecated.

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_getRecentContacts

Responses

200
400
401
403
404
500
GET /marketing/contacts
GET /marketing/contacts/count

This endpoint returns the total number of contacts you have stored.

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_getTotalCount

Responses

200
401
403
404
500
GET /marketing/contacts/count
GET /marketing/contacts/exports

Use this endpoint to retrieve details of all current exported jobs.

It will return an array of objects, each of which records an export job in flight or recently completed.

Each object’s export_type field will tell you which kind of export it is and its status field will indicate what stage of processing it has reached. Exports which are ready will be accompanied by a urls field which lists the URLs of the export’s downloadable files — there will be more than one if you specified a maximum file size in your initial export request.

Use this endpoint if you have exports in flight but do not know their IDs, which are required for the “Export Contacts Status” endpoint.

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_getAllExports

Responses

200
400
401
403
404
500
GET /marketing/contacts/exports
GET /marketing/contacts/exports/{id}

This endpoint can be used to check the status of a contact export job.

To use this call, you will need the id from the “Export Contacts” call.

If you would like to download a list, take the id that is returned from the “Export Contacts” endpoint and make an API request here to get the urls. Once you have the list of URLs, make a GET request on each URL to download your CSV file(s).

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_checkExportStatus

Parameters

Name In Required Type Description
id path required string

Responses

200
400
401
403
404
500
GET /marketing/contacts/exports/{id}
GET /marketing/contacts/imports/{id}

This endpoint can be used to check the status of a contact import job.

Use the job_id from the “Import Contacts,” “Add or Update a Contact,” or “Delete Contacts” endpoints as the id in the path parameter.

If there is an error with your PUT request, download the errors_url file and open it to view more details.

The job status field indicates whether the job is pending, completed, errored, or failed.

Pending means not started. Completed means finished without any errors. Errored means finished with some errors. Failed means finshed with all errors, or the job was entirely unprocessable: for example, if you attempt to import file format we do not support.

The results object will have fields depending on the job type.

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_checkImportStatus

Parameters

Name In Required Type Description
id path required string

Responses

200
400
401
403
404
500
GET /marketing/contacts/imports/{id}
GET /marketing/contacts/{id}

This endpoint returns the full details and all fields for the specified contact.

The “Get Contacts by Emails” endpoint can be used to get the ID of a contact.

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_getByIdDetails

Parameters

Name In Required Type Description
id path required string

Responses

200
401
403
404
500
GET /marketing/contacts/{id}

Contactsapicustomfields 3 endpoints

GET /contactdb/custom_fields

This endpoint allows you to retrieve all custom fields.

operationId: ContactsApiCustomFields_getAll

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
GET /contactdb/custom_fields
GET /contactdb/custom_fields/{custom_field_id}

This endpoint allows you to retrieve a custom field by ID.

operationId: ContactsApiCustomFields_getById

Parameters

Name In Required Type Description
custom_field_id path required integer

The ID of the custom field that you want to retrieve.

on-behalf-of header optional string

Responses

200
400
401
404

“custom_field_id” : “Returned if custom_field_id does not exist”

GET /contactdb/custom_fields/{custom_field_id}
GET /contactdb/reserved_fields

This endpoint allows you to list all fields that are reserved and can’t be used for custom field names.

operationId: ContactsApiCustomFields_getReservedFields

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
GET /contactdb/reserved_fields

Contactsapilists 3 endpoints

GET /contactdb/lists

This endpoint allows you to retrieve all of your recipient lists. If you don’t have any lists, an empty array will be returned.

operationId: ContactsApiLists_getAllLists

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /contactdb/lists
GET /contactdb/lists/{list_id}

This endpoint allows you to retrieve a single recipient list.

operationId: ContactsApiLists_getSingleList

Parameters

Name In Required Type Description
list_id path required string
list_id query optional integer

The ID of the list to retrieve.

on-behalf-of header optional string

Responses

200
400

“list_id” : “Returned if list_id is not valid”

401
404

“list_id” : “Returned if list_id does not exist”

GET /contactdb/lists/{list_id}
GET /contactdb/lists/{list_id}/recipients

This endpoint allows you to retrieve all recipients on the list with the given ID.

operationId: ContactsApiLists_getAllRecipients

Parameters

Name In Required Type Description
list_id path required integer

The id of the list of recipients you want to retrieve.

page query optional integer

Page index of first recipient to return (must be a positive integer)

page_size query optional integer

Number of recipients to return at a time (must be a positive integer between 1 and 1000)

list_id query required integer

The ID of the list whose recipients you are requesting.

on-behalf-of header optional string

Responses

200
400

“list_id” : “Returned if list_id is not a valid integer”
“page” : “Returned if page is not a valid integer”
“page” : “Returned if page is less than 1”
“page_size” : “Returned if page_size is not a valid integer”
“page_size” : “Returned if page_size is less than 1 or greater than 1000”

404

“list_id” : “Returned if list_id does not exist”

GET /contactdb/lists/{list_id}/recipients

Contactsapirecipients 7 endpoints

GET /contactdb/recipients

This endpoint allows you to retrieve all of your Marketing Campaigns recipients.

Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of
the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved.

operationId: ContactsApiRecipients_getAllRecipients

Parameters

Name In Required Type Description
page query optional integer

Page index of first recipients to return (must be a positive integer)

page_size query optional integer

Number of recipients to return at a time (must be a positive integer between 1 and 1000)

on-behalf-of header optional string

Responses

200
400

“page” : “Returned if page is not a valid integer”
“page” : “Returned if page is less than 1”
“page_size” : “Returned if page_size is not a valid integer”
“page_size” : “Returned if page_size is less than 1 or greater than 1000”

401
GET /contactdb/recipients
GET /contactdb/recipients/billable_count

This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.

You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value.

operationId: ContactsApiRecipients_getBillableCount

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
GET /contactdb/recipients/billable_count
GET /contactdb/recipients/count

This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.

operationId: ContactsApiRecipients_getCountOfRecipients

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
GET /contactdb/recipients/count
GET /contactdb/recipients/search

This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.

field_name:

  • is a variable that is substituted for your actual custom field name from your recipient.
  • Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200)
  • If field_name is a ‘reserved’ date field, such as created_at or updated_at, the system will internally convert
    your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to
    Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through
    Mon, 02 Feb 2015 23:59:59 GMT.
operationId: ContactsApiRecipients_searchRecipientByField

Parameters

Name In Required Type Description
{field_name} query optional string
on-behalf-of header optional string

Responses

200
400

”” : “Returned if no search params are specified”
“field” : “Returned if the provided field is invalid or does not exist”

401
GET /contactdb/recipients/search
GET /contactdb/recipients/{recipient_id}

This endpoint allows you to retrieve a single recipient by ID from your contact database.

operationId: ContactsApiRecipients_getSingleRecipient

Parameters

Name In Required Type Description
recipient_id path required string

The ID of the recipient that you want to retrieve.

on-behalf-of header optional string

Responses

200
400

“recipient_id” : “Returned if recipient_id is not valid”

401
404

“recipient_id” : “Returned if record for recipient id does not exist”

GET /contactdb/recipients/{recipient_id}
GET /contactdb/recipients/{recipient_id}/lists

This endpoint allows you to retrieve the lists that a given recipient belongs to.

Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to.

operationId: ContactsApiRecipients_getRecipientLists

Parameters

Name In Required Type Description
recipient_id path required string

The ID of the recipient for whom you are retrieving lists.

on-behalf-of header optional string

Responses

200
400

“recipient_id” : “Returned if recipient_id is not valid”

401
404

“recipient_id” : “Returned if record for the recipient id does not exist”

GET /contactdb/recipients/{recipient_id}/lists
GET /contactdb/status

This endpoint allows you to check the upload status of a Marketing Campaigns recipient.

operationId: ContactsApiRecipients_getUploadStatus

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /contactdb/status

Contactsapisegments 3 endpoints

GET /contactdb/segments

This endpoint allows you to retrieve all of your segments.

operationId: ContactsApiSegments_getAllSegments

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
GET /contactdb/segments
GET /contactdb/segments/{segment_id}

This endpoint allows you to retrieve a single segment with the given ID.

operationId: ContactsApiSegments_getSegmentById

Parameters

Name In Required Type Description
segment_id path required string
segment_id query required integer

The ID of the segment you want to request.

on-behalf-of header optional string

Responses

200
400

“segment_id” : “Returned if segment_id is not valid”

401
404

“segment_id” : “Returned if segment_id does not exist”

GET /contactdb/segments/{segment_id}
GET /contactdb/segments/{segment_id}/recipients

This endpoint allows you to retrieve all of the recipients in a segment with the given ID.

operationId: ContactsApiSegments_getSegmentRecipients

Parameters

Name In Required Type Description
segment_id path required integer

The ID of the segment from which you want to retrieve recipients.

page query optional integer
page_size query optional integer
on-behalf-of header optional string

Responses

200
400

“page” : “Returned if page is not a valid integer”
“page” : “Returned if page is less than 1”
“page_size” : “Returned if page_size is not a valid integer”

401
404

“segment_id” : “Returned if segment_id is not valid”
“segment_id” : “Returned if segment_id does not exist”

GET /contactdb/segments/{segment_id}/recipients

Customfields 1 endpoints

GET /marketing/field_definitions

This endpoint retrieves all defined Custom Fields and Reserved Fields.

operationId: CustomFields_getAllFieldDefinitions

Responses

200
GET /marketing/field_definitions

Designsapi 4 endpoints

GET /designs

This endpoint allows you to retrieve a list of designs already stored in your Design Library.

A GET request to /designs will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the /designs/pre-builts endpoint, which is detailed below.

By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the page_size query parameter.

operationId: DesignsApi_getList

Parameters

Name In Required Type Description
page_size query optional integer

number of results to return

page_token query optional string

token corresponding to a specific page of results, as provided by metadata

summary query optional boolean

set to false to return all fields

Responses

200
GET /designs
GET /designs/pre-builts

This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid.

Unlike the /designs endpoint where your designs are stored, a GET request made to designs/pre-builts will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library.

By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the page_size query parameter.

This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify.

operationId: DesignsApi_listPreBuiltDesigns

Parameters

Name In Required Type Description
page_size query optional integer

number of results to return

page_token query optional string

token corresponding to a specific page of results, as provided by metadata

summary query optional boolean

set to false to return all fields

Responses

200
GET /designs/pre-builts
GET /designs/pre-builts/{id}

This endpoint allows you to retrieve a single pre-built design.

A GET request to /designs/pre-builts/{id} will retrieve details about a specific pre-built design.

This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify.

operationId: DesignsApi_getSinglePreBuiltDesign

Parameters

Name In Required Type Description
id path required string

The ID of the pre-built Design you want to duplicate.

Responses

200
400
404
GET /designs/pre-builts/{id}
GET /designs/{id}

This endpoint allows you to retrieve a single design.

A GET request to /designs/{id} will retrieve details about a specific design in your Design Library.

This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request.

operationId: DesignsApi_getSingleDesign

Parameters

Name In Required Type Description
id path required string

The ID of the Design you want to duplicate.

Responses

200
400
404
GET /designs/{id}

Domainauthentication 4 endpoints

GET /whitelabel/domains

This endpoint allows you to retrieve a list of all domains you have authenticated.

operationId: DomainAuthentication_getAllDomains

Parameters

Name In Required Type Description
limit query optional integer

Number of domains to return.

offset query optional integer

Paging offset.

exclude_subusers query optional boolean

Exclude subuser domains from the result.

username query optional string

The username associated with an authenticated domain.

domain query optional string

Search for authenticated domains.

on-behalf-of header optional string

Responses

200
GET /whitelabel/domains
GET /whitelabel/domains/default

This endpoint allows you to retrieve the default authentication for a domain.

When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden.

This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status.

operationId: DomainAuthentication_getDefaultAuthentication

Parameters

Name In Required Type Description
domain query optional string

The domain to find a default authentication.

on-behalf-of header optional string

Responses

200
GET /whitelabel/domains/default
GET /whitelabel/domains/subuser

This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.

Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent’s domain authentication. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools.

operationId: DomainAuthentication_listSubuserDomains

Parameters

Name In Required Type Description
username query required string

Username for the subuser to find associated authenticated domain.

Responses

200
GET /whitelabel/domains/subuser
GET /whitelabel/domains/{domain_id}

This endpoint allows you to retrieve a specific authenticated domain.

operationId: DomainAuthentication_getSpecificDomain

Parameters

Name In Required Type Description
domain_id path required string
on-behalf-of header optional string

Responses

200
GET /whitelabel/domains/{domain_id}

Ipaccessmanagement 3 endpoints

GET /access_settings/activity

This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.

operationId: IpAccessManagement_getRecentAccessAttempts

Parameters

Name In Required Type Description
limit query optional integer

Limits the number of IPs to return.

on-behalf-of header optional string

Responses

200
401
403
404
500
GET /access_settings/activity
GET /access_settings/whitelist

This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.

Each IP address returned to you will have created_at and updated_at dates. Each IP will also be associated with an id that can be used to remove the address from your allow list.

operationId: IpAccessManagement_getAllowedIPs

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
403
404
500
GET /access_settings/whitelist
GET /access_settings/whitelist/{rule_id}

This endpoint allows you to retreive a specific IP address that has been allowed to access your account.

You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the “Retrieve a list of currently allowed IPs” endpoint.

operationId: IpAccessManagement_getAllowedIp

Parameters

Name In Required Type Description
rule_id path required string

The ID of the allowed IP address that you want to retrieve.

on-behalf-of header optional string

Responses

200
GET /access_settings/whitelist/{rule_id}

Ipaddresses 4 endpoints

GET /ips

This endpoint allows you to retrieve a list of all assigned and unassigned IPs.

Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP.

A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.

operationId: GET_ips

Parameters

Name In Required Type Description
ip query optional string

The IP address to get

exclude_whitelabels query optional boolean

Should we exclude reverse DNS records (whitelabels)?

limit query optional integer

The number of IPs you want returned at the same time.

offset query optional integer

The offset for the number of IPs that you are requesting.

subuser query optional string

The subuser you are requesting for.

sort_by_direction query optional string

The direction to sort the results.

Responses

200
GET /ips
GET /ips/assigned

This endpoint allows you to retrieve only assigned IP addresses.

A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.

operationId: IpAddresses_getAssignedIps

Responses

200
GET /ips/assigned
GET /ips/remaining

This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.

operationId: IpAddresses_getRemainingIPsCount

Responses

200
GET /ips/remaining
GET /ips/{ip_address}

This endpoint allows you to see which IP pools a particular IP address has been added to.

The same IP address can be added to multiple IP pools.

A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.

operationId: IpAddresses_getIpPoolsByAddress

Parameters

Name In Required Type Description
ip_address path required string

The IP address you are retrieving the IP pools for.

Responses

200
GET /ips/{ip_address}

Ippools 2 endpoints

GET /ips/pools

This endpoint allows you to get all of your IP pools.

operationId: IpPools_getAll

Responses

200
GET /ips/pools
GET /ips/pools/{pool_name}

This endpoint allows you to get all of the IP addresses that are in a specific IP pool.

operationId: IpPools_getPoolIps

Parameters

Name In Required Type Description
pool_name path required string

The name of the IP pool that you want to retrieve the IP addresses for.

Responses

200
404
GET /ips/pools/{pool_name}

Ipwarmup 2 endpoints

GET /ips/warmup

This endpoint allows you to retrieve all of your IP addresses that are currently warming up.

operationId: IpWarmup_getAllIpsWarmup

Responses

200
GET /ips/warmup
GET /ips/warmup/{ip_address}

This endpoint allows you to retrieve the warmup status for a specific IP address.

You can retrieve all of your warming IPs using the “Retrieve all IPs currently in warmup” endpoint.

operationId: IpWarmup_getWarmupStatusForIpAddress

Parameters

Name In Required Type Description
ip_address path required string

The IP address that you want to retrieve the warmup status for.

Responses

200
404
GET /ips/warmup/{ip_address}

Invalidemailsapi 2 endpoints

GET /suppression/invalid_emails

This endpoint allows you to retrieve a list of all invalid email addresses.

operationId: InvalidEmailsApi_getAllInvalidEmails

Parameters

Name In Required Type Description
start_time query optional integer

Refers start of the time range in unix timestamp when an invalid email was created (inclusive).

end_time query optional integer

Refers end of the time range in unix timestamp when an invalid email was created (inclusive).

limit query optional integer

Limit the number of results to be displayed per page.

offset query optional integer

Paging offset. The point in the list to begin displaying results.

on-behalf-of header optional string

Responses

200
GET /suppression/invalid_emails
GET /suppression/invalid_emails/{email}

This endpoint allows you to retrieve a specific invalid email addresses.

operationId: InvalidEmailsApi_getSpecificInvalidEmail

Parameters

Name In Required Type Description
email path required string

The specific email address of the invalid email entry that you want to retrieve.

on-behalf-of header optional string

Responses

200
GET /suppression/invalid_emails/{email}

Linkbranding 4 endpoints

GET /whitelabel/links

This endpoint allows you to retrieve all branded links.

You can submit this request as one of your subusers if you include their ID in the on-behalf-of header in the request.

operationId: LinkBranding_getBrandedLinks

Parameters

Name In Required Type Description
limit query optional integer

Limits the number of results returned per page.

on-behalf-of header optional string

Responses

200
GET /whitelabel/links
GET /whitelabel/links/default

This endpoint allows you to retrieve the default branded link.

The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order:

  • The validated branded link marked as default (set when you call the “Create a branded link” endpoint or by calling the “Update a branded link” endpoint on an existing link)
  • Legacy branded links (migrated from the whitelabel wizard)
  • Default SendGrid-branded links (i.e., 100.ct.sendgrid.net)

You can submit this request as one of your subusers if you include their ID in the on-behalf-of header in the request.

operationId: LinkBranding_getDefaultBrandedLink

Parameters

Name In Required Type Description
domain query optional string

The domain to match against when finding the default branded link.

on-behalf-of header optional string

Responses

200
GET /whitelabel/links/default
GET /whitelabel/links/subuser

This endpoint allows you to retrieve the branded link associated with a subuser.

Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent’s link branding. To associate link branding, the parent account must first create a branded link and then validate it. The parent may then associate that branded link with a subuser via the API or the Subuser Management page of the Twilio SendGrid App.

operationId: LinkBranding_getSubuserBrandedLink

Parameters

Name In Required Type Description
username query required string

The username of the subuser to retrieve associated branded links for.

Responses

200
GET /whitelabel/links/subuser
GET /whitelabel/links/{id}

This endpoint allows you to retrieve a specific branded link by providing its ID.

You can submit this request as one of your subusers if you include their ID in the on-behalf-of header in the request.

operationId: LinkBranding_getBrandedLinkById

Parameters

Name In Required Type Description
id path required integer

The ID of the branded link you want to retrieve.

on-behalf-of header optional string

Responses

200
GET /whitelabel/links/{id}

Lists 3 endpoints

GET /marketing/lists

This endpoint returns an array of all of your contact lists.

operationId: Lists_getAll

Parameters

Name In Required Type Description
page_size query optional number

Maximum number of elements to return. Defaults to 100, returns 1000 max

page_token query optional string

Responses

200
GET /marketing/lists
GET /marketing/lists/{id}

This endpoint returns data about a specific list.

Setting the optional parameter contact_sample=true returns the contact_sample in the response body. Up to fifty of the most recent contacts uploaded or attached to a list will be returned, sorted alphabetically, by email address.

The full contact count is also returned.

operationId: Lists_getListById

Parameters

Name In Required Type Description
id path required string
contact_sample query optional boolean

Setting this parameter to the true will cause the contact_sample to be returned

Responses

200
404
GET /marketing/lists/{id}
GET /marketing/lists/{id}/contacts/count

This endpoint returns the number of contacts on a specific list.

operationId: Lists_contactCountGet

Parameters

Name In Required Type Description
id path required string

Responses

200
404
GET /marketing/lists/{id}/contacts/count

Marketingcampaignsstats 8 endpoints

GET /marketing/stats/automations

This endpoint allows you to retrieve stats for all your Automations.

By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter automation_ids.

Responses are paginated. You can limit the number of responses returned per batch using the page_size query string parameter. The default is 50, but you specify a value between 1 and 100.

You can retrieve a specific page of responses with the page_token query string parameter.

operationId: MarketingCampaignsStats_getAllAutomationStats

Parameters

Name In Required Type Description
automation_ids query optional array

This endpoint returns all automation IDs if no automation_ids are specified.

page_size query optional integer

The number of elements you want returned on each page.

page_token query optional string

The stats endpoints are paginated. To get the next page, call the passed _metadata.next URL. If _metadata.prev doesn’t exist, you’re at the first page. Similarly, if _metadata.next is not present, you’re at the last page.

Responses

200
400
GET /marketing/stats/automations
GET /marketing/stats/automations/export

This endpoint allows you to export Automation stats as CSV data.

You can specify one Automation or many: include as many Automation IDs as you need, separating them with commas, as the value of the ids query string paramter.

The data is returned as plain text response but in CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file.

operationId: MarketingCampaignsStats_exportAutomationStats

Parameters

Name In Required Type Description
ids query optional array

The IDs of Automations for which to export stats.

timezone query optional string

The IANA Area/Region string representing the timezone in which the stats are to be presented; i.e. "America/Chicago". This parameter changes the timezone format only; it does not alter which stats are returned.

Responses

200
400
GET /marketing/stats/automations/export
GET /marketing/stats/automations/{id}

This endpoint allows you to retrieve stats for a single Automation using its ID.

Multiple Automation IDs can be retrieved using the “Get All Automation Stats” endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified.

You may constrain the stats returned using the start_date and end_date query string parameters. You can also use the group_by and aggregated_by query string parameters to further refine the stats returned.

operationId: MarketingCampaignsStats_getStatsById

Parameters

Name In Required Type Description
id path required string
group_by query optional array

Automations can have multiple steps. Including step_id as a group_by metric allows further granularity of stats.

step_ids query optional array

Comma-separated list of step_ids that you want the link stats for.

aggregated_by query optional string

Dictates how the stats are time-sliced. Currently, "total" and "day" are supported.

start_date query optional string

Format: YYYY-MM-DD. If this parameter is included, the stats’ start date is included in the search.

end_date query optional string

Format: YYYY-MM-DD.If this parameter is included, the stats’ end date is included in the search.

timezone query optional string

IANA Area/Region string representing the timezone in which the stats are to be presented, e.g., “America/Chicago”.

page_size query optional integer

The number of elements you want returned on each page.

page_token query optional string

The stats endpoints are paginated. To get the next page, call the passed _metadata.next URL. If _metadata.prev doesn’t exist, you’re at the first page. Similarly, if _metadata.next is not present, you’re at the last page.

Responses

200
400
404
GET /marketing/stats/automations/{id}
GET /marketing/stats/automations/{id}/links

This endpoint lets you retrieve click-tracking stats for a single Automation.

The stats returned list the URLs embedded in your Automation and the number of clicks each one received.

Responses are paginated. You can limit the number of responses returned per batch using the page_size query string parameter. The default is 50, but you specify a value between 1 and 100.

You can retrieve a specific page of responses with the page_token query string parameter.

operationId: MarketingCampaignsStats_getAutomationLinkStat

Parameters

Name In Required Type Description
id path required string

The ID of the Automation you want to get click tracking stats for.

group_by query optional array

Automations can have multiple steps. Including step_id as a group_by metric allows further granularity of stats.

step_ids query optional array

Comma-separated list of step_ids that you want the link stats for.

page_size query optional integer

The number of elements you want returned on each page.

page_token query optional string

The stats endpoints are paginated. To get the next page, call the passed _metadata.next URL. If _metadata.prev doesn’t exist, you’re at the first page. Similarly, if _metadata.next is not present, you’re at the last page.

Responses

200
400
404
GET /marketing/stats/automations/{id}/links
GET /marketing/stats/singlesends

This endpoint allows you to retrieve stats for all your Single Sends.

By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter singlesend_ids.

Responses are paginated. You can limit the number of responses returned per batch using the page_size query string parameter. The default is 50, but you specify a value between 1 and 100.

You can retrieve a specific page of responses with the page_token query string parameter.

operationId: MarketingCampaignsStats_getAllSingleSendsStats

Parameters

Name In Required Type Description
singlesend_ids query optional array

This endpoint returns all Single Send IDs if no IDs are included in singlesend_ids.

page_size query optional integer

The number of elements you want returned on each page.

page_token query optional string

The stats endpoints are paginated. To get the next page, call the passed _metadata.next URL. If _metadata.prev doesn’t exist, you’re at the first page. Similarly, if _metadata.next is not present, you’re at the last page.

Responses

200
400
GET /marketing/stats/singlesends
GET /marketing/stats/singlesends/export

This endpoint allows you to export Single Send stats as .CSV data.

You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the ids query string paramter.

The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file.

operationId: MarketingCampaignsStats_exportSingleSendStats

Parameters

Name In Required Type Description
ids query optional array

The IDs of Single Sends for which to export stats.

timezone query optional string

The IANA Area/Region string representing the timezone in which the stats are to be presented; i.e. "America/Chicago". This parameter changes the timezone format only; it does not alter which stats are returned.

Responses

200
400
GET /marketing/stats/singlesends/export
GET /marketing/stats/singlesends/{id}

This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.

Multiple Single Send IDs can be retrieved using the “Get All Single Sends Stats” endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified.

You may constrain the stats returned using the start_date and end_date query string parameters. You can also use the group_by and aggregated_by query string parameters to further refine the stats returned.

operationId: MarketingCampaignsStats_getSingleSendStatsById

Parameters

Name In Required Type Description
id path required string
aggregated_by query optional string

Dictates how the stats are time-sliced. Currently, "total" and "day" are supported.

start_date query optional string

Format: YYYY-MM-DD. If this parameter is included, the stats’ start date is included in the search.

end_date query optional string

Format: YYYY-MM-DD.If this parameter is included, the stats’ end date is included in the search.

timezone query optional string

IANA Area/Region string representing the timezone in which the stats are to be presented, e.g., “America/Chicago”.

page_size query optional integer

The number of elements you want returned on each page.

page_token query optional string

The stats endpoints are paginated. To get the next page, call the passed _metadata.next URL. If _metadata.prev doesn’t exist, you’re at the first page. Similarly, if _metadata.next is not present, you’re at the last page.

group_by query optional array

A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields.

Responses

200
400
404
GET /marketing/stats/singlesends/{id}
GET /marketing/stats/singlesends/{id}/links

This endpoint lets you retrieve click-tracking stats for one Single Send.

The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received.

Responses are paginated. You can limit the number of responses returned per batch using the page_size query string parameter. The default is 50, but you specify a value between 1 and 100.

You can retrieve a specific page of responses with the page_token query string parameter.

operationId: MarketingCampaignsStats_getSingleSendLinkStatById

Parameters

Name In Required Type Description
id path required string
page_size query optional integer

The number of elements you want returned on each page.

page_token query optional string

The stats endpoints are paginated. To get the next page, call the passed _metadata.next URL. If _metadata.prev doesn’t exist, you’re at the first page. Similarly, if _metadata.next is not present, you’re at the last page.

group_by query optional array

A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields.

ab_variation_id query optional string
ab_phase_id query optional string

Responses

200
400
404
GET /marketing/stats/singlesends/{id}/links

Query 2 endpoints

GET /messages

This is BETA functionality. You may not have access, and we reserve the right to change functionality without notice.

Filter all messages to search your Email Activity. All queries need to be URL encoded, and have this format:

query={query_type}="{query_content}"

encoded, this would look like this:

query=type%3D%22query_content%22

for example:

Filter by a specific email - query=to_email%3D%22example%40example.com%22

Filter by subject line - query=subject%3d%22A%20Great%20Subject%22

Full list of basic query types and examples:

Filter query Unencoded Example (put this one into the try it out query - it’ll automatically encode it for you) Encoded Example (use this one in your code)
msg_id msg_id=“filter0307p1las1-16816-5A023E36-1.0” msg_id%3D%22filter0307p1las1-16816-5A023E36-1.0%22
from_email from_email=“testing@sendgrid.net” from_email%3D%22testing%40sendgrid.net%22
subject subject=”This is a subject test” subject%22This%20is%20a%20subject%20test%22
to_email to_email=”example@example.com” to_email%3D%22example%40example.com%22
status   status%22processed%22
template_id    
asm_group_id    
api_key_id    
events status=”processed” status%3D%22processed%22
originating_ip    
categories    
unique_args    
outbound_ip    
last_event_time last_event_time=“2017-11-07T23:13:58Z” last_event_time%3D%E2%80%9C2017-11-07T23%3A13%3A58Z%E2%80%9D
clicks clicks=”0” clicks%3D%220%22

For information about building compound queries, and for the full query language functionality, see the query language reference.

Coming soon, example compound queries: limit + to email + date

operationId: Query_filterMessages

Parameters

Name In Required Type Description
query query required string

Use the query syntax to filter your email activity.

limit query optional number

The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000

X-Query-Id header optional string
X-Cursor header optional string

Responses

200
400
429
GET /messages
GET /messages/{msg_id}

This is BETA functionality. You may not have access, and we reserve the right to change functionality without notice.

Get all of the details about the specified message.

operationId: Query_messageDetails

Parameters

Name In Required Type Description
msg_id path required string

The ID of the message you are requesting details for.

Responses

200
400
404
429
GET /messages/{msg_id}

Reversedns 2 endpoints

GET /whitelabel/ips

This endpoint allows you to retrieve all of the Reverse DNS records created by this account.

You may include a search key by using the ip query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., ?ip="192.").

Use the limit query string parameter to reduce the number of records returned. All records will be returned if you have fewer records than the specified limit.

The offset query string parameter allows you to specify a non-zero index from which records will be returned. For example, if you have ten records, ?offset=5 will return the last five records (at indexes 5 through 9). The list starts at index zero.

operationId: ReverseDns_getAllReverseDnsRecords

Parameters

Name In Required Type Description
limit query optional integer

The maximum number of results to retrieve.

offset query optional integer

The point in the list of results to begin retrieving IP addresses from.

ip query optional string

The IP address segment that you’d like to use in a prefix search.

on-behalf-of header optional string

Responses

200
GET /whitelabel/ips
GET /whitelabel/ips/{id}

This endpoint allows you to retrieve a reverse DNS record.

You can retrieve the IDs associated with all your reverse DNS records using the “Retrieve all reverse DNS records” endpoint.

operationId: ReverseDns_getRecord

Parameters

Name In Required Type Description
id path required string

The ID of the reverse DNS record that you would like to retrieve.

on-behalf-of header optional string

Responses

200
GET /whitelabel/ips/{id}

Segmentingcontacts 2 endpoints

GET /marketing/segments

This endpoint allows you to retrieve a list of segments.

The query param parent_list_ids is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty results array.

parent_list_ids no_parent_list_id result
empty false all segments
values false segments filtered by list_ids
values true segments filtered by list_ids and segments with no parent list_ids
empty true segments with no parent list_ids
operationId: SegmentingContacts_listSegments

Parameters

Name In Required Type Description
parent_list_ids query optional string

A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed

no_parent_list_id query optional boolean

If set to true segments with an empty value of parent_list_id will be returned in the filter. If the value is not present it defaults to ‘false’.

Responses

200
401
403
404
500
GET /marketing/segments
GET /marketing/segments/{segment_id}

This endpoint allows you to retrieve a single segment by ID.

operationId: SegmentingContacts_getById

Parameters

Name In Required Type Description
segment_id path required string
query_json query optional boolean

Defaults to false. Set to true to return the parsed SQL AST as a JSON object in the field query_json

Responses

200
401
403
404
500
GET /marketing/segments/{segment_id}

Segmentingcontactsv2beta 2 endpoints

GET /marketing/segments/2.0

The Segmentation V2 API is currently in private beta. If you’d like to be added to the beta, please fill out this form

The query param parent_list_ids is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty results array.

parent_list_ids no_parent_list_id result
empty false all segments
values false segments filtered by list_ids
values true segments filtered by list_ids and segments with no parent list_ids
empty true segments with no parent list_ids
operationId: GET_segments

Parameters

Name In Required Type Description
parent_list_ids query optional string

A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment.

no_parent_list_id query optional boolean

If set to true segments with an empty value of parent_list_id will be returned in the filter. If the value is not present it defaults to ‘false’.

Responses

200
400
404
500
GET /marketing/segments/2.0
GET /marketing/segments/2.0/{segment_id}

The Segmentation V2 API is currently in private beta. If you’d like to be added to the beta, please fill out this form

operationId: SegmentingContactsV2Beta_getById

Parameters

Name In Required Type Description
segment_id path required string
contacts_sample query optional boolean

Defaults to true. Set to false to exclude the contacts_sample in the response.

Responses

200
400
500
GET /marketing/segments/2.0/{segment_id}

Senderidentitiesapi 2 endpoints

GET /senders

This endpoint allows you to retrieve a list of all sender identities that have been created for your account.

operationId: SenderIdentitiesApi_getAll

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /senders
GET /senders/{sender_id}

This endpoint allows you to retrieve a specific sender identity.

operationId: SenderIdentitiesApi_viewSenderIdentity

Parameters

Name In Required Type Description
sender_id path required integer

The ID of the sender identity that you want to retrieve.

on-behalf-of header optional string

Responses

200
404
GET /senders/{sender_id}

Senderverification 4 endpoints

GET /verified_senders

This endpoint allows you to retrieve all the Sender Identities associated with an account.

This endpoint will return both verified and unverified senders.

You can limit the number of results returned using the limit, lastSeenID, and id query string parameters.

  • limit allows you to specify an exact number of Sender Identities to return.
  • lastSeenID will return senders with an ID number occuring after the passed in ID. In other words, the lastSeenID provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account.
  • id will return information about only the Sender Identity passed in the request.
operationId: SenderVerification_getAllSenderIdentities

Parameters

Name In Required Type Description
limit query optional number
lastSeenID query optional number
id query optional integer

Responses

200
401
403
404
500
GET /verified_senders
GET /verified_senders/domains

This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure.

Domains listed as hard failures will not deliver mail when used as a Sender Identity due to the domain’s DMARC policy settings.

For example, using a yahoo.com email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see Everything about DMARC.

operationId: SenderVerification_listDomainWarn

Responses

200
401
403
404
500
GET /verified_senders/domains
GET /verified_senders/steps_completed

This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account.

This endpoint returns boolean values, true and false, for Domain Authentication, domain_verified, and Single Sender Verification, sender_verified, for the account.

An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the “Authenticate a domain” endpoint.

operationId: SenderVerification_determineVerificationStatus

Responses

200
401
403
404
500
GET /verified_senders/steps_completed
GET /verified_senders/verify/{token}

This endpoint allows you to verify a sender requests.

The token is generated by SendGrid and included in a verification email delivered to the address that’s pending verification.

operationId: SenderVerification_requestVerificationToken

Parameters

Name In Required Type Description
token path required string

Responses

204
401
403
404
500
GET /verified_senders/verify/{token}

Settingsenforcedtls 1 endpoints

GET /user/settings/enforced_tls

This endpoint allows you to retrieve your current Enforced TLS settings.

The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate.

If either require_tls or require_valid_cert is set to true, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description.

operationId: SettingsEnforcedTls_getCurrentEnforcedTlsSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
403
404
500
GET /user/settings/enforced_tls

Settingsinboundparse 1 endpoints

GET /user/webhooks/parse/settings/{hostname}

This endpoint allows you to retrieve a specific inbound parse setting by hostname.

You can retrieve all your Inbound Parse settings and their associated host names with the “Retrieve all parse settings” endpoint.

operationId: SettingsInboundParse_getSpecificParseSettingByHostname

Parameters

Name In Required Type Description
hostname path required string

The hostname associated with the inbound parse setting that you would like to retrieve.

on-behalf-of header optional string

Responses

200
401
403
404
500
GET /user/webhooks/parse/settings/{hostname}

Settingsmail 7 endpoints

GET /mail_settings

This endpoint allows you to retrieve a list of all mail settings.

Each setting will be returned with an enabled status set to true or false and a short description that explains what the setting does.

operationId: SettingsMail_getAllMailSettings

Parameters

Name In Required Type Description
limit query optional integer

The number of settings to return.

offset query optional integer

Where in the list of results to begin displaying settings.

on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /mail_settings
GET /mail_settings/address_whitelist

This endpoint allows you to retrieve your current email address whitelist settings.

The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed.

For example, if you own the domain example.com, and one or more of your recipients use email@example.com addresses, placing example.com in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to example.com as if they were sent under normal sending conditions.

operationId: SettingsMail_getAddressWhitelistMailSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /mail_settings/address_whitelist
GET /mail_settings/bounce_purge

This endpoint allows you to retrieve your current bounce and purge settings.

The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists.

A hard bounce occurs when an email message has been returned to the sender because the recipient’s address is invalid. A hard bounce might occur because the domain name doesn’t exist or because the recipient is unknown.

A soft bounce occurs when an email message reaches the recipient’s mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient’s inbox is full.

You can also manage this setting in the Mail Settings section of the Twilio SendGrid App. You can manage your bounces manually using the Bounces API or the Bounces menu in the Twilio SendGrid App.

operationId: SettingsMail_getBouncePurgeSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /mail_settings/bounce_purge
GET /mail_settings/footer

This endpoint allows you to retrieve your current Footer mail settings.

The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies.

You can insert your HTML or plain text directly using the “Update footer mail settings” endpoint, or you can create the footer using the Mail Settings menu in the Twilio SendGrid App.

operationId: SettingsMail_getFooterMailSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /mail_settings/footer
GET /mail_settings/forward_bounce

This endpoint allows you to retrieve your current bounce forwarding mail settings.

Enabling the Forward Bounce setting allows you to specify email addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an enabled status indicating if the setting is active.

operationId: SettingsMail_getForwardBounceMailSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /mail_settings/forward_bounce
GET /mail_settings/forward_spam

This endpoint allows you to retrieve your current Forward Spam mail settings.

Enabling the Forward Spam setting allows you to specify email addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an enabled status indicating if the setting is active.

operationId: SettingsMail_getForwardSpamMailSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /mail_settings/forward_spam
GET /mail_settings/template

This endpoint allows you to retrieve your current legacy email template settings.

This setting refers to our original email templates. We currently support more fully featured Dynamic Transactional Templates.

The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to “Create and Edit Legacy Transactional Templates. For help migrating to our current template system, see “Migrating from Legacy Templates”.

operationId: SettingsMail_getLegacyTemplateSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
400
401
403
404
500
GET /mail_settings/template

Settingspartner 2 endpoints

GET /partner_settings

This endpoint allows you to retrieve a list of all partner settings that you can enable.

Our partner settings allow you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners, and how you can begin integrating with them, please visit our Partners documentation.

operationId: SettingsPartner_listPartnerSettings

Parameters

Name In Required Type Description
limit query optional integer

The number of settings to return per page.

offset query optional integer

The paging offset.

on-behalf-of header optional string

Responses

200
GET /partner_settings
GET /partner_settings/new_relic

This endpoint allows you to retrieve your current New Relic partner settings.

Our partner settings allow you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners, and how you can begin integrating with them, please visit our Partners documentation.

By integrating with New Relic, you can send your SendGrid email statistics to your New Relic Dashboard. If you enable this setting, your stats will be sent to New Relic every 5 minutes. You will need your New Relic License Key to enable this setting. For more information, please see our SendGrid for New Relic documentation.

operationId: SettingsPartner_getAllNewRelicPartnerSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /partner_settings/new_relic

Settingstracking 5 endpoints

GET /tracking_settings

This endpoint allows you to retrieve a list of all tracking settings on your account.

operationId: SettingsTracking_getAllTracking

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /tracking_settings
GET /tracking_settings/click

This endpoint allows you to retrieve your current click tracking setting.

Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those clicks.

Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email

operationId: SettingsTracking_getClickTrackingSetting

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /tracking_settings/click
GET /tracking_settings/google_analytics

This endpoint allows you to retrieve your current setting for Google Analytics.

Google Analytics helps you understand how users got to your site and what they’re doing there. For more information about using Google Analytics, please refer to Google’s URL Builder and their article on “Best Practices for Campaign Building”.

We default the settings to Google’s recommendations. For more information, see Google Analytics Demystified.

operationId: SettingsTracking_getGoogleAnalyticsSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /tracking_settings/google_analytics
GET /tracking_settings/open

This endpoint allows you to retrieve your current settings for open tracking.

Open Tracking adds an invisible image at the end of the email which can track email opens.

If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged.

These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook.

operationId: SettingsTracking_getOpenSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /tracking_settings/open
GET /tracking_settings/subscription

This endpoint allows you to retrieve your current settings for subscription tracking.

Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails.

operationId: SettingsTracking_getSubscriptionTrackingSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /tracking_settings/subscription

Singlesends 3 endpoints

GET /marketing/singlesends

This endpoint allows you to retrieve all your Single Sends.

Returns all of your Single Sends with condensed details about each, including the Single Sends’ IDs. For more details about an individual Single Send, pass the Single Send’s ID to the /marketing/singlesends/{id} endpoint.

operationId: SingleSends_getAllSinglesends

Parameters

Name In Required Type Description
page_size query optional integer
page_token query optional string

Responses

200
500
GET /marketing/singlesends
GET /marketing/singlesends/categories

This endpoint allows you to retrieve all the categories associated with your Single Sends.

This endpoint will return your latest 1,000 categories.

operationId: SingleSends_getAllCategories

Responses

200
500
GET /marketing/singlesends/categories
GET /marketing/singlesends/{id}

This endpoint allows you to retrieve details about one Single Send using a Single Send ID.

You can retrieve all of your Single Sends by making a GET request to the /marketing/singlesends endpoint.

operationId: SingleSends_getDetailsById

Parameters

Name In Required Type Description
id path required string

Responses

200
404
500
GET /marketing/singlesends/{id}

Singlesignonsettings 2 endpoints

GET /sso/integrations

This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.

The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations.

operationId: SingleSignOnSettings_getAllSsoIntegrations

Parameters

Name In Required Type Description
si query optional boolean

If this parameter is set to true, the response will include the completed_integration field.

Responses

200
400
401
403
429
500
GET /sso/integrations
GET /sso/integrations/{id}

This endpoint allows you to retrieve an SSO integration by ID.

You can retrieve the IDs for your configurations from the response provided by the “Get All SSO Integrations” endpoint.

operationId: SingleSignOnSettings_getSsoIntegrationById

Parameters

Name In Required Type Description
id path required string
si query optional boolean

If this parameter is set to true, the response will include the completed_integration field.

Responses

200
400
401
403
429
500
GET /sso/integrations/{id}

Spamreportsapi 2 endpoints

GET /suppression/spam_reports

This endpoint allows you to retrieve all spam reports.

operationId: SpamReportsApi_getAllReports

Parameters

Name In Required Type Description
start_time query optional integer

The start of the time range when a spam report was created (inclusive). This is a unix timestamp.

end_time query optional integer

The end of the time range when a spam report was created (inclusive). This is a unix timestamp.

limit query optional integer

Limit the number of results to be displayed per page.

offset query optional integer

Paging offset. The point in the list to begin displaying results.

on-behalf-of header optional string

Responses

200
GET /suppression/spam_reports
GET /suppression/spam_reports/{email}

This endpoint allows you to retrieve a specific spam report by email address.

operationId: SpamReportsApi_getSpecificReportByEmail

Parameters

Name In Required Type Description
email path required string

The email address of a specific spam report that you want to retrieve.

on-behalf-of header optional string

Responses

200
GET /suppression/spam_reports/{email}

Stats 7 endpoints

GET /stats

This endpoint allows you to retrieve all of your global email statistics between a given date range.

Parent accounts will see aggregated stats for their account and all subuser accounts. Subuser accounts will only see their own stats.

operationId: GET_stats

Parameters

Name In Required Type Description
on-behalf-of header optional string
limit query optional integer

The number of results to return.

offset query optional integer

The point in the list to begin retrieving results.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

start_date query optional string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

Responses

200
GET /stats
GET /browsers/stats

This endpoint allows you to retrieve your email statistics segmented by browser type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

operationId: Stats_getEmailStatisticsByBrowser

Parameters

Name In Required Type Description
browsers query optional string

The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times.

on-behalf-of header optional string
limit query optional integer

The number of results to return.

offset query optional integer

The point in the list to begin retrieving results.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

start_date query optional string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

Responses

200
GET /browsers/stats
GET /clients/stats

This endpoint allows you to retrieve your email statistics segmented by client type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

operationId: Stats_getEmailStatisticsByClientType

Parameters

Name In Required Type Description
on-behalf-of header optional string
start_date query optional string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

Responses

200
GET /clients/stats
GET /clients/{client_type}/stats

This endpoint allows you to retrieve your email statistics segmented by a specific client type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Available Client Types

  • phone
  • tablet
  • webmail
  • desktop

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

operationId: Stats_getStatsByClientType

Parameters

Name In Required Type Description
client_type path required string

Specifies the type of client to retrieve stats for. Must be either “phone”, “tablet”, “webmail”, or “desktop”.

on-behalf-of header optional string
start_date query optional string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

Responses

200
GET /clients/{client_type}/stats
GET /devices/stats

This endpoint allows you to retrieve your email statistics segmented by the device type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Available Device Types

| Device | Description | Example |
|—|—|—|
| Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. |
| Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. |
| Phone | A smart phone. | iPhone, Android, Blackberry, etc.
| Tablet | A tablet computer. | iPad, android based tablet, etc. |
| Other | An unrecognized device. |

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

operationId: Stats_getEmailStatisticsByDeviceType

Parameters

Name In Required Type Description
on-behalf-of header optional string
limit query optional integer

The number of results to return.

offset query optional integer

The point in the list to begin retrieving results.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

start_date query optional string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

Responses

200
GET /devices/stats
GET /geo/stats

This endpoint allows you to retrieve your email statistics segmented by country and state/province.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our User Guide.

operationId: Stats_getEmailStatisticsByCountryAndStateProvince

Parameters

Name In Required Type Description
country query optional string

The country you would like to see statistics for. Currently only supported for US and CA.

on-behalf-of header optional string
limit query optional integer

The number of results to return.

offset query optional integer

The point in the list to begin retrieving results.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

start_date query optional string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

Responses

200
GET /geo/stats
GET /mailbox_providers/stats

This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

operationId: Stats_getEmailStatisticsByMailboxProvider

Parameters

Name In Required Type Description
mailbox_providers query optional string

The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times.

on-behalf-of header optional string
limit query optional integer

The number of results to return.

offset query optional integer

The point in the list to begin retrieving results.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

start_date query optional string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

Responses

200
GET /mailbox_providers/stats

Subusermonitorsettings 1 endpoints

GET /subusers/{subuser_name}/monitor
operationId: SubuserMonitorSettings_getSettings

Parameters

Name In Required Type Description
subuser_name path required string

The name of the subuser for which to retrieve monitor settings.

Responses

200
401
404
GET /subusers/{subuser_name}/monitor

Subuserstatistics 4 endpoints

GET /subusers/stats

This endpoint allows you to retrieve the email statistics for the given subusers.

You may retrieve statistics for up to 10 different subusers by including an additional subusers parameter for each additional subuser.

operationId: SubuserStatistics_getEmailStatsForSubusers

Parameters

Name In Required Type Description
limit query optional integer

Limits the number of results returned per page.

offset query optional integer

The point in the list to begin retrieving results from.

aggregated_by query optional string

How to group the statistics. Must be either “day”, “week”, or “month”.

subusers query required string

The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers.

start_date query required string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today.

Responses

200
GET /subusers/stats
GET /subusers/stats/monthly

This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.

When using the sort_by_metric to sort your stats by a specific metric, you can not sort by the following metrics:
bounce_drops, deferred, invalid_emails, processed, spam_report_drops, spam_reports, or unsubscribe_drops.

operationId: SubuserStatistics_getMonthlyStatsForAllSubusers

Parameters

Name In Required Type Description
date query required string

The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD

subuser query optional string

A substring search of your subusers.

sort_by_metric query optional string

The metric that you want to sort by. Metrics that you can sort by are: blocks, bounces, clicks, delivered, opens, requests, unique_clicks, unique_opens, and unsubscribes.’

sort_by_direction query optional string

The direction you want to sort.

limit query optional integer

Optional field to limit the number of results returned.

offset query optional integer

Optional beginning point in the list to retrieve from.

Responses

200
GET /subusers/stats/monthly
GET /subusers/stats/sums

This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.

operationId: SubuserStatistics_getEmailStatsForSubusers

Parameters

Name In Required Type Description
sort_by_direction query optional string

The direction you want to sort.

start_date query required string

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_date query optional string

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

limit query optional integer

Limits the number of results returned per page.

offset query optional integer

The point in the list to begin retrieving results from.

aggregated_by query optional string

How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD.

sort_by_metric query optional string

The metric that you want to sort by. Must be a single metric.

Responses

200
GET /subusers/stats/sums
GET /subusers/{subuser_name}/stats/monthly

This endpoint allows you to retrive the monthly email statistics for a specific subuser.

When using the sort_by_metric to sort your stats by a specific metric, you can not sort by the following metrics:
bounce_drops, deferred, invalid_emails, processed, spam_report_drops, spam_reports, or unsubscribe_drops.

operationId: SubuserStatistics_getMonthlyEmailStatsForSingleSubuser

Parameters

Name In Required Type Description
subuser_name path required string
date query required string

The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD

sort_by_metric query optional string

The metric that you want to sort by. Metrics that you can sort by are: blocks, bounces, clicks, delivered, opens, requests, unique_clicks, unique_opens, and unsubscribes.’

sort_by_direction query optional string

The direction you want to sort.

limit query optional integer

Optional field to limit the number of results returned.

offset query optional integer

Optional beginning point in the list to retrieve from.

Responses

200
GET /subusers/{subuser_name}/stats/monthly

Subusersapi 2 endpoints

GET /subusers

This endpoint allows you to retrieve a list of all of your subusers.

You can choose to retrieve specific subusers as well as limit the results that come back from the API.

operationId: GET_subusers

Parameters

Name In Required Type Description
username query optional string

The username of this subuser.

limit query optional integer

The number of results you would like to get in each request.

offset query optional integer

The number of subusers to skip.

Responses

200
401

Unexpected error in API call. See HTTP response body for details.

GET /subusers
GET /subusers/reputations

This endpoint allows you to request the reputations for your subusers.

Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating.

operationId: SubusersApi_getSubuserReputations

Parameters

Name In Required Type Description
usernames query optional string

Responses

200
GET /subusers/reputations

Suppressionsglobalsuppressions 2 endpoints

GET /asm/suppressions/global/{email}

This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppresed.

If the email address you include in the URL path parameter {email} is already globally suppressed, the response will include that email address. If the address you enter for {email} is not globally suppressed, an empty JSON object {} will be returned.

operationId: SuppressionsGlobalSuppressions_getGlobalSuppression

Parameters

Name In Required Type Description
email path required string

The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here.

on-behalf-of header optional string

Responses

200
GET /asm/suppressions/global/{email}
GET /suppression/unsubscribes

This endpoint allows you to retrieve a list of all email address that are globally suppressed.

operationId: SuppressionsGlobalSuppressions_getAllAddresses

Parameters

Name In Required Type Description
start_time query optional integer

Refers start of the time range in unix timestamp when an unsubscribe email was created (inclusive).

end_time query optional integer

Refers end of the time range in unix timestamp when an unsubscribe email was created (inclusive).

limit query optional integer

The number of results to display on each page.

offset query optional integer

The point in the list of results to begin displaying global suppressions.

on-behalf-of header optional string

Responses

200
GET /suppression/unsubscribes

Suppressionssuppressions 3 endpoints

GET /asm/groups/{group_id}/suppressions

This endpoint allows you to retrieve all suppressed email addresses belonging to the given group.

operationId: SuppressionsSuppressions_getAllSuppressedEmails

Parameters

Name In Required Type Description
group_id path required string

The id of the unsubscribe group that you are adding suppressions to.

on-behalf-of header optional string

Responses

200
GET /asm/groups/{group_id}/suppressions
GET /asm/suppressions

This endpoint allows you to retrieve a list of all suppressions.

operationId: SuppressionsSuppressions_getAllSuppressions

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /asm/suppressions
GET /asm/suppressions/{email}

This endpoint returns a list of all groups from which the given email address has been unsubscribed.

operationId: SuppressionsSuppressions_getUnsubscribeGroupsByEmail

Parameters

Name In Required Type Description
email path required string

The email address that you want to search suppression groups for.

on-behalf-of header optional string

Responses

200
GET /asm/suppressions/{email}

Suppressionsunsubscribegroups 2 endpoints

GET /asm/groups

This endpoint allows you to retrieve a list of all suppression groups created by this user.

This endpoint can also return information for multiple group IDs that you include in your request. To add a group ID to your request, simply append ?id=123456&id=123456, with the appropriate group IDs.

operationId: SuppressionsUnsubscribeGroups_getAll

Parameters

Name In Required Type Description
id query optional integer
on-behalf-of header optional string

Responses

200
GET /asm/groups
GET /asm/groups/{group_id}

This endpoint allows you to retrieve a single suppression group.

operationId: SuppressionsUnsubscribeGroups_getSingleGroup

Parameters

Name In Required Type Description
group_id path required string

The ID of the suppression group you would like to retrieve.

on-behalf-of header optional string

Responses

200
GET /asm/groups/{group_id}

Teammates 4 endpoints

GET /teammates

This endpoint allows you to retrieve a list of all current Teammates.

You can limit the number of results returned using the limit query paramater. To return results from a specific Teammate, use the offset paramter. The Response Headers will include pagination info.

operationId: Teammates_getAllTeammates

Parameters

Name In Required Type Description
limit query optional integer

Number of items to return

offset query optional integer

Paging offset

on-behalf-of header optional string

Responses

200
GET /teammates
GET /teammates/pending

This endpoint allows you to retrieve a list of all pending Teammate invitations.

Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date.

operationId: Teammates_getAllPending

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /teammates/pending
GET /teammates/{username}

This endpoint allows you to retrieve a specific Teammate by username.

You can retrieve the username’s for each of your Teammates using the “Retrieve all Teammates” endpoint.

operationId: Teammates_getByUsername

Parameters

Name In Required Type Description
username path required string

The username of the teammate that you want to retrieve.

on-behalf-of header optional string

Responses

200
GET /teammates/{username}
GET /scopes/requests

This endpoint allows you to retrieve a list of all recent access requests.

The Response Header’s link parameter will include pagination info.

operationId: Teammates_getAccessRequests

Parameters

Name In Required Type Description
limit query optional integer

Optional field to limit the number of results returned.

offset query optional integer

Optional beginning point in the list to retrieve from.

Responses

200
GET /scopes/requests

Transactionaltemplates 2 endpoints

GET /templates

This endpoint allows you to retrieve all transactional templates.

operationId: GET_templates

Parameters

Name In Required Type Description
generations query optional string

Comma-delimited list specifying which generations of templates to return. Options are legacy, dynamic or legacy,dynamic.

page_size query required number

The number of templates to be returned in each page of results

page_token query optional string

A token corresponding to a specific page of results, as provided by metadata

on-behalf-of header optional string

Responses

200
400
GET /templates
GET /templates/{template_id}

This endpoint allows you to retrieve a single transactional template.

operationId: TransactionalTemplates_getSingleTemplate

Parameters

Name In Required Type Description
template_id path required string
on-behalf-of header optional string

Responses

200
GET /templates/{template_id}

Transactionaltemplatesversions 1 endpoints

GET /templates/{template_id}/versions/{version_id}

This endpoint allows you to retrieve a specific version of a template.

operationId: TransactionalTemplatesVersions_getSpecificVersion

Parameters

Name In Required Type Description
template_id path required string

The ID of the original template

version_id path required string

The ID of the template version

on-behalf-of header optional string

Responses

200
GET /templates/{template_id}/versions/{version_id}

Usersapi 5 endpoints

GET /user/account

This endpoint allows you to retrieve your user account details.

Your user’s account information includes the user’s account type and reputation.

operationId: UsersApi_getUserAccountInformation

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /user/account
GET /user/credits

This endpoint allows you to retrieve the current credit balance for your account.

Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see Billing and Plan details information.

operationId: UsersApi_getCreditBalance

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /user/credits
GET /user/email

This endpoint allows you to retrieve the email address currently on file for your account.

operationId: UsersApi_getAccountEmailAddress

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /user/email
GET /user/profile
operationId: UsersApi_getUserProfile

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /user/profile
GET /user/username

This endpoint allows you to retrieve your current account username.

operationId: UsersApi_getUsername

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /user/username

Webhooks 4 endpoints

GET /user/webhooks/event/settings

This endpoint allows you to retrieve your current event webhook settings.

If an event type is marked as true, then the event webhook will include information about that event.

SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST with information about events that occur as SendGrid processes your email.

Common uses of this data are to remove unsubscribes, react to spam reports, determine unengaged recipients, identify bounced email addresses, or create advanced analytics of your email program.

operationId: Webhooks_getEventSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /user/webhooks/event/settings
GET /user/webhooks/event/settings/signed

This endpoint allows you to retrieve your signed webhook’s public key.

Once you have enabled signing of the Event Webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can retrieve the public key from this endpoint at any time.

For more information about cryptographically signing the Event Webhook, see Getting Started with the Event Webhook Security Features.

operationId: Webhooks_getSignedWebhookPublicKey

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
GET /user/webhooks/event/settings/signed
GET /user/webhooks/parse/settings

This endpoint allows you to retrieve all of your current inbound parse settings.

operationId: Webhooks_getParseSettings

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
403
404
500
GET /user/webhooks/parse/settings
GET /user/webhooks/parse/stats

This endpoint allows you to retrieve the statistics for your Parse Webhook useage.

SendGrid’s Inbound Parse Webhook allows you to parse the contents and attachments of incomming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments.

There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the Library Index.

operationId: Webhooks_getParseStats

Parameters

Name In Required Type Description
limit query optional string

The number of statistics to return on each page.

offset query optional string

The number of statistics to skip.

aggregated_by query optional string

How you would like the statistics to by grouped.

start_date query required string

The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD

end_date query optional string

The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD

on-behalf-of header optional string

Responses

200
GET /user/webhooks/parse/stats

Schemas

object AlertsDeleteAlertByIdResponse
{
  "type": "object",
  "properties": {}
}
object AlertsGetSpecificAlertResponse
{
  "type": "object",
  "required": [
    "created_at",
    "email_to",
    "id",
    "type",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "description": "The ID of the alert."
    },
    "type": {
      "enum": [
        "usage_alert",
        "stats_notification"
      ],
      "type": "string",
      "description": "The type of alert."
    },
    "email_to": {
      "type": "string",
      "description": "The email address that the alert will be sent to."
    },
    "frequency": {
      "type": "string",
      "description": "If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\"."
    },
    "created_at": {
      "type": "integer",
      "description": "A Unix timestamp indicating when the alert was created."
    },
    "percentage": {
      "type": "integer",
      "description": "If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent."
    },
    "updated_at": {
      "type": "integer",
      "description": "A Unix timestamp indicating when the alert was last modified."
    }
  }
}
object AlertsUpdateAlertRequest
{
  "type": "object",
  "example": {
    "email_to": "example@example.com"
  },
  "properties": {
    "email_to": {
      "type": "string",
      "description": "The new email address you want your alert to be sent to.\nExample: test@example.com"
    },
    "frequency": {
      "type": "string",
      "description": "The new frequency at which to send the stats_notification alert.\nExample: monthly"
    },
    "percentage": {
      "type": "integer",
      "description": "The new percentage threshold at which the usage_limit alert will be sent.\nExample: 90"
    }
  }
}
object AlertsUpdateAlertResponse
{
  "type": "object",
  "required": [
    "created_at",
    "email_to",
    "id",
    "type",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "description": "The ID of the alert."
    },
    "type": {
      "enum": [
        "usage_alert",
        "stats_notification"
      ],
      "type": "string",
      "description": "The type of alert."
    },
    "email_to": {
      "type": "string",
      "description": "The email address that the alert will be sent to."
    },
    "frequency": {
      "type": "string",
      "description": "If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\"."
    },
    "created_at": {
      "type": "integer",
      "description": "A Unix timestamp indicating when the alert was created."
    },
    "percentage": {
      "type": "integer",
      "description": "If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent."
    },
    "updated_at": {
      "type": "integer",
      "description": "A Unix timestamp indicating when the alert was last modified."
    }
  }
}
object ApiKeysCreateKeyRequest
{
  "type": "object",
  "example": {
    "name": "My API Key",
    "scopes": [
      "mail.send",
      "alerts.create",
      "alerts.read"
    ]
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name you will use to describe this API Key."
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The individual permissions that you are giving to this API Key."
    }
  }
}
object ApiKeysCreateKeyResponse
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "api_key": {
      "type": "string"
    },
    "api_key_id": {
      "type": "string"
    }
  }
}
object ApiKeysGetAllResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/api_key_name_id"
      }
    }
  }
}
object ApiKeysGetByKeyIdResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/api_key_name_id_scopes"
      }
    }
  }
}
object ApiKeysUpdateKeyNameRequest
{
  "type": "object",
  "example": {
    "name": "A New Hope"
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The new name of the API Key."
    }
  }
}
object ApiKeysUpdateNameAndScopesRequest
{
  "type": "object",
  "example": {
    "name": "Profiles key",
    "scopes": [
      "user.profile.read",
      "user.profile.update"
    ]
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
object BlocksApiDeleteAllBlockedEmailsRequest
{
  "type": "object",
  "example": {
    "emails": [
      "example1@example.com",
      "example2@example.com"
    ],
    "delete_all": false
  },
  "properties": {
    "emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The specific blocked email addresses that you want to delete."
    },
    "delete_all": {
      "type": "boolean",
      "description": "Indicates if you want to delete all blocked email addresses."
    }
  }
}
object BlocksApiDeleteAllBlockedEmailsResponse
{
  "type": "object",
  "properties": {}
}
object BlocksApiDeleteSpecificBlockResponse
{
  "type": "object",
  "properties": {}
}
object BouncesApiDeleteBouncesRequest
{
  "type": "object",
  "example": {
    "emails": [
      "example@example.com",
      "example2@example.com"
    ],
    "delete_all": false
  },
  "properties": {
    "emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Delete multiple emails from your bounce list at the same time. This should not be used with the delete_all parameter."
    },
    "delete_all": {
      "type": "boolean",
      "description": "This parameter allows you to delete **every** email in your bounce list. This should not be used with the emails parameter."
    }
  }
}
object BouncesApiDeleteBouncesResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array BouncesApiGetAllBouncesResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/bounce_response"
  }
}
array BouncesApiGetByEmailAddressResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/bounce_response"
  }
}
object BouncesApiRemoveBounceResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object CampaignsApiDeleteCampaignById401Response
{
  "type": "object",
  "example": {
    "errors": [
      {
        "field": null,
        "message": "authorization required"
      }
    ]
  },
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true,
            "x-konfig-null-placeholder": true
          },
          "message": {
            "type": "string",
            "example": "authorization required"
          }
        }
      }
    }
  }
}
object CampaignsApiDeleteCampaignById404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object CampaignsApiDeleteCampaignByIdResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object CampaignsApiGetScheduledTimeResponse
{
  "type": "object",
  "title": "View Scheduled Time of a Campaign response",
  "required": [
    "send_at"
  ],
  "properties": {
    "send_at": {
      "type": "integer",
      "format": "int64"
    }
  }
}
object CampaignsApiGetSingleCampaign401Response
{
  "type": "object",
  "example": {
    "errors": [
      {
        "field": null,
        "message": "authorization required"
      }
    ]
  },
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true,
            "x-konfig-null-placeholder": true
          },
          "message": {
            "type": "string",
            "example": "authorization required"
          }
        }
      }
    }
  }
}
object CampaignsApiGetSingleCampaign404Response
{
  "type": "object",
  "example": {
    "errors": [
      {
        "field": null,
        "message": "not found"
      }
    ]
  },
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true,
            "x-konfig-null-placeholder": true
          },
          "message": {
            "type": "string",
            "example": "not found"
          }
        }
      }
    }
  }
}
object CampaignsApiGetSingleCampaignResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "ip_pool": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "list_ids": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "sender_id": {
      "type": "integer"
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "segment_ids": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "html_content": {
      "type": "string"
    },
    "plain_content": {
      "type": "string"
    },
    "suppression_group_id": {
      "type": "integer"
    },
    "custom_unsubscribe_url": {
      "type": "string"
    }
  }
}
object CampaignsApiScheduleCampaignRequest
{
  "type": "object",
  "title": "Schedule a Campaign request",
  "example": {
    "send_at": 1489771528
  },
  "required": [
    "send_at"
  ],
  "properties": {
    "send_at": {
      "type": "integer",
      "description": "The unix timestamp for the date and time you would like your campaign to be sent out."
    }
  }
}
object CampaignsApiScheduleCampaignResponse
{
  "type": "object",
  "title": "Schedule a Campaign response",
  "required": [
    "id",
    "send_at",
    "status"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "description": "The campaign ID."
    },
    "status": {
      "enum": [
        "Scheduled"
      ],
      "type": "string",
      "description": "The status of your campaign."
    },
    "send_at": {
      "type": "integer",
      "description": "The date time you scheduled your campaign to be sent."
    }
  }
}
object CampaignsApiSendCampaignNowResponse
{
  "type": "object",
  "title": "Send a Campaign response",
  "required": [
    "id",
    "status"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "status": {
      "type": "string"
    }
  }
}
object CampaignsApiSendTestCampaignRequest
{
  "type": "object",
  "example": {
    "to": "your.email@example.com"
  },
  "required": [
    "to"
  ],
  "properties": {
    "to": {
      "type": "string",
      "format": "email",
      "description": "The email address that should receive the test campaign."
    }
  }
}
object CampaignsApiSendTestCampaignResponse
{
  "type": "object",
  "title": "Send a Test Campaign request",
  "required": [
    "to"
  ],
  "properties": {
    "to": {
      "type": "string"
    }
  }
}
object CampaignsApiUnscheduleCampaignResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object CampaignsApiUpdateScheduledTimeRequest
{
  "type": "object",
  "title": "Update a Scheduled Campaign request",
  "example": {
    "send_at": 1489451436
  },
  "required": [
    "send_at"
  ],
  "properties": {
    "send_at": {
      "type": "integer",
      "format": "int64"
    }
  }
}
object CampaignsApiUpdateScheduledTimeResponse
{
  "type": "object",
  "title": "Update a Scheduled Campaign response",
  "required": [
    "id",
    "send_at",
    "status"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "description": "The campaign ID"
    },
    "status": {
      "type": "string",
      "description": "The status of the schedule."
    },
    "send_at": {
      "type": "integer",
      "description": "The unix timestamp to send the campaign."
    }
  }
}
object CampaignsApiUpdateSpecificCampaign403Response
{
  "type": "object",
  "example": {
    "errors": [
      {
        "field": null,
        "message": "You may only update a campaign when it is in draft mode."
      }
    ]
  },
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true,
            "x-konfig-null-placeholder": true
          },
          "message": {
            "type": "string",
            "example": "You may only update a campaign when it is in draft mode."
          }
        }
      }
    }
  }
}
object CampaignsApiUpdateSpecificCampaignRequest
{
  "type": "object",
  "title": "Update a Campaign request",
  "example": {
    "title": "May Newsletter",
    "subject": "New Products for Summer!",
    "categories": [
      "summer line"
    ],
    "html_content": "<html><head><title></title></head><body><p>Check out our summer line!</p></body></html>",
    "plain_content": "Check out our summer line!"
  },
  "required": [
    "title",
    "subject",
    "categories",
    "html_content",
    "plain_content"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "The title of the campaign."
    },
    "subject": {
      "type": "string",
      "description": "The subject line for your campaign."
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The categories you want to tag on this campaign."
    },
    "html_content": {
      "type": "string",
      "description": "The HTML content of this campaign."
    },
    "plain_content": {
      "type": "string",
      "description": "The plain content of this campaign."
    }
  }
}
object CampaignsApiUpdateSpecificCampaignResponse
{
  "type": "object",
  "example": {
    "errors": [
      {
        "field": "title",
        "message": "title can't be blank"
      },
      {
        "field": "title",
        "message": "title is too long (maximum is 100 characters)"
      },
      {
        "field": "categories",
        "message": "categories exceeds 10 category limit"
      },
      {
        "field": "html_content",
        "message": "html_content exceeds the 1MB limit"
      },
      {
        "field": "plain_content",
        "message": "plain_content exceeds the 1MB limit"
      },
      {
        "field": "sender_id",
        "message": "sender_id does not exist"
      },
      {
        "field": "sender_id",
        "message": "sender_id is not a verified sender identity"
      },
      {
        "field": "list_ids",
        "message": "list_ids do not all exist"
      },
      {
        "field": "segment_ids",
        "message": "segment_ids do not all exist"
      },
      {
        "field": "ip_pool",
        "message": "The ip pool you provided is invalid"
      },
      {
        "field": "suppression_group_id",
        "message": "suppression_group_id does not exist"
      },
      {
        "field": "unsubscribes",
        "message": "Either suppression_group_id or custom_unsubscribe_url may be set/used, but not both. Please remove one before setting the other."
      },
      {
        "field": null,
        "message": "The JSON you have submitted cannot be parsed."
      }
    ]
  },
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "example": "title",
            "nullable": true
          },
          "message": {
            "type": "string",
            "example": "title can't be blank"
          }
        }
      }
    }
  }
}
array CancelScheduledSendsAllScheduledSendsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/user_scheduled_send_status"
  }
}
array CancelScheduledSendsByBatchIdResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/user_scheduled_send_status"
  },
  "title": "Retrieve scheduled send response"
}
object CancelScheduledSendsByBatchIdStatusRequest
{
  "type": "object",
  "title": "Cancel or pause a scheduled send request",
  "example": {
    "status": "pause",
    "batch_id": "YOUR_BATCH_ID"
  },
  "required": [
    "batch_id",
    "status"
  ],
  "properties": {
    "status": {
      "enum": [
        "pause",
        "cancel"
      ],
      "type": "string",
      "default": "pause",
      "description": "The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id}"
    },
    "batch_id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9]",
      "description": "The batch ID is the identifier that your scheduled mail sends share."
    }
  }
}
object CancelScheduledSendsRequestResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "help": {
            "type": "object"
          },
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object CancelScheduledSendsUpdateStatusRequest
{
  "type": "object",
  "example": {
    "status": "pause"
  },
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "enum": [
        "cancel",
        "pause"
      ],
      "type": "string",
      "description": "The status you would like the scheduled send to have."
    }
  }
}
object CancelScheduledSendsUpdateStatusResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array CategoriesGetEmailStatisticsForResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/category_stats"
  }
}
object CertificatesCreateSsoCertificateRequest
{
  "type": "object",
  "example": {
    "enabled": false,
    "integration_id": "b0b98502-9408-4b24-9e3d-31ed7cb15312",
    "public_certificate": "<your x509 certificate>"
  },
  "required": [
    "public_certificate",
    "integration_id"
  ],
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Indicates if the certificate is enabled."
    },
    "integration_id": {
      "type": "string",
      "description": "An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint."
    },
    "public_certificate": {
      "type": "string",
      "description": "This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes."
    }
  },
  "description": ""
}
array CertificatesGetByIdpConfigurationsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/sso-certificate-body"
  }
}
object CertificatesUpdateByIdRequest
{
  "type": "object",
  "example": {
    "enabled": false,
    "intergration_id": "b0b98502-9408-4b24-9e3d-31ed7cb15312",
    "public_certificate": "<your x509 certificate>"
  },
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Indicates whether or not the certificate is enabled."
    },
    "integration_id": {
      "type": "string",
      "description": "An ID that matches a certificate to a specific IdP integration."
    },
    "public_certificate": {
      "type": "string",
      "description": "This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes."
    }
  }
}
object ContactsApiCustomFieldsCreateNewFieldRequest
{
  "type": "object",
  "example": {
    "name": "pet",
    "type": "text"
  },
  "properties": {
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}
object ContactsApiCustomFieldsGetAllResponse
{
  "type": "object",
  "title": "List All Custom Fields response",
  "required": [
    "custom_fields"
  ],
  "properties": {
    "custom_fields": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contactdb_custom_field_with_id"
      }
    }
  }
}
object ContactsApiCustomFieldsGetReservedFieldsResponse
{
  "type": "object",
  "properties": {
    "reserved_fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      }
    }
  }
}
array ContactsApiListsAddMultipleRecipientsToListRequest
{
  "type": "array",
  "items": {
    "type": "integer"
  },
  "example": [
    "recipient_id1",
    "recipient_id2"
  ]
}

Versions

Version Endpoints Schemas Ingested Status
1.0.0 334 545 2026-05-11 current
1.0.0 334 545 2026-04-16