openapi: 3.1.0 info: title: Twilio SendGrid Provisioning Account Tracking API summary: The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. description: 'The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).' termsOfService: https://www.twilio.com/legal/tos contact: name: Twilio SendGrid Support url: https://support.sendgrid.com/hc/en-us license: name: MIT url: https://code.hq.twilio.com/twilio/sendgrid-oas/blob/main/LICENSE version: 1.0.0 x-sendgrid: libraryPackage: account_provisioning servers: - url: https://api.sendgrid.com description: for global users and subusers - url: https://api.eu.sendgrid.com description: for EU regional subusers security: - BearerAuth: [] tags: - name: Tracking description: Twilio SendGrid Tracking Settings API paths: /v3/tracking_settings: get: operationId: ListTrackingSetting summary: Retrieve Tracking Settings tags: - Tracking description: '**This endpoint allows you to retrieve a list of all tracking settings on your account.**' parameters: - $ref: '#/components/parameters/OnBehalfOf' responses: '200': description: '' content: application/json: schema: type: object properties: result: type: array description: The list of all tracking settings. items: type: object properties: name: type: string description: The name of the event being tracked. title: type: string description: The title of the tracking setting. description: type: string description: A description about the event that is being tracked. enabled: type: boolean description: Indicates if this tracking setting is currently enabled. examples: response: value: result: - name: open title: Open Tracking description: lorem ipsum... . enabled: true /v3/tracking_settings/click: get: operationId: ListClickTrackingSetting summary: Retrieve Click Track Settings tags: - Tracking description: '**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](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email' parameters: - $ref: '#/components/parameters/OnBehalfOf' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ClickTracking' examples: response: value: enable_text: false enabled: true patch: operationId: UpdateClickTrackingSetting summary: Update Click Tracking Settings tags: - Tracking description: '**This endpoint allows you to enable or disable 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](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email' parameters: - $ref: '#/components/parameters/OnBehalfOf' requestBody: content: application/json: schema: type: object properties: enabled: type: boolean description: The setting you want to use for click tracking. example: enabled: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ClickTracking' examples: response: value: enable_text: false enabled: true /v3/tracking_settings/google_analytics: get: operationId: ListGoogleAnalyticsTrackingSetting summary: Retrieve Google Analytics Settings tags: - Tracking description: '**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](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).' parameters: - $ref: '#/components/parameters/OnBehalfOf' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/GoogleAnalyticsSettings' examples: response: value: enabled: true utm_campaign: '' utm_content: lotsandlotsofcontent utm_medium: '' utm_source: '' utm_term: '' patch: operationId: UpdateGoogleAnalyticsTrackingSetting summary: Update Google Analytics Settings tags: - Tracking description: '**This endpoint allows you to update 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](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).' parameters: - $ref: '#/components/parameters/OnBehalfOf' requestBody: content: application/json: schema: $ref: '#/components/schemas/GoogleAnalyticsSettings' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/GoogleAnalyticsSettings' examples: response: value: enabled: true utm_campaign: '' utm_content: lotsandlotsofcontent utm_medium: '' utm_source: '' utm_term: '' /v3/tracking_settings/open: get: operationId: ListOpenTrackingSetting summary: Get Open Tracking Settings tags: - Tracking description: '**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.' parameters: - $ref: '#/components/parameters/OnBehalfOf' responses: '200': description: '' content: application/json: schema: type: object properties: enabled: type: boolean description: Indicates if open tracking is enabled. required: - enabled examples: response: value: enabled: true patch: operationId: UpdateOpenTrackingSetting summary: Update Open Tracking Settings tags: - Tracking description: '**This endpoint allows you to update 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.' parameters: - $ref: '#/components/parameters/OnBehalfOf' requestBody: content: application/json: schema: type: object properties: enabled: type: boolean description: The new status that you want to set for open tracking. example: enabled: true responses: '200': description: '' content: application/json: schema: type: object properties: enabled: type: boolean description: Indicates if open tracking is enabled. required: - enabled examples: response: value: enabled: true /v3/tracking_settings/subscription: get: operationId: ListSubscriptionTrackingSetting summary: Retrieve Subscription Tracking Settings tags: - Tracking description: '**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.' parameters: - $ref: '#/components/parameters/OnBehalfOf' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SubscriptionTrackingSettings' examples: response: value: enabled: true html_content: '
Something something unsubscribe <% %> something something
' landing: 'subscribehere
' plain_content: Something something unsubscribe <% %> something something replace: thetag url: http://mydomain.com/parse patch: operationId: UpdateSubscriptionTrackingSetting summary: Update Subscription Tracking Settings tags: - Tracking description: '**This endpoint allows you to update 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.' parameters: - $ref: '#/components/parameters/OnBehalfOf' requestBody: content: application/json: schema: $ref: '#/components/schemas/SubscriptionTrackingSettings' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SubscriptionTrackingSettings' examples: response: value: enabled: true landing: landing page html url: http://mydomain.com/parse replace: replacement tag html_content: html content plain_content: text content components: schemas: SubscriptionTrackingSettings: title: 'Settings: Subscription Tracking' type: object properties: enabled: type: boolean description: Indicates if subscription tracking is enabled. html_content: type: string description: 'The information and HTML for your unsubscribe link. ' landing: type: string description: The HTML that will be displayed on the page that your customers will see after clicking unsubscribe, hosted on SendGrid’s server. plain_content: type: string description: The information in plain text for your unsubscribe link. You should have the “<% %>” tag in your content, otherwise the user will have no URL for unsubscribing. replace: type: string description: Your custom defined replacement tag for your templates. Use this tag to place your unsubscribe content anywhere in your emailtemplate. url: type: string description: The URL where you would like your users sent to unsubscribe. format: uri ClickTracking: title: 'Settings: Click Tracking' type: object properties: enable_text: type: boolean description: Indicates if click tracking is enabled for plain text emails. enabled: type: boolean description: Indicates if click tracking is enabled or disabled. required: - enable_text - enabled example: enable_text: false enabled: false GoogleAnalyticsSettings: title: 'Settings: Google Analytics' type: object properties: enabled: type: boolean description: Indicates if Google Analytics is enabled. utm_campaign: type: string description: The name of the campaign. utm_content: type: string description: Used to differentiate ads utm_medium: type: string description: Name of the marketing medium (e.g. "Email"). utm_source: type: string description: 'Name of the referrer source. ' utm_term: type: string description: Any paid keywords. example: enabled: true utm_source: sendgrid.com utm_medium: email utm_term: '' utm_content: '' utm_campaign: website parameters: OnBehalfOf: name: on-behalf-of in: header description: 'The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent''s Subusers or customer accounts. You will use the parent account''s API key when using this header. When making a call on behalf of a customer account, the property value should be "account-id" followed by the customer account''s ID (e.g., `on-behalf-of: account-id