Sub-accounts
Sub-accounts are user accounts that you associate with one or more of your legal entities. A sub-account can read the documents (sent and received invoices) of the legal entities it is associated with, without sharing your main account credentials.
Features
- Sub-account creation: Associating an email with a legal entity creates the sub-account user in A-Cube if it does not exist yet.
- Document visibility: A sub-account only sees invoices of the legal entities it is associated with.
- Multi-entity association: Associate the same sub-account with several legal entities to extend its visibility.
- Association management: Add or remove associations at any time. Removing an association revokes access immediately.
- Read-only access: Sub-accounts cannot create or manage legal entities, sub-accounts or invoices. This is reserved for the main account holder.
All endpoints are listed in the API reference.
Associate a sub-account with a legal entity
Assuming you already have a legal entity with ID 123e4567-e89b-12d3-a456-426614174000 and want to associate the email foo@bar.com with it, use the following endpoint:
POST /legal-entities/123e4567-e89b-12d3-a456-426614174000/sub-accounts
Authorization: Bearer <your-token>
Content-Type: application/json
{
"email": "foo@bar.com",
"password": "Your-Secure-Password1!"
}
The response has status 201 Created and contains the association:
{
"uuid": "0196b5a8-3c1e-7d2a-9f10-1a2b3c4d5e6f",
"email": "foo@bar.com",
"createdAt": "2026-11-25T10:00:00+00:00",
"updatedAt": "2026-11-25T10:00:00+00:00"
}
Password
- New user: If no A-Cube user with this email exists yet, the password is required. It must be at least 10 characters long and contain an upper case letter, a lower case letter, a number and one of
!@#$%^&*. - Existing user: If the email already belongs to a sub-account of your account, you can omit the password. It is ignored if provided, and the user keeps the current password.
Access documents as a sub-account
Obtain a JWT token for the sub-account with the standard authentication endpoint, as described in the authentication section.
With this token, the sub-account sees only the invoices of its associated legal entities when calling the invoice collection and item endpoints.
List the sub-accounts of a legal entity
Use the list endpoint. It supports pagination with page and itemsPerPage:
GET /legal-entities/123e4567-e89b-12d3-a456-426614174000/sub-accounts?page=1&itemsPerPage=30
Authorization: Bearer <your-token>
Remove an association
To remove the association between the sub-account and the legal entity, use the delete endpoint with the email of the sub-account:
DELETE /legal-entities/123e4567-e89b-12d3-a456-426614174000/sub-accounts/foo%40bar.com
Authorization: Bearer <your-token>
The response has status 204 No Content. From now on, the sub-account can no longer access the documents of this legal entity. Associations with other legal entities are not affected, and the sub-account user itself remains in A-Cube.
When you delete a legal entity, all its sub-account associations are removed as well.
Errors
| Status | When |
|---|---|
403 Forbidden | Your account is not allowed to manage sub-accounts, or the legal entity does not exist or does not belong to your account. |
404 Not Found | DELETE: the email is not associated with the legal entity. |
409 Conflict | The email is already registered in A-Cube for another account, or the same association was created concurrently. |
422 Unprocessable Entity | Invalid input, for example an invalid email, a password that does not match the policy, or a missing password for a new user. The violations list names the affected field. |
Important notes
- Sub-accounts can only be associated with existing legal entities of your account.
- An email that already belongs to another A-Cube account cannot be used; the request is refused with
409 Conflict. - Sub-accounts cannot create or manage legal entities; this is reserved for the main account holder.