DevelopersAPI reference

Customer portal API

REST endpoints for customer portal in SKUFlow: 6 operations with parameters, request and response fields, permissions and curl examples.

Base URL: https://app.skuflow.ai/api. Every call needs Authorization: Bearer skf_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.

OperationEndpointRisk
Get the customer's live portal linkGET /organizations/{organizationId}/customers/{customerId}/portalread
Create or regenerate the customer's portal linkPOST /organizations/{organizationId}/customers/{customerId}/portalsensitive
Revoke the customer's portal linkDELETE /organizations/{organizationId}/customers/{customerId}/portalsensitive
A customer's signed-in portal devicesGET /organizations/{organizationId}/customers/{customerId}/portal-sessionsread
Sign a customer out of one deviceDELETE /organizations/{organizationId}/customers/{customerId}/portal-sessions/{sessionId}sensitive
Sign a customer out everywherePOST /organizations/{organizationId}/customers/{customerId}/portal-sessions/revoke-allsensitive
GET /organizations/{organizationId}/customers/{customerId}/portal

The customer's working portal link (/portal/{token}), or null when there is none (never made, revoked or expired), with when it was last opened. Read-only, but the token is a credential: do not share it unless asked.

Permissionportal.manage (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolportalLinks_get (toolset customers)

Parameters

NameInTypeRequiredDescription
customerIdpathstringYes

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/customers/{customerId}/portal" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
idstring
tokenstringOpen the portal at /portal/{token} on the web app.
createdAtstring (date-time)
expiresAtstring (date-time) or null
lastViewedAtstring (date-time) or null
viewCountinteger
POST /organizations/{organizationId}/customers/{customerId}/portal

EXPOSES TO THE CUSTOMER / REVOKES: issues a new passwordless portal link for the customer. Any earlier link is revoked in the same step (it stops working), so share the new one. The portal shows only this customer's balance, visits, quotes, invoices, service history and properties. Nothing is emailed.

Permissionportal.manage (Owner, Admin, Staff)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolportalLinks_create (toolset customers)
ApprovalOver MCP, this tool asks for your OK first (in the AI app when it supports it, otherwise in SKUFlow). See Approvals.

Parameters

NameInTypeRequiredDescription
customerIdpathstringYes

Request body

FieldTypeRequiredDescription
expiresInDaysinteger or nullNoDays until the link expires; default 365. null means no expiry. 1–3650.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/customers/{customerId}/portal" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expiresInDays":1}'

Response

201: the answer's fields
FieldTypeDescription
idstring
tokenstringOpen the portal at /portal/{token} on the web app.
createdAtstring (date-time)
expiresAtstring (date-time) or null
lastViewedAtstring (date-time) or null
viewCountinteger
DELETE /organizations/{organizationId}/customers/{customerId}/portal

Destructive: the customer's portal link stops working at once (404 for anyone who opens it). Create a new one to restore access. Returns how many links were revoked.

Permissionportal.manage (Owner, Admin, Staff)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolportalLinks_revoke (toolset customers)
ApprovalOver MCP, this tool always waits for your approval in SKUFlow. See Approvals.

Parameters

NameInTypeRequiredDescription
customerIdpathstringYes

Example

curl -X DELETE "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/customers/{customerId}/portal" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
revokedinteger

A customer's signed-in portal devices

GET /organizations/{organizationId}/customers/{customerId}/portal-sessions

The devices where this customer is signed in to their portal (/c/{slug}), newest use first: how they signed in, browser and device, address, when, last use and expiry. Live sessions only. Read-only.

Permissionportal.manage (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolcustomerSessions_list (toolset customers)

Parameters

NameInTypeRequiredDescription
customerIdpathstringYes

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/customers/{customerId}/portal-sessions" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstring
methodenumHow the customer signed in: a code by email or text, or the email's one-tap link. One of EMAIL_CODE, SMS_CODE, EMAIL_LINK.
devicestring or nullBrowser and device, e.g. Safari on iPhone.
ipAddressstring or null
createdAtstring (date-time)When they signed in.
lastSeenAtstring (date-time)
expiresAtstring (date-time)30 days after last use (sliding).

Sign a customer out of one device

DELETE /organizations/{organizationId}/customers/{customerId}/portal-sessions/{sessionId}

Revokes access: ends one of the customer's portal sessions at once (the device must sign in again with a code). Another customer's session is 404. List them with GET …/portal-sessions first.

Permissionportal.manage (Owner, Admin, Staff)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolcustomerSessions_revoke (toolset customers)
ApprovalOver MCP, this tool always waits for your approval in SKUFlow. See Approvals.

Parameters

NameInTypeRequiredDescription
customerIdpathstringYes
sessionIdpathstringYes

Example

curl -X DELETE "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/customers/{customerId}/portal-sessions/{sessionId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
revokedinteger

Sign a customer out everywhere

POST /organizations/{organizationId}/customers/{customerId}/portal-sessions/revoke-all

Revokes access: ends every portal session of the customer at once. They can sign in again with a code sent to their email or phone on file. Returns how many sessions ended.

Permissionportal.manage (Owner, Admin, Staff)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolcustomerSessions_revokeAll (toolset customers)
ApprovalOver MCP, this tool always waits for your approval in SKUFlow. See Approvals.

Parameters

NameInTypeRequiredDescription
customerIdpathstringYes

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/customers/{customerId}/portal-sessions/revoke-all" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
revokedinteger

On this page