Help centerAPI referenceCustomer portal
Customer portal
Access links for end customers to connect their domain and adjust branding.
Get the portal settings
/projects/{id}/portalprojects:readWhat the end customer can do in the portal. Without settings, returns the default (off).
Parameters
idpath · stringrequiredResource id (prj_…, dom_…)
Request
curl "https://api.tenanci.com/v2/projects/prj_8f3k2m/portal" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"enabled": true,
"domains": true,
"brand": true,
"analytics": true,
"maxDomains": 1,
"allowExtraCharge": false,
"templateDomainId": "dom_4h7n1q",
"exposeTenant": false,
"supportEmail": "suporte@agendafacil.com",
"welcome": "Conecte o domínio da sua barbearia e ajuste a marca."
}Configure the portal
/projects/{id}/portalprojects:writeGrowth+Only the fields you send change. Returns the full settings. The template domain must belong to this project (invalid_template).
Parameters
idpath · stringrequiredResource id (prj_…, dom_…)
Body
enabledbooleanTurns the portal on (required to create links).
domainsbooleanThe customer can connect their own domain.
brandbooleanThe customer can adjust their domain's logo, colors and favicon (published right away).
analyticsbooleanThe customer sees their own domain's analytics.
maxDomainsinteger≥ 1, ≤ 20Domains per customer (default 1).
allowExtraChargebooleanLets the customer go over the plan's domain limit (the extra-domain charge is yours).
templateDomainIdstring | nullTemplate domain of this project: its published TailorKit is copied to domains connected through the portal.
exposeTenantbooleanDomains connected through the portal expose the customer's data as window.TENANCI.
supportEmailstring | nullSupport email shown in the portal.
welcomestring | nullWelcome message at the top of the portal.
Request
curl -X PUT "https://api.tenanci.com/v2/projects/prj_8f3k2m/portal" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"enabled":true,"maxDomains":1,"templateDomainId":"dom_4h7n1q","supportEmail":"suporte@agendafacil.com","welcome":"Conecte o domínio da sua barbearia e ajuste a marca."}'Response 200
{
"enabled": true,
"domains": true,
"brand": true,
"analytics": true,
"maxDomains": 1,
"allowExtraCharge": false,
"templateDomainId": "dom_4h7n1q",
"exposeTenant": false,
"supportEmail": "suporte@agendafacil.com",
"welcome": "Conecte o domínio da sua barbearia e ajuste a marca."
}Create a portal link for a customer
/projects/{id}/portal/sessionsdomains:writeGrowth+Like Stripe's customer portal: call it from your backend and send the url to the customer (or redirect). The secret goes in the fragment (#), out of logs and the Referer, and is only shown in this response. The link lasts 60 min by default (up to 24 h) and the portal must be on (otherwise 400 portal_disabled). Domains the customer connects join the project with the tenantId already set.
Parameters
idpath · stringrequiredResource id (prj_…, dom_…)
Body
tenantIdstringrequiredmin 1, max 200Customer id in your system.
tenantDataRecord<string, string | number | boolean | null>Customer data (the
nameshows in the portal), sent to the origin on connected domains.returnUrlstring | nullhttps address for the back-to-your-app button.
emailstring | nullCustomer email (for the record).
ttlMinutesinteger≥ 5, ≤ 1440Link lifetime in minutes (default 60, up to 1440).
Request
curl -X POST "https://api.tenanci.com/v2/projects/prj_8f3k2m/portal/sessions" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"tenantId":"barbearia-123","tenantData":{"name":"Barbearia do Zé","plan":"pro"},"returnUrl":"https://app.agendafacil.com/configuracoes","ttlMinutes":60}'Response 201
{
"id": "pss_01jb2x7k9m",
"url": "https://app.tenanci.com/portal#pss_01jb2x7k9m.Yk3pQ9vT2mXc8LwR5nB7aZ1dF4gH6jK0",
"expiresAt": "2026-10-14T13:00:00.000Z"
}
