Create a portal session for an application
Creates a one-time code that can be exchanged for a portal session token. Optional metadata (max 10 string key-value pairs, no nested objects) is attached to all endpoints created during the session — useful for tracking which of your users created the endpoint.
Management token (nhm_...)
In: header
Path Parameters
Portal session role. admin: full CRUD on endpoints and subscriptions. editor: create/update endpoints and subscriptions, no delete. viewer: read-only access to endpoints, subscriptions, and deliveries.
"editor""admin" | "editor" | "viewer"Session lifetime in minutes (1-60, default 60)
601 <= value <= 60Flat key-value metadata (max 10 keys, string values only). Automatically attached to endpoints created in this session. Use to identify which of your users created the endpoint (e.g. {"userId": "usr_123", "email": "[email protected]"}).
properties <= 10Empty Object
Response Body
curl -X POST "https://loading/management/v1/workspaces/{workspaceId}/applications/string/portal" \ -H "Content-Type: application/json" \ -d '{}'{
"portalUrl": "string",
"code": "string",
"expiresAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "validation_error",
"message": "expiresInSeconds must be between 60 and 86400 (24h)"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid authorization header"
}
}{
"error": {
"code": "token_disabled",
"message": "Management token is disabled"
}
}{
"error": {
"code": "not_found",
"message": "Application not found"
}
}