Transactions

Get or create a transaction user

POST/transaction-users

Get-or-create the transaction-user record for a platform user (the REST-normalised replacement for the legacy GET that mutated). The user must be one the acting user can see in the token organisation, as on GET /transaction-users/{transactionUserId}; otherwise it 404s, and entrepreneur tokens always do. Returns 201 when a record is created, 200 when it already existed.

Request body

application/json, required

  • userIdstring (uuid)Required#

    user guid.

{
  "userId": "6f1c2e8a-1b2c-4d5e-8f90-1a2b3c4d5e6f"
}

Responses

200

The transaction user already existed.

TransactionUser
{
  "data": {
    "id": "8d9e0f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a",
    "user_id": "6f1c2e8a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
    "source": "user_data_service",
    "created_at": "2026-06-15T10:30:00+00:00"
  }
}
201

The transaction user was created.

TransactionUser
{
  "data": {
    "id": "8d9e0f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a",
    "user_id": "6f1c2e8a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
    "source": "user_data_service",
    "created_at": "2026-06-15T10:30:00+00:00"
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
422

Request validation failed (HTTP 422). The body is either the Laravel validation envelope (message + field-keyed errors) or the API error envelope for domain rejections (e.g. form_type_not_supported, folder_locked, parent_not_found, folder_not_empty).

429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl -X POST https://your-org-domain/kong/core/api/v2/transaction-users\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"\
  -d '{
  "userId": "6f1c2e8a-1b2c-4d5e-8f90-1a2b3c4d5e6f"
}'