Skip to main content
POST
/
email
/
public
/
v1
/
smtpapi
/
tokens
Create SMTP API Tokens
curl --request POST \
  --url https://api.hubapi.com/email/public/v1/smtpapi/tokens \
  --header 'Content-Type: application/json' \
  --data '
{
  "createdBy": "<string>",
  "campaignName": "<string>"
}
'
{
  "portalId": 123,
  "userName": "<string>",
  "emailCampaignId": 123,
  "createdAt": 123,
  "deleted": true,
  "createdBy": "<string>",
  "appId": 123,
  "campaignName": "<string>",
  "password": "<string>",
  "passwordHash": "<string>"
}

Body

application/json
createdBy
string
required

The email address of the user creating the token

campaignName
string
required

A name for the campaign tied to the SMTP API token. Currently used in the List segmentation UI and the SMTP Token API.

Response

SMTP API token created successfully

portalId
integer

The portal ID

userName
string

The SMTP username

emailCampaignId
integer

The email campaign ID

createdAt
integer<int64>

Creation timestamp

deleted
boolean

Whether the token is deleted

createdBy
string

Email address of the user who created the token

appId
integer

The application ID

campaignName
string

Name of the campaign

password
string

The SMTP password (only returned on creation and reset)

passwordHash
string | null

The password hash

Last modified on December 12, 2025