Authorities
A custodian authority represents the lifecycle of granting Aleta access to a custodian on behalf of a legal entity.
The GET endpoints on this page need the scope custody:read; the POST endpoints (create, upload, consent, link and revoke) need custody:write. A token without the scope gets 403 Forbidden.
Data model
JSON:API resource type: custodian-authority.
statusstring, requiredCurrent status in the custodian authority lifecycle. One of:
waiting-for-files— The custodian authority has been created. Required files (listed inpendingFiles) must be uploaded viaPOST /custodian-authorities/:id/files.waiting-for-consent— All required files have been uploaded. The consent must now be submitted viaPOST /custodian-authorities/:id/consent.awaiting-aleta— Consent has been submitted (or the custodian has responded). Aleta is reviewing / processing.awaiting-custodian— Aleta has forwarded the request to the custodian. Waiting for the custodian to act. The status may alternate betweenawaiting-aletaandawaiting-custodianmultiple times.active— The custodian authority is fully established and dataflow is operational.revoke-in-progress— A revocation has been requested. Aleta is removing dataflow links with the custodian.revoked— The custodian authority has been fully revoked. Dataflow has stopped.cancelled— The custodian authority was cancelled before becoming active (e.g. rejected by the custodian).
pendingFilesarray, requiredList of file names that still need to be uploaded before consent can be submitted. Only populated when status is
waiting-for-files. Empty array otherwise. File names correspond to those defined in the custodian auth flow'sexpectedFiles.linkedDepositoriesarray, requiredDepositories linked to this custodian authority. Each entry contains:
depositoryNumber(string): The depository number.depositoryId(string, nullable): The Aleta depository ID.nullfor a number added by aspecificconsent that has not been linked to a depository yet. A depository added with the link endpoint carries its ID from the start.status(string): Status of the linked depository, e.g.in-progress(added by a consent or by the link endpoint; Aleta is setting up the dataflow connection with the custodian) oractive.
linkedAccountsarray, requiredAccounts linked to this custodian authority. Each entry contains:
accountNumber(string): The account number.accountId(string, nullable): The Aleta account ID.nullfor a number added by aspecificconsent that has not been linked to an account yet. An account added with the link endpoint carries its ID from the start.status(string): Status of the linked account, e.g.in-progress(added by a consent or by the link endpoint; Aleta is setting up the dataflow connection with the custodian) oractive.
Relationships
custodiancustodianThe custodian that the authority relates to.
custodianAuthFlowcustodian-auth-flowThe custodian auth flow used to create the authority.
legalEntitylegal-entityThe legal entity that the authority is granted for.
Custodian authority file
A file uploaded for a custodian authority. Files serve as proof of access. There is no endpoint to delete a file; uploading a file with the same name again replaces the earlier one. JSON:API resource type: custodian-authority-file.
hashstringSHA-256 hash of the file content in lowercase hex, prefixed with
sha2-256:(e.g.sha2-256:7d865e...).namestringLogical name identifying the role of the file (e.g.
power-of-attorney,consent). Matches one of the custodian auth flow'sexpectedFiles.uploadedAtstring, ISO 8601UTC timestamp of when the file was uploaded, with seven fractional digits and an explicit offset (e.g.
2026-03-01T10:00:00.1234560+00:00).filenamestringOriginal filename as provided by the uploader.
List a legal entity's authorities
List all custodian authorities for a given legal entity. The response is not paginated.
Parameters
legalEntityIdpath, requiredIdentifier for the legal entity.
Errors
403 Forbidden— Returned when you do not have read access to the legal entity.404 Not Found— Returned when the legal entity does not exist.
GET /api/v3/legal-entities/67b01234a5bc678d90e12345/custodian-authorities HTTP/1.1
Accept: application/vnd.api+json
Authorization: Bearer <access token>
Host: api.aleta.ai
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": [
{
"id": "2668e473-b2a2-47a9-a90b-a5ec0c812d44",
"type": "custodian-authority",
"attributes": {
"status": "active",
"pendingFiles": [],
"linkedDepositories": [
{
"depositoryNumber": "1234-5678901234",
"depositoryId": "67c01234a5bc678d90e12345",
"status": "active"
},
{
"depositoryNumber": "1234-5678901235",
"depositoryId": null,
"status": "in-progress"
}
],
"linkedAccounts": [
{
"accountNumber": "1234-0011223344",
"accountId": "67c01234a5bc678d90e12346",
"status": "active"
}
]
},
"relationships": {
"custodian": {
"data": {
"type": "custodian",
"id": "678e9012f3ab456c78d90123"
}
},
"custodianAuthFlow": {
"data": {
"type": "custodian-auth-flow",
"id": "nordea-20260630"
}
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "67b01234a5bc678d90e12345"
}
}
}
},
{
"id": "ac8fa31f-b9bd-414c-a56d-8d95848ebbcf",
"type": "custodian-authority",
"attributes": {
"status": "waiting-for-files",
"pendingFiles": [
"power-of-attorney",
"consent"
],
"linkedDepositories": [],
"linkedAccounts": []
},
"relationships": {
"custodian": {
"data": {
"type": "custodian",
"id": "679a2345b6cd789e01f23456"
}
},
"custodianAuthFlow": {
"data": {
"type": "custodian-auth-flow",
"id": "saxo-20260630"
}
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "67b01234a5bc678d90e12345"
}
}
}
}
]
}
Create an authority
Create a custodian authority for a given legal entity using the specified custodian auth flow. The new custodian authority is created in the waiting-for-files status. Upload the required files (listed in pendingFiles) using the POST /custodian-authorities/:id/files endpoint to advance to waiting-for-consent.
Parameters
legalEntityIdpath, requiredIdentifier for the legal entity.
custodianAuthFlowIdquery, requiredThe custodian auth flow identifier.
Errors
400 Bad Request— Returned whencustodianAuthFlowIdis missing or empty.400 Bad Request— Returned when the custodian auth flow ID is outdated. Use the latest custodian auth flow for onboarding.403 Forbidden— Returned when you do not have write access to the legal entity.404 Not Found— Returned when the custodian auth flow ID or legal entity ID does not exist.
POST /api/v3/legal-entities/67b01234a5bc678d90e12345/custodian-authorities
?custodianAuthFlowId=nordea-20260630 HTTP/1.1
Accept: application/vnd.api+json
Authorization: Bearer <access token>
Host: api.aleta.ai
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json
{
"data": {
"id": "2668e473-b2a2-47a9-a90b-a5ec0c812d44",
"type": "custodian-authority",
"attributes": {
"status": "waiting-for-files",
"pendingFiles": [
"power-of-attorney",
"consent"
],
"linkedDepositories": [],
"linkedAccounts": []
},
"relationships": {
"custodian": {
"data": {
"type": "custodian",
"id": "678e9012f3ab456c78d90123"
}
},
"custodianAuthFlow": {
"data": {
"type": "custodian-auth-flow",
"id": "nordea-20260630"
}
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "67b01234a5bc678d90e12345"
}
}
}
}
}
Retrieve an authority
Get a custodian authority by its id.
Parameters
idpath, requiredCustodian authority identifier (a UUID).
Errors
These errors apply to every /api/v3/custodian-authorities/{id} endpoint on this page.
400 Bad Request— Returned whenidis not a UUID.403 Forbidden— Returned when you do not have access to the authority's legal entity (read access forGET, write access forPOST).404 Not Found— Returned when the custodian authority, or its legal entity, does not exist.
GET /api/v3/custodian-authorities/2668e473-b2a2-47a9-a90b-a5ec0c812d44 HTTP/1.1
Accept: application/vnd.api+json
Authorization: Bearer <access token>
Host: api.aleta.ai
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "2668e473-b2a2-47a9-a90b-a5ec0c812d44",
"type": "custodian-authority",
"attributes": {
"status": "active",
"pendingFiles": [],
"linkedDepositories": [
{
"depositoryNumber": "1234-5678901234",
"depositoryId": "67c01234a5bc678d90e12345",
"status": "active"
}
],
"linkedAccounts": [
{
"accountNumber": "1234-0011223344",
"accountId": "67c01234a5bc678d90e12346",
"status": "active"
}
]
},
"relationships": {
"custodian": {
"data": {
"type": "custodian",
"id": "678e9012f3ab456c78d90123"
}
},
"custodianAuthFlow": {
"data": {
"type": "custodian-auth-flow",
"id": "nordea-20260630"
}
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "67b01234a5bc678d90e12345"
}
}
}
}
}
Upload a file
Upload a file for a custodian authority. The file name is specified via the name query parameter. Supported names are defined by the custodian auth flow (e.g. power-of-attorney, consent, back-office-login).
The returned hash is the SHA-256 of the content, prefixed with sha2-256:.
Once all required files have been uploaded, the custodian authority status transitions from waiting-for-files to waiting-for-consent and pendingFiles becomes empty. Uploading a name that was already uploaded replaces the earlier file of that name.
Parameters
idpath, requiredCustodian authority identifier.
namequery, requiredName of the file (e.g.
power-of-attorney,consent,back-office-login). Must match one of the names defined in the custodian auth flow'sexpectedFiles.
Request body
The request body must be multipart/form-data (with a boundary) containing exactly one file part, e.g. a file field. The part's filename is returned as filename.
Errors
400 Bad Request— Returned whennameis missing, when theContent-Typeis not multipart with a boundary, when the body has no file part or more than one, or whennameis not one of the authority's expected files.
POST /api/v3/custodian-authorities/2668e473-b2a2-47a9-a90b-a5ec0c812d44/files
?name=power-of-attorney HTTP/1.1
Accept: application/vnd.api+json
Authorization: Bearer <access token>
Content-Type: multipart/form-data; boundary=----FormBoundary
Host: api.aleta.ai
------FormBoundary
Content-Disposition: form-data; name="file"; filename="poa_nordea_2026.pdf"
Content-Type: application/pdf
<binary file content>
------FormBoundary--
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json
{
"data": {
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"type": "custodian-authority-file",
"attributes": {
"hash": "sha2-256:7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730",
"name": "power-of-attorney",
"uploadedAt": "2026-03-01T10:00:00.1234560+00:00",
"filename": "poa_nordea_2026.pdf"
}
}
}
List files
List all files uploaded for a custodian authority, including their name, hash, upload timestamp, and original filename, oldest upload first. Files serve as proof of access; there is no endpoint to delete one.
Parameters
idpath, requiredCustodian authority identifier.
GET /api/v3/custodian-authorities/2668e473-b2a2-47a9-a90b-a5ec0c812d44/files HTTP/1.1
Accept: application/vnd.api+json
Authorization: Bearer <access token>
Host: api.aleta.ai
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": [
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"type": "custodian-authority-file",
"attributes": {
"hash": "sha2-256:7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730",
"name": "power-of-attorney",
"uploadedAt": "2026-03-01T10:00:00.1234560+00:00",
"filename": "poa_nordea_2026.pdf"
}
},
{
"id": "f6e5d4c3-b2a1-4f0e-9d8c-7b6a5f4e3d2c",
"type": "custodian-authority-file",
"attributes": {
"hash": "sha2-256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"name": "consent",
"uploadedAt": "2026-03-01T10:01:00.6543210+00:00",
"filename": "consent_nordea_2026.pdf"
}
}
]
}
Submit the consent
Submit the consent details. The custodian authority must be in waiting-for-consent status (i.e. all required files have been uploaded). On success, the status transitions to awaiting-aleta.
Parameters
idpath, requiredCustodian authority identifier.
Request body
The request body must be a JSON:API document whose data object contains the consent details:
legalEntityIdentifierstring, requiredIdentifier of the legal entity (e.g. CVR, CPR).
custodianIdentifierstring, requiredThe
identifierattribute from the custodian object.consentTypestring, requiredType of consent. Possible values (lowercase):
"all","specific".depositoryNumbersarray of strings, optionalList of depository numbers. Must be empty or omitted when
consentTypeis"all". With"specific", at least one depository or account number is required. Entries must not be empty.accountNumbersarray of strings, optionalList of account numbers. Same rules as
depositoryNumbers.
With consent type specific, the numbers are added to linkedDepositories and linkedAccounts with status in-progress and a null ID.
Errors
400 Bad Request— The body is not valid JSON, has nodataobject, a field has the wrong type,legalEntityIdentifierorcustodianIdentifieris empty,consentTypeis notallorspecific, or the numbers do not match the consent type.400 Bad Request— The custodian authority is not inwaiting-for-consentstatus.400 Bad Request— Duplicateallconsent. A consent of typeallis rejected when another custodian authority for the same legal entity and custodian already has a consent of any type.400 Bad Request— Overlappingspecificconsent. For consent typespecific, multiple custodian authorities are allowed per legal entity and custodian combination, but not when one of them has consent typeall, and the depository numbers and account numbers must not overlap with those linked to any of them.
POST /api/v3/custodian-authorities/2668e473-b2a2-47a9-a90b-a5ec0c812d44/consent HTTP/1.1
Authorization: Bearer <access token>
Content-Type: application/vnd.api+json
Host: api.aleta.ai
{
"data": {
"legalEntityIdentifier": "12345678",
"custodianIdentifier": "nordea-dk",
"consentType": "specific",
"depositoryNumbers": ["2345-6789012345", "2345-6789012346"],
"accountNumbers": ["2345-0011223344", "2345-0011223345"]
}
}
HTTP/1.1 204 No Content
HTTP/1.1 400 Bad Request
Content-Type: application/vnd.api+json
{
"errors": [
{
"status": 400,
"detail": "A custodian authority with consent type 'all' already exists for this legal entity and custodian."
}
]
}
Link a depository or account
Link a depository or account to a custodian authority. The link is added to linkedDepositories or linkedAccounts with status in-progress, with resourceNumber as both its number and its ID. The authority's status and consent type do not matter and do not change.
Parameters
idpath, requiredCustodian authority identifier.
typequery, requiredThe type of resource to link. Possible values (lowercase):
"depository","account".resourceNumberquery, requiredThe Aleta ID of the depository or account to link (the
idof the depository or account resource), not the custodian's depository or account number.
Errors
400 Bad Request— Returned whentypeorresourceNumberis missing, whentypeis notdepositoryoraccount, or when the same type and number is already linked to this authority.500 Internal Server Error— Returned whenresourceNumberis not the ID of a depository or account (of thattype) you can read, as in the original API.
POST /api/v3/custodian-authorities/2668e473-b2a2-47a9-a90b-a5ec0c812d44/link
?type=depository
&resourceNumber=6a62c006959a480cd4000001 HTTP/1.1
Authorization: Bearer <access token>
Host: api.aleta.ai
HTTP/1.1 204 No Content
Revoke an authority
Request revocation of a custodian authority. The request takes no body.
Returns the custodian authority's ID and its current status. This call does not change the status, whatever status the authority is in, and repeating it returns the same answer; the original API behaves the same way. Use GET /custodian-authorities/:id to read the status.
Parameters
idpath, requiredCustodian authority identifier.
POST /api/v3/custodian-authorities/2668e473-b2a2-47a9-a90b-a5ec0c812d44/revoke HTTP/1.1
Authorization: Bearer <access token>
Host: api.aleta.ai
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"custodianAuthorityId": "2668e473-b2a2-47a9-a90b-a5ec0c812d44",
"status": "active"
}
}