Platform API
Authenticate, explore endpoints, and integrate with the SuitePortal Platform API.
The Platform API provides programmatic CRUD over your SuitePortal configuration — organizations, syncs, views, agents, payments, and more.
Base URL: https://suiteportal.io/api/platform/v1
API Reference: suiteportal.io/api/platform/v1/docs
Authentication
API key (recommended for integrations)
Create a key in Configuration > API or via the API itself. Keys are prefixed with sp_.
curl -H "Authorization: Bearer sp_live_abc123..." \
https://suiteportal.io/api/platform/v1/whoamiOAuth2 bearer token (for MCP / AI agents)
Agents authenticate via Better Auth's OAuth2 flow and receive a JWT. This is the same flow used by the MCP server — no additional setup required.
curl -H "Authorization: Bearer eyJhbG..." \
https://suiteportal.io/api/platform/v1/whoamiSession cookie (web app)
If you're calling the Platform API from the SuitePortal web app, your session cookie is sent automatically. No Authorization header needed.
Common workflows
Check your context
GET /api/platform/v1/whoamiReturns your user, active organization, membership role, permissions, and resource metrics (MAU, storage, agent credits, active API keys).
List and trigger syncs
# List all sync configs
GET /api/platform/v1/sync-configs
# Trigger a sync
POST /api/platform/v1/sync-configs/{id}/trigger
# Check run status
GET /api/platform/v1/sync-configs/{id}/runsManage agents
# List agents
GET /api/platform/v1/agents
# Restart an agent
POST /api/platform/v1/agents/{id}/restart
# Get conversations
GET /api/platform/v1/agents/{id}/conversationsPayment operations
# Get Pay config
GET /api/platform/v1/pay/config
# List payments
GET /api/platform/v1/pay/payments?status=SUCCEEDED
# Create checkout
POST /api/platform/v1/pay/checkoutPagination
List endpoints accept page and pageSize query parameters:
GET /api/platform/v1/sync-configs?page=2&pageSize=10Response includes pagination metadata:
{
"data": [...],
"pagination": {
"total": 42,
"page": 2,
"pageSize": 10,
"totalPages": 5
}
}Default page size is 25, maximum is 100.
Error handling
All errors return a consistent JSON body:
{
"error": {
"code": "FORBIDDEN",
"message": "Missing required permission: sync:create"
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | BAD_REQUEST | Invalid input |
| 401 | UNAUTHORIZED | Missing or invalid auth |
| 403 | FORBIDDEN | Valid auth, insufficient permissions |
| 404 | NOT_FOUND | Resource doesn't exist or belongs to another org |
| 422 | VALIDATION_ERROR | Input validation failed |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests (60/min default) |
| 500 | INTERNAL_ERROR | Server error |
Resource groups
The API is organized into 11 resource groups. See the API Reference for full endpoint details.
| Group | Prefix | Description |
|---|---|---|
| Identity | /whoami | Current user, org, and metrics |
| Organizations | /organizations | Members, invitations, roles |
| Teams | /teams | Team management |
| Domains | /organizations/{id}/domains | Custom domain management |
| Syncs | /sync-configs, /sync-runs | NetSuite sync configuration |
| Views | /views, /subscriptions | Saved views and email subscriptions |
| API Keys | /api-keys, /api-schema | Key management and schema lifecycle |
| Agents | /agents, /conversations | AI agent provisioning and chat |
| Pay | /pay | Stripe Connect payments and payouts |
| Portal Config | /portal | Field mappings, sidebar, pages, templates |
| NetSuite | /netsuite | Connection and metadata management |
OpenAPI spec
The raw OpenAPI 3.0 JSON spec is available at:
GET /api/platform/v1/openapiUse it to generate client SDKs, import into Postman, or integrate with any OpenAPI-compatible tooling.
Public API
Use SuitePortal's Public API to query your synced NetSuite data at scale. Build integrations, dashboards, and workflows without hitting NetSuite's API limits.
Managing Portal Environments
Best practices for SuitePortal development, sandbox, and production environments. Manage multiple NetSuite connections and test safely before going live.