> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: bd4f9a30-600d-48c8-9840-cb53b481d2ab
---

# Query SMTP API tokens by campaign name or an emailCampaignId.

> Query multiple SMTP API tokens by campaign name or a single token by emailCampaignId.

> **Supported products**

> **Required Scopes**


## OpenAPI

````yaml specs/legacy/v3/marketing-transactional-single-send-v3.json GET /marketing/v3/transactional/smtp-tokens
openapi: 3.0.1
info:
  title: Transactional Single Send
  version: v3
  x-hubspot-product-tier-requirements:
    marketing: PROFESSIONAL
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
  x-hubspot-api-use-case: >-
    After a customer converts or purchases a product from your business, you
    want to send them a receipt of their transaction.
  x-hubspot-related-documentation:
    - name: Transactional Email Guide
      url: >-
        https://developers.hubspot.com/docs/guides/api/marketing/emails/transactional-emails
  x-hubspot-introduction: >-
    Use the transactional email API to send emails from a dedicated IP address
    to your contacts for essential business transactions, including account
    updates or terms of service changes.
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Send transactional email
  - name: SMTP Tokens
paths:
  /marketing/v3/transactional/smtp-tokens:
    get:
      tags:
        - SMTP Tokens
      summary: Query SMTP API tokens by campaign name or an emailCampaignId.
      description: >-
        Query multiple SMTP API tokens by campaign name or a single token by
        emailCampaignId.
      operationId: get-/marketing/v3/transactional/smtp-tokens_getTokensPage
      parameters:
        - name: after
          in: query
          description: >-
            The paging cursor token of the last successfully read resource will
            be returned as the `paging.next.after` JSON property of a paged
            response containing more results.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: campaignName
          in: query
          description: A name for the campaign tied to the SMTP API token.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: emailCampaignId
          in: query
          description: >-
            Identifier assigned to the campaign provided during the token
            creation.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of results to display per page.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CollectionResponseSmtpApiTokenViewForwardPaging
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - transactional-email
components:
  schemas:
    CollectionResponseSmtpApiTokenViewForwardPaging:
      required:
        - results
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/ForwardPaging'
        results:
          type: array
          items:
            $ref: '#/components/schemas/SmtpApiTokenView'
    ForwardPaging:
      type: object
      properties:
        next:
          $ref: '#/components/schemas/NextPage'
      description: >-
        Paging information for forward-only pagination. Contains the next page
        reference when more results are available; omitted or empty on the last
        page.
    SmtpApiTokenView:
      required:
        - campaignName
        - createContact
        - createdAt
        - createdBy
        - emailCampaignId
        - id
      type: object
      properties:
        campaignName:
          type: string
          description: A name for the campaign tied to the token.
        createContact:
          type: boolean
          description: Indicates whether a contact should be created for email recipients.
        createdAt:
          type: string
          description: Timestamp generated when a token is created.
          format: date-time
        createdBy:
          type: string
          description: Email address of the user that sent the token creation request.
        emailCampaignId:
          type: string
          description: >-
            Identifier assigned to the campaign provided in the token creation
            request.
        id:
          type: string
          description: User name to log into the HubSpot SMTP server.
        password:
          type: string
          description: Password used to log into the HubSpot SMTP server.
      description: >-
        A SMTP API token provides both an ID and password that can be used to
        send email through the HubSpot SMTP API.
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: The error category
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Context about the error condition
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: >-
            A unique identifier for the request. Include this value with any
            error reports or support tickets
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: further information about the error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: >-
            A map of link names to associated URIs containing documentation
            about the error or recommended remediation steps
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate
          example: An error occurred
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
      description: >-
        Represents an error response returned by the API when an operation
        fails. This component is used in various endpoints to provide detailed
        information about the error encountered.
      example:
        message: Invalid input (details will vary based on the error)
        correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf
        category: VALIDATION_ERROR
        links:
          knowledge-base: https://www.hubspot.com/products/service/knowledge-base
    NextPage:
      required:
        - after
      type: object
      properties:
        after:
          type: string
          description: A paging cursor token for retrieving subsequent pages.
        link:
          type: string
          description: A URL that can be used to retrieve the next page results.
      description: >-
        Specifies the paging information needed to retrieve the next set of
        results in a paginated API response
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: The status code associated with the error detail
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Context about the error condition
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: The name of the field or parameter in which the error was found.
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
      description: >-
        Represents detailed information about an error that occurred in the API.
        This component is used to provide additional context and specifics about
        errors, typically as part of an error response.
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.hubspot.com/oauth/authorize
          tokenUrl: https://api.hubapi.com/oauth/v1/token
          scopes:
            transactional-email: ''

````