For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
      • GETGet the list of all the sub-accounts of the master account.
      • POSTCreate a new sub-account under a master account.
      • GETGet sub-account details
      • DELDelete a sub-account
      • PUTUpdate sub-account plan
      • PUTUpdate sub-accounts plan
      • POSTGenerate SSO token to access admin account
      • POSTGenerate SSO token to access sub-account
      • GETGet the details of requested master account
      • POSTCreate an API key for a sub-account
      • PUTEnable/disable sub-account application(s)
      • POSTCreate a new group of sub-accounts
      • GETList of all IPs
      • POSTAssociate an IP to sub-accounts
      • PUTDissociate an IP to sub-accounts
      • GETGET a group details
      • PUTUpdate a group of sub-accounts
      • DELDelete a group
      • PUTDelete sub-account from group
      • POSTSend invitation to an admin user
      • PUTResend / cancel admin user invitation
      • DELRevoke an admin user
      • GETGet the list of all admin users
      • GETCheck admin user permissions
      • PUTChange admin user permissions
      • GETGet the list of groups
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Accounts and SettingsMaster Account

Generate SSO token to access sub-account

POST
https://api.brevo.com/v3/corporate/subAccount/ssoToken
POST
/v3/corporate/subAccount/ssoToken
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.masterAccount.generateSsoTokenToAccessSubAccount({
8 id: 3232323,
9 });
10}
11main();
1{
2 "token": "5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0"
3}
This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.
Was this page helpful?
Previous

Get the details of requested master account

Next
Built with

This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

This endpoint expects an object.
idlongRequired

Id of the sub-account organization

emailstringOptional

User email of sub-account organization

targetenumOptional

Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Senders after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login

urlstringOptional
Set the full target URL after login success. The user will land directly on this target URL after login

Response

Session token
tokenstring
Session token, it will remain valid for 15 days.

Errors

400
Bad Request Error
403
Forbidden Error