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

# SMTP API Tokens - Password Reset

> This endpoint allows for the creation of a replacement password for a given Token, keyed by the userName field. Once the password is successfully reset, the old password for the token will be invalid.

export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['transactional-email']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v1/transactional-emails-v1.json POST /email/public/v1/smtpapi/tokens/{userName}/password-reset
openapi: 3.0.0
info:
  title: Transactional emails API v1
  version: 1.0.0
  description: >-
    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
    description: HubSpot API Server
security: []
paths:
  /email/public/v1/smtpapi/tokens/{userName}/password-reset:
    post:
      summary: SMTP API Tokens - Password Reset
      description: >-
        This endpoint allows for the creation of a replacement password for a
        given Token, keyed by the userName field. Once the password is
        successfully reset, the old password for the token will be invalid.
      operationId: resetSmtpApiTokenPassword
      parameters:
        - name: userName
          in: path
          required: true
          description: The userName field of the SMTP API Token needing a password reset.
          schema:
            type: string
      responses:
        '200':
          description: Password reset successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmtpApiTokenWithPassword'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SmtpApiTokenWithPassword:
      allOf:
        - $ref: '#/components/schemas/SmtpApiToken'
        - type: object
          properties:
            password:
              type: string
              description: The SMTP password (only returned on creation and reset)
            passwordHash:
              type: string
              nullable: true
              description: The password hash
    Error:
      type: object
      properties:
        category:
          type: string
          description: The error category
        correlationId:
          type: string
          description: A unique identifier for the request
        message:
          type: string
          description: A human readable message describing the error
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        errors:
          type: array
          description: Further information about the error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        context:
          type: object
          description: Context about the error condition
        links:
          type: object
          description: A map of link names to associated URIs
      required:
        - category
        - correlationId
        - message
    SmtpApiToken:
      type: object
      properties:
        portalId:
          type: integer
          description: The portal ID
        userName:
          type: string
          description: The SMTP username
        emailCampaignId:
          type: integer
          description: The email campaign ID
        createdAt:
          type: integer
          format: int64
          description: Creation timestamp
        deleted:
          type: boolean
          description: Whether the token is deleted
        createdBy:
          type: string
          description: Email address of the user who created the token
        appId:
          type: integer
          description: The application ID
        campaignName:
          type: string
          description: Name of the campaign
    ErrorDetail:
      type: object
      properties:
        message:
          type: string
          description: A human readable message describing the error
        in:
          type: string
          description: The name of the field or parameter in which the error was found
        code:
          type: string
          description: The status code associated with the error detail
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        context:
          type: object
          description: Context about the error condition
      required:
        - message

````