APG PayAPG Paydocs

Identity

Create sessions

POST/sessions

Start or complete a sign-in. The response says which step you are on. The credential is optional, see below.

14 actionsSessCmdChangePasswordSessCmdDiscoverSessCmdSendCustomerOtpSessCmdSendEmailLinkSessCmdSendOtpSessCmdSendPasswordResetSessCmdSignInCustomerSessCmdSignInCustomerOtpSessCmdSignInEmailLinkSessCmdSignInFederatedSessCmdSignInOtpSessCmdSignInPasswordSessCmdSignInPasswordResetSessCmdStartFederated

Permissions

Required permission
sessions:create

Requires the `create` action on `sessions` for the supplied runtime context

Request body

This body is a typed union. Pick a variant to see its fields and a matching example.

Discriminated by type
type = "SessCmdChangePassword"
currentPasswordstringrequired
newPasswordstringrequired
curl -X POST https://api.tst.au.apgpay.dev/sessions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "SessCmdChangePassword",
  "currentPassword": "string",
  "newPassword": "string"
}'

Responses

The response is a tagged shape: type is always "SessCreateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "SessCreateRspAttributes"

The resource that was created.

Example
{
  "type": "SessCreateRspAttributes",
  "created": {
    "type": "SessViewAuthenticated",
    "userId": "user_9f2Kd8QpLzXw",
    "displayName": "Ada Lovelace",
    "activeDomain": {
      "type": "SessDomainAttributes",
      "domain": {
        "type": "UserDomainAnonymous",
        "restrictedTo": {
          "type": "UserDomainCustomer",
          "customerId": "cust_9f2Kd8QpLzXw"
        }
      },
      "description": "string"
    },
    "roleIds": [
      "role_9f2Kd8QpLzXw"
    ],
    "capabilities": [
      {
        "type": "SessCapabilityAttributes",
        "resource": "BlockedCard",
        "actions": [
          "Create"
        ]
      }
    ],
    "rbacHash": "string",
    "directDebitAccountKinds": [
      "Au"
    ],
    "expiresAt": "2026-08-19T04:21:07Z"
  }
}

Error responses