Routes

SE · Wealth API · 2026-04-01

Create consent

POSThttps://api.anessa.co/consents

Create a new PSD2_AIS (Account Information Service) consent for the authenticated external user.

Request

Header Parameters

Api-Versionstringrequired

The API version to use, as YYYY-MM-DD. Must match the version of the endpoint you are targeting. A request without it, or with a version older than the client's minimum API version, is served by the client's minimum API version. The legacy Insurely-Version header is still accepted for versions before 2027-01-01; send only one of the two.

Possible Enum values are 2026-04-01.

Request Body

companystringrequired

Company identifier.

loginMethodstring

The login method to use for authentication. Required when SWEDISH_BANKID parameter is provided.

parametersArray<object>required

Consent creation parameters.

One of these types:

Properties below are from the Psd2AisConsentParameter subtype. View the full schema for full details.

Structured PSD2 consent definition for Account Information Service scopes.

accountIdsArray<string>

Explicit account identifiers granted for PSD2_AIS (Account Information Service) access. If accountIds are not set, the consent will apply to all PSU accounts available at the ASPSP.

balancesboolean

Whether balances can be read.

psuIpAddressstringrequired

PSU (Payment Service User) IP address (IPv4 or IPv6 format)

psuLocalestring

Locale string (format: xx-yy, e.g., 'sv-SE', 'en-GB', 'no-NO'), recommended for proper localization of consent flows and user communications.

transactionsboolean

Whether transactions can be fetched.

typestring
Possible Enum values are PSD2_AIS_CONSENT.
validUntilstring[date]

Requested expiration date for the consent (format: YYYY-MM-DD). The ASPSP may enforce a shorter expiration period than requested.

Responses

Consent successfully created.

Body

companystringrequired

Company identifier.

consentIdstringrequired

Unique identifier for the consent.

expiresAtstring[date-time]

Expiration timestamp for the consent.

scoperequired

Requested consent scopes.

One of these types:

Properties below are from the Psd2AisConsentScope subtype. View the full schema for full details.

PSD2 AIS consent scope with account access details

accountIdsArray<string>

Bank account identifiers this consent grants access to. When absent, the consent covers all accounts available at the bank.

balancesbooleanrequired

Whether this consent grants permission to read account balances.

transactionsbooleanrequired

Whether this consent grants permission to fetch account transactions.

typestringrequired

Scope type discriminator.

Possible Enum values are PSD2_AIS.
statusstringrequired

Current status of the consent.

Possible Enum values are INITIATED, AWAITING_AUTHORIZATION, AUTHORIZED, REVOKED, EXPIRED or FAILED.
cURL
curl https://api.anessa.co/consents \
  -H "Authorization: Bearer <jwt-token>" \
  -H "Api-Version: 2026-04-01" \
  -H "Content-Type: application/json" \
  -d '{
  "company": "se-nordea-psd2",
  "parameters": [
    {
      "accountIds": [
        "SE1234567890"
      ],
      "balances": true,
      "psuIpAddress": "192.168.1.1",
      "psuLocale": "sv-SE",
      "transactions": true,
      "type": "PSD2_AIS_CONSENT",
      "validUntil": "2026-12-31"
    }
  ]
}' \
  -X POST
RESPONSE 201
{
  "company": "se-nordea-psd2",
  "consentId": "550e8400-e29b-41d4-a716-446655440000",
  "expiresAt": "2026-12-31T23:59:59Z",
  "scope": {
    "accountIds": [
      "SE1234567890"
    ],
    "balances": true,
    "transactions": true,
    "type": "PSD2_AIS"
  },
  "status": "INITIATED"
}