SendGrid Account API

Twilio SendGrid Account Provisioning API account operations.

Documentation

📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/account-provisioning
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/alerts
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/api-keys
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/email-activity
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/email-address-validation
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/enforced-tls
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/sendgrid-integrations
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/ip-access-management
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/ip-address-management-api
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/ip-warmup
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/ip-address
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/link-branding
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/campaigns-api
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/contacts-api-custom-fields
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/sender-identities-api
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/mail-settings
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/mail-send
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/contacts
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/custom-fields
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/designs-api
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/lists
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/segmenting-contacts-v2
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/segmenting-contacts
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/senders
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/single-sends
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/marketing-campaign-stats
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/send-test-email
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/partner-settings
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/recipients-data-erasure
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/reverse-dns
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/cancel-scheduled-sends
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/api-key-permissions
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/sendgrid-engagement-quality-api
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/single-sign-on-settings
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/stats
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/subusers-api
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/suppressions-unsubscribe-groups
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/teammates
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/transactional-templates
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/settings-tracking
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/users-api
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/sender-verification
📖
Documentation
https://www.twilio.com/docs/sendgrid/api-reference/webhooks

Specifications

Other Resources

🔗
APIsJSON
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/apis.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-campaign-test-then-send-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-create-list-add-contacts-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-create-schedule-campaign-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-create-schedule-singlesend-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-create-segment-from-list-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-create-sender-resend-verification-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-create-verified-sender-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-design-to-singlesend-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-duplicate-template-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-dynamic-template-send-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-global-suppress-check-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-list-add-contacts-count-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-refresh-segment-get-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-search-contacts-suppress-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-send-transactional-mail-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-singlesend-stats-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-suppression-group-add-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-template-version-activate-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/arazzo/sendgrid-upsert-contacts-confirm-workflow.yml

OpenAPI Specification

sendgrid-account-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Twilio SendGrid Provisioning Account 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: Account
  description: Twilio SendGrid Account Provisioning API account operations.
paths:
  /v3/partners/accounts:
    get:
      operationId: ListAccount
      summary: Get all accounts
      tags:
      - Account
      description: Retrieves all accounts under the organization.
      parameters:
      - $ref: '#/components/parameters/AccountProvisioningLastParam'
      - $ref: '#/components/parameters/AccountProvisioningCountParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: AccountList
                type: object
                properties:
                  accounts:
                    type: array
                    description: List of account objects.
                    items:
                      $ref: '#/components/schemas/AccountProvisioningAccount'
                  pages:
                    $ref: '#/components/schemas/AccountProvisioningPagination'
              example:
                accounts:
                - id: sg2a2bcd3ef4ab5c67d8efab91c01de2fa
                  email: test@test.com
                  created_at: '2006-01-02T15:04:05Z'
                  updated_at: '2009-01-02T15:04:05Z'
                - id: sg2a2bcd3ef4ab5c67d8efab91c01de2fa
                  email: testing@test.com
                  created_at: '2006-01-02T15:04:05Z'
                  updated_at: '2009-01-02T15:04:05Z'
                pages:
                  last: sg2a2bcd3ef4ab5c67d8efab91c01de2fa
        '400':
          $ref: '#/components/responses/AccountProvisioningErrorResponse400'
        '401':
          $ref: '#/components/responses/AccountProvisioningErrorResponse401'
        '403':
          $ref: '#/components/responses/AccountProvisioningErrorResponse403'
        '404':
          $ref: '#/components/responses/AccountProvisioningErrorResponse404'
        '500':
          $ref: '#/components/responses/AccountProvisioningErrorResponse500'
        '502':
          $ref: '#/components/responses/AccountProvisioningErrorResponse502'
        '503':
          $ref: '#/components/responses/AccountProvisioningErrorResponse503'
        '504':
          $ref: '#/components/responses/AccountProvisioningErrorResponse504'
    post:
      operationId: CreateAccount
      summary: Create an account
      description: Creates a new account, with specified offering, under the organization.
      parameters:
      - $ref: '#/components/parameters/AccountProvisioningTestHeader'
      tags:
      - Account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: CreateAccountParams
              type: object
              properties:
                profile:
                  $ref: '#/components/schemas/AccountProvisioningProfile'
                offerings:
                  type: array
                  description: List of offering names to assign to account.
                  items:
                    $ref: '#/components/schemas/AccountProvisioningOfferingV1'
              required:
              - offerings
            example:
              profile:
                first_name: Sender
                last_name: Wiz
                company_name: Twilio SendGrid
                company_website: https://sendgrid.com
                email: test@test.com
                timezone: Asia/Tokyo
              offerings:
              - name: org.ei.free.v1
                type: package
                quantity: 1
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountProvisioningAccountId'
        '400':
          $ref: '#/components/responses/AccountProvisioningErrorResponse400'
        '401':
          $ref: '#/components/responses/AccountProvisioningErrorResponse401'
        '403':
          $ref: '#/components/responses/AccountProvisioningErrorResponse403'
        '500':
          $ref: '#/components/responses/AccountProvisioningErrorResponse500'
        '502':
          $ref: '#/components/responses/AccountProvisioningErrorResponse502'
        '503':
          $ref: '#/components/responses/AccountProvisioningErrorResponse503'
        '504':
          $ref: '#/components/responses/AccountProvisioningErrorResponse504'
  /v3/partners/accounts/{accountID}:
    parameters:
    - $ref: '#/components/parameters/AccountProvisioningAccountId'
    delete:
      operationId: DeleteAccount
      summary: Delete an account
      description: "Delete a specific account under your organization by account ID. Note that this is an **irreversible** action that does the following:\n\n - Revokes API Keys and SSO so that the account user cannot log in or access SendGrid data.\n - Removes all offerings and configured SendGrid resources such as dedicated IPs.\n - Cancels billing effective immediately."
      tags:
      - Account
      responses:
        '204':
          description: Account successfully deleted.
        '400':
          $ref: '#/components/responses/AccountProvisioningErrorResponse400'
        '401':
          $ref: '#/components/responses/AccountProvisioningErrorResponse401'
        '403':
          $ref: '#/components/responses/AccountProvisioningErrorResponse403'
        '404':
          $ref: '#/components/responses/AccountProvisioningErrorResponse404'
        '500':
          $ref: '#/components/responses/AccountProvisioningErrorResponse500'
        '502':
          $ref: '#/components/responses/AccountProvisioningErrorResponse502'
        '503':
          $ref: '#/components/responses/AccountProvisioningErrorResponse503'
        '504':
          $ref: '#/components/responses/AccountProvisioningErrorResponse504'
  /v3/partners/accounts/{accountID}/sso:
    parameters:
    - $ref: '#/components/parameters/AccountProvisioningAccountId'
    post:
      operationId: AuthenticateAccount
      summary: Authenticate an account with single sign on
      description: Authenticates and logs in a user to Twilio Sendgrid as a specific admin identity configured for SSO by partner. Any additional teammates or subusers will need to log in directly via app.sendgrid.com
      tags:
      - Account
      responses:
        '303':
          description: Successful redirect to app.sendgrid.com.
        '401':
          $ref: '#/components/responses/AccountProvisioningErrorResponse401'
        '403':
          $ref: '#/components/responses/AccountProvisioningErrorResponse403'
        '404':
          $ref: '#/components/responses/AccountProvisioningErrorResponse404'
        '500':
          $ref: '#/components/responses/AccountProvisioningErrorResponse500'
        '502':
          $ref: '#/components/responses/AccountProvisioningErrorResponse502'
        '503':
          $ref: '#/components/responses/AccountProvisioningErrorResponse503'
        '504':
          $ref: '#/components/responses/AccountProvisioningErrorResponse504'
components:
  responses:
    AccountProvisioningErrorResponse401:
      description: Request lacks valid authentication credentials
      content:
        application/json:
          schema:
            title: Unauthorized
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
            - message: Failed to authenticate user
              field: ''
              error_id: 10-40100
    AccountProvisioningErrorResponse404:
      description: Not Found
      content:
        application/json:
          schema:
            title: Not Found
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
            - message: No such endpoint
              field: ''
              error_id: 10-40400
    AccountProvisioningErrorResponse500:
      description: Internal Server Error
      content:
        application/json:
          schema:
            title: InternalServerError
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
            - message: Something went wrong
              field: ''
              error_id: 10-50000
    AccountProvisioningErrorResponse502:
      description: Bad Gateway
      content:
        application/json:
          schema:
            title: Bad Gateway
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
            - message: Bad Gateway
              field: ''
              error_id: 10-50200
    AccountProvisioningErrorResponse503:
      description: Service Unavailable
      content:
        application/json:
          schema:
            title: Service Unavailable
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
            - message: Service Unavailable
              field: ''
              error_id: 10-50300
    AccountProvisioningErrorResponse400:
      description: The request was formatted incorrectly or missing required parameters.
      content:
        application/json:
          schema:
            title: Bad Request
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorResponse'
            required:
            - errors
          example:
            errors:
            - message: Field must be a valid email
              field: email
              error_id: 10-40002
            - message: Field must be formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits.
              field: phone
              error_id: 10-40010
            - message: Field must be a valid URL
              field: company_website
              error_id: 10-40008
    AccountProvisioningErrorResponse403:
      description: Not authorized to make the request
      content:
        application/json:
          schema:
            title: Forbidden
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
            - message: The authenticated user is not authorized to perfrom this request
              field: ''
              error_id: 10-40300
    AccountProvisioningErrorResponse504:
      description: Endpoint request timed out
      content:
        application/json:
          schema:
            title: Endpoint request timed out
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
            - message: Endpoint request timed out
              field: ''
              error_id: 10-50400
  schemas:
    ErrorResponse:
      title: Error
      type: object
      properties:
        message:
          type: string
          description: The message representing the error from the API.
        field:
          type: string
          description: The field associated with the error.
        error_id:
          type: string
          description: ID representing the error as a unique nubmer.
      required:
      - message
      - field
      - error_id
    AccountProvisioningAccount:
      title: Account
      type: object
      properties:
        id:
          type: string
          description: Twilio SendGrid account ID
        created_at:
          type: string
          format: date-time
          description: Timestamp indicating when the account was created. Format is [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)
      required:
      - id
      - created_at
      example:
        id: ''
        created_at: '2022-01-02T15:04:05Z'
    AccountProvisioningOfferingV1:
      title: Offering
      type: object
      description: An offering is a package (email infrastructure) or add-on (marketing campaigns, dedicated IP addresses, EASE) that an account can acquire. Each offering has a list of entitlements that indicate the benefits the account receives from the acquisition.
      properties:
        name:
          type: string
          description: Name of the offering
        type:
          type: string
          description: Defines the type of offering (e.g., package or addon).
          $ref: '#/components/schemas/Type'
        quantity:
          type: integer
          format: int64
          description: Quantity of the specified addon to be added. If offering type is `package`, quantity must be 1.
      required:
      - name
      - type
      example:
        name: org.ei.free.v1
        type: package
        quantity: 1
    AccountProvisioningAccountId:
      title: AccountID
      type: object
      properties:
        account_id:
          type: string
          description: Twilio SendGrid account ID
      required:
      - account_id
      example:
        account_id: sg2a2bcd3ef4ab5c67d8efab91c01de2fa
    AccountProvisioningPagination:
      title: Pagination
      type: object
      properties:
        last:
          type: string
          description: The last item returned
      example:
        last: sg2a2bcd3ef4ab5c67d8efab91c01de2fa
    Type:
      type: string
      enum:
      - package
      - addon
    AccountProvisioningProfile:
      title: Profile
      type: object
      properties:
        first_name:
          type: string
          description: First name of the account holder
        last_name:
          type: string
          description: Last name of the account holder
        company_name:
          type: string
          description: Company name of the account holder
        company_website:
          type: string
          description: Company website of the account holder
        email:
          type: string
          description: Email of the account holder
        phone:
          type: string
          description: Phone number with a maximum of fifteen digits formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code]
        timezone:
          type: string
          description: Area/Location as listed in the [IANA Time Zone database](https://www.iana.org/time-zones)
      example:
        first_name: Sender
        last_name: Wiz
        company_name: Example Co
        company_website: https://example.com
        email: mail@example.com
        timezone: Asia/Tokyo
  parameters:
    AccountProvisioningLastParam:
      name: offset
      in: query
      description: The last item successfully retrieved
      schema:
        type: string
      required: false
      example: sg2a2bcd3ef4ab5c67d8efab91c01de2fa
    AccountProvisioningCountParam:
      name: limit
      in: query
      description: The number of items to return
      schema:
        type: integer
        default: 10
        maximum: 100
      required: false
      example: 2
    AccountProvisioningTestHeader:
      name: T-Test-Account
      in: header
      description: '**OPTIONAL** Custom request header provided ONLY for a test account'
      schema:
        type: string
      required: false
    AccountProvisioningAccountId:
      name: accountID
      in: path
      description: Twilio SendGrid account ID
      schema:
        type: string
      required: true
      example: sg2a2bcd3ef4ab5c67d8efab91c01de2fa
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Twilio SendGrid requires you to authenticate with its APIs using an API key. The API key must be sent as a bearer token in the Authorization header.
externalDocs:
  description: Twilio SendGrid's official developer documentation.
  url: https://www.twilio.com/docs/sendgrid