Zum Hauptinhalt springen
POST
/
marketing
/
v3
/
transactional
/
smtp-tokens
SMTP APIトークンを作成します。
curl --request POST \
  --url https://api.hubapi.com/marketing/v3/transactional/smtp-tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "campaignName": "<string>",
  "createContact": true
}'
{
  "campaignName": "<string>",
  "createContact": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "emailCampaignId": "<string>",
  "id": "<string>",
  "password": "<string>"
}
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -Professional
Sales HubSales Hub -無料ツール
Service HubService Hub -無料ツール
Content HubContent Hub -無料ツール
この API には、次のいずれかのスコープが必要です。
transactional-email

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

A request object that includes the campaign name tied to the token and whether contacts should be created for email recipients.

A request object to create a SMTP API token

campaignName
string
required

SMTP APIトークンに対応付けられているキャンペーンの名前。

createContact
boolean
required

Eメール受信者についてコンタクトを作成する必要があるかどうかを示します。

Response

successful operation

A SMTP API token provides both an ID and password that can be used to send email through the HubSpot SMTP API.

campaignName
string
required

トークンに対応付けられているキャンペーンの名前。

createContact
boolean
required

Eメール受信者についてコンタクトを作成する必要があるかどうかを示します。

createdAt
string<date-time>
required

トークンが作成されるときに生成されるタイムスタンプ。

createdBy
string
required

トークン作成リクエストを送信したユーザーのEメールアドレス。

emailCampaignId
string
required

トークン作成リクエストで指定されたキャンペーンに割り当てられているID。

id
string
required

HubSpot SMTPサーバーにログインするためのユーザー名。

password
string

HubSpot SMTPサーバーにログインするためのパスワード。