---
title: "Create a SMTP API token."
method: POST
path: "/marketing/transactional/2026-03/smtp-tokens"
tags: ["SMTP Tokens"]
---

# Create a SMTP API token.

`POST /marketing/transactional/2026-03/smtp-tokens`

## Request

- Base URL: `https://api.hubapi.com`
- URL: `https://api.hubapi.com/marketing/transactional/2026-03/smtp-tokens`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `hapikey`
  - none

Create a SMTP API token.

## Request body

- MarketingTransactionalSmtpApiTokenRequestEgg
  - `campaignName` string, required: A name for the campaign tied to the SMTP API token.
  - `createContact` boolean, required: Indicates whether a contact should be created for email recipients.

## Response `201`

successful operation

- MarketingTransactionalSmtpApiTokenView
  - `campaignName` string, required: A name for the campaign tied to the token.
  - `createContact` boolean, required: Indicates whether a contact should be created for email recipients.
  - `createdAt` string, date-time, required: Timestamp generated when a token is created.
  - `createdBy` string, required: Email address of the user that sent the token creation request.
  - `emailCampaignId` string, required: Identifier assigned to the campaign provided in the token creation request.
  - `id` string, required: User name to log into the HubSpot SMTP server.
  - `password` string: Password used to log into the HubSpot SMTP server.

## Other responses

- `default`: An error occurred.

## Changes

> 14 revisions in range; 1 not diffed, 2 could not be searched.

- **2026-04-08** `b0d8bc008db9`: 1 info
  - api operation id `post-/marketing/transactional/2026-03/smtp-tokens_createToken` removed and replaced with `post-/marketing/transactional/2026-03/smtp-tokens`
- **2026-03-30** `dc2fdad57f7f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hubspot/apis/hubspot-api-specification/changes/marketing/transactional/2026-03/smtp-tokens/post.md)

---

[API](https://skmtc.dev/hubspot/apis/hubspot-api-specification.md) - [All operations](https://skmtc.dev/hubspot/apis/hubspot-api-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/hubspot-api-specification/revisions/f9c7181056c5?raw)
