Portal
View as Markdown

Open a customer portal session

Needs the portal:write scope, or a full-access key. About scopes

POST
/api/v1/portal-sessions

Authorization

Authorization
Required
Bearer <token>

An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).

In: header

Request Body

application/jsonOptional

customer_idstring

Format: "uuid"

customer_external_idstring

Minimum length: 1Maximum length: 200

return_url
Required
string

Where the portal’s back link sends the payer. https (http for localhost only).

Maximum length: 2048
curl -X POST "https://globalymint.com/api/v1/portal-sessions" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_external_id": "ws_123",
    "return_url": "https://app.example.com/settings"
  }'

The session; send the payer to url (valid one hour).

{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "object": "portal_session",
    "url": "http://example.com",
    "expires_at": "2019-08-24T14:15:22Z",
    "return_url": "string"
  },
  "_agent": {
    "summary": "string",
    "status": "ok",
    "next_actions": [
      "string"
    ],
    "warnings": [
      "string"
    ]
  },
  "api_version": "2026-07-01"
}