SpareSpare Docs
GuidesAPI Reference

Account Consents

Create, list, and retrieve account data consents.

Account consents represent a customer's authorization to read their bank data for the permissions in the linked account request.

GET
/consent/account
Authorization
Header

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

Query

1-based page number for paginated results. Defaults to the first page.

Number of items to return per page. Defaults to the API's page size.

Spare provider UUID to filter results by.

UUID of the account/consent connection to filter by.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/consent/account" \  -H "x-tenant: UAE"
{  "data": [    {      "authorizationLink": "string",      "connection": {        "createdAt": "2025-01-01T00:00:00Z",        "id": "string",        "provider": {          "address": "string",          "allowedPermissions": [            "string"          ],          "arabicName": "string",          "country": {            "arabicName": "string",            "createdAt": "2025-01-01T00:00:00Z",            "currency": {              "code": "string",              "id": "string",              "name": "string"            },            "englishName": "string",            "id": "string",            "iso3166Code": "string",            "updatedAt": "2025-01-01T00:00:00Z"          },          "englishName": "string",          "id": "string",          "isEnable": true,          "logo": "string",          "phone": "string",          "status": "string"        },        "status": "string",        "updatedAt": "2025-01-01T00:00:00Z"      },      "createdAt": "2025-01-01T00:00:00Z",      "customerId": "string",      "expires_in": 0,      "expiryDate": "2025-01-01T00:00:00Z",      "failureRedirectUrl": "string",      "id": "string",      "permissions": [        "string"      ],      "request_uri": "string",      "scope": "string",      "status": "string",      "statusHistory": [        {          "dateTime": "2025-01-01T00:00:00Z",          "status": "string"        }      ],      "successRedirectUrl": "string",      "transactionsFromDate": "2025-01-01T00:00:00Z",      "transactionsToDate": "2025-01-01T00:00:00Z"    }  ],  "meta": {    "currentPageNumber": 0,    "pageSize": 0,    "totalNumberOfPages": 0  }}
{  "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"}
POST
/consent/account
Authorization
Header

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

Body
*object

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/consent/account" \  -H "x-tenant: UAE" \  -H "Content-Type: application/json" \  -d '{    "providerId": "string",    "purpose": "AccountAggregation",    "requestId": "string",    "userType": "Retail"  }'
{  "data": {    "authorizationLink": "string",    "createdAt": "2025-01-01T00:00:00Z",    "customerId": "string",    "expires_in": 0,    "expiryDate": "2025-01-01T00:00:00Z",    "failureRedirectUrl": "string",    "id": "string",    "permissions": [      "string"    ],    "request_uri": "string",    "status": "string",    "successRedirectUrl": "string",    "transactionsFromDate": "2025-01-01T00:00:00Z",    "transactionsToDate": "2025-01-01T00:00:00Z"  }}
{  "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"}
GET
/consent/account/{consentId}
Authorization
Path

UUID of the consent (returned when the consent was created).

Header

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

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/consent/account/string" \  -H "x-tenant: UAE"
{  "data": {    "authorizationLink": "string",    "connection": {      "createdAt": "2025-01-01T00:00:00Z",      "id": "string",      "provider": {        "address": "string",        "allowedPermissions": [          "string"        ],        "arabicName": "string",        "country": {          "arabicName": "string",          "createdAt": "2025-01-01T00:00:00Z",          "currency": {            "code": "string",            "id": "string",            "name": "string"          },          "englishName": "string",          "id": "string",          "iso3166Code": "string",          "updatedAt": "2025-01-01T00:00:00Z"        },        "englishName": "string",        "id": "string",        "isEnable": true,        "logo": "string",        "phone": "string",        "status": "string"      },      "status": "string",      "updatedAt": "2025-01-01T00:00:00Z"    },    "createdAt": "2025-01-01T00:00:00Z",    "customerId": "string",    "expires_in": 0,    "expiryDate": "2025-01-01T00:00:00Z",    "failureRedirectUrl": "string",    "id": "string",    "permissions": [      "string"    ],    "request_uri": "string",    "scope": "string",    "status": "string",    "statusHistory": [      {        "dateTime": "2025-01-01T00:00:00Z",        "status": "string"      }    ],    "successRedirectUrl": "string",    "transactionsFromDate": "2025-01-01T00:00:00Z",    "transactionsToDate": "2025-01-01T00:00:00Z"  }}
{  "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"}