SpareSpare Docs
GuidesAPI Reference

Create Account Access

Create an account-information request and consent in one call.

Create Account Access (POST /data/account-access) creates the account-information request and consent together. Pass referenceCustomerId, customerEmail, providerId, and requestedPermissions. The response includes an authorizationLink for bank approval.

consentExpiryDate, consentTransactionsFromDate, consentTransactionsToDate, successRedirectUrl, and failureRedirectUrl are optional. When you omit consentExpiryDate, Spare sets expiry to one week from today's date.

After the customer authorizes, call POST /report/risk-reports with the same referenceCustomerId.

Account requests and POST /consent/account remain available as a longer path. See Account Requests and Account Consents.

POST
/data/account-access
Authorization
Header

Regulatory jurisdiction the request routes to (e.g. `UAE`, `KSA`, `MAIN`). Match it to the market you're integrating.

Body
*object
array<string>

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/data/account-access" \  -H "x-tenant: UAE" \  -H "Content-Type: application/json" \  -d '{    "customerEmail": "string",    "providerId": "string",    "referenceCustomerId": "string",    "requestedPermissions": [      "ReadAccountsBasic"    ]  }'
{  "data": {    "authorizationLink": "string",    "consentId": "string",    "consentStatus": "string",    "requestedPermissions": [      "string"    ],    "requestId": "string"  },  "error": "string",  "errorDescription": {    "property1": [      "string"    ],    "property2": [      "string"    ]  }}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "not_found",  "details": {},  "message": "string"}