Users
Users are the humans who access a client's data — family members, advisors, accountants, external partners. Every user belongs to a client, and read access is granted at the reporting-entity level so a single user can see consolidated views without being given the run of the underlying ledger. Invitations carry their own lifecycle so access can be granted, restricted to a specific identity provider, and revoked with an audit trail.
Data model
User
JSON:API resource type: user.
- Name
- id
- Type
- string
- Description
Stable identifier for the user.
- Name
- firstName
- Type
- string
- Description
Given name. Free-form.
- Name
- lastName
- Type
- string
- Description
Family name. Free-form.
- Name
- contactEmail
- Type
- string
- Description
Email used for invites and notifications. Note that the email a user actually signs in with is determined by their identity provider —
contactEmailis the address Aleta corresponds with.
Relationships
- Name
- readAccessToReportingEntities
- Type
- array of reporting-entity
- Description
The reporting entities this user can read. Updated through PATCH
/api/v2/users/{id}by replacing the relationship array.
Invite
JSON:API resource type: invite. Invites are short-lived handles on a pending login. Once the user completes the identity-provider flow the invite is consumed and they become an active user on the client.
- Name
- id
- Type
- string
- Description
Invite identifier.
- Name
- identityProvider
- Type
- enum
- Description
Optional. Restricts the invite to a single provider — one of
microsoft,google,apple. Omitted when any provider is acceptable.
- Name
- Type
- string
- Description
Optional. Restricts the invite to a single email address — the user must sign in with this address at the identity provider.
- Name
- cancelledAt
- Type
- timestamp | null
- Description
Set when the invite is cancelled before acceptance.
List users on a client
Returns every user with any access to the client, including those who have been invited but haven't yet completed sign-in.
Request
curl https://platform.aleta.io/api/v2/clients/{client_id}/users \
-H "Authorization: Bearer {access_token}"
Retrieve a user
Fetches a single user record, including the readAccessToReportingEntities relationship.
Request
curl https://platform.aleta.io/api/v2/users/{id} \
-H "Authorization: Bearer {access_token}"
Create a user
Creates a user record under the client. Creation does not send an invite by itself — call the invites endpoint afterwards to email the sign-in link. The grant of readAccessToReportingEntities can be set at creation time.
Request
curl -X POST https://platform.aleta.io/api/v2/clients/{client_id}/users \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "user",
"attributes": {
"firstName": "Anna",
"lastName": "Andersen",
"contactEmail": "anna@example.com"
},
"relationships": {
"readAccessToReportingEntities": {
"data": [
{ "type": "reporting-entity", "id": "{reporting_entity_id}" }
]
}
}
}
}'
Update a user
Patches name, contact email, or the readAccessToReportingEntities relationship. Replacing the relationship array fully overrides the previous grant — pass the entire desired set.
Request
curl -X PATCH https://platform.aleta.io/api/v2/users/{id} \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "user",
"id": "{id}",
"attributes": { "contactEmail": "anna.new@example.com" }
}
}'
Delete a user
Removes the user record and revokes their access. Pending invites are invalidated as part of the same call.
Request
curl -X DELETE https://platform.aleta.io/api/v2/users/{id} \
-H "Authorization: Bearer {access_token}"
Send an invite
Creates an invite for the user and triggers delivery of the sign-in email. Pin the invite to a specific identity provider (microsoft, google, apple) and/or email by setting those attributes; omit them to accept any provider/email matching the identity-provider claim.
Request
curl -X POST https://platform.aleta.io/api/v2/users/{user_id}/invites \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "invite",
"attributes": {
"identityProvider": "microsoft",
"email": "anna@example.com"
}
}
}'
List invites
Returns every invite ever issued to the user — pending, accepted, and cancelled. Useful for auditing access history.
Request
curl https://platform.aleta.io/api/v2/users/{user_id}/invites \
-H "Authorization: Bearer {access_token}"
Cancel an invite
Marks the invite as cancelled and invalidates the email link. Idempotent — re-inviting the user creates a fresh record rather than reversing the cancellation.
Request
curl -X POST \
https://platform.aleta.io/api/v2/users/{user_id}/invites/{invite_id}/cancellation \
-H "Authorization: Bearer {access_token}"
Related
- Clients — the scope a user is attached to.
- Reporting entities — the granularity at which read access is granted.