Grant a member access to a company
Scopemembers:writeGrants a MEMBER access to one company, or changes the access_level of an existing
grant. Only the company in the path is touched.
- Scope: the member's other grants are left exactly as they were.
access_level:VIEWorOPERATE.NONEis not accepted here — remove access by deleting the grant.- Eligible members: grants apply only to
MEMBER.OWNERandADMINreach every company implicitly and cannot receive grants.
Keys are prefixed beel_sk_, and each one carries the scopes it was created with: a key
short of the scope an operation needs is answered 403. The scope an operation requires
is shown next to its title, and the full catalogue lives in the Scopes reference.
Keys are created from the BeeL dashboard. They are secret credentials: do not share them or commit them to source control.
In: header
Path Parameters
Your own account, or an account you provisioned. It — not the credential — decides which account the operation acts on; a 403 is returned when you do not reach it, the same response an account that does not exist gets.
uuidMembership unique UUID.
uuidUnique identifier (UUID) of the company within the account.
uuidAccess the member gets over this company.
"VIEW" | "OPERATE"Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://app.beel.es/api/v1/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/members/497f6eca-6276-4993-bfeb-53cbbbba6f08/grants/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "access_level": "OPERATE" }'{
"success": true,
"data": {
"company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf",
"access_level": "VIEW"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "LIVE_CREDENTIAL_REQUIRED",
"message": "This operation changes the real account; it requires a live API key or a dashboard session."
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "GRANT_NOT_FOUND",
"message": "The member holds no grant over that company."
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The provided data is not valid",
"details": {
"field": "specific error message"
}
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
},
"type": "https://docs.beel.es/errors/INVOICE_NO_LINES",
"title": "INVOICE_NO_LINES",
"detail": "The invoice must have at least one line",
"instance": "/v1/invoices/abc-123"
}{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please try again in 60 seconds."
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}{
"success": false,
"error": {
"code": "UNSUPPORTED_MEDIA_TYPE",
"message": "Unsupported media type: text/plain. Supported: application/json"
},
"meta": {
"timestamp": "2025-01-15T10:30:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}Replace a member's company grants PUT
Sets the complete list of companies (NIFs) a `MEMBER` reaches, each with its `access_level`, in one call. The response counts what changed. - **Full replacement:** the body is the member's whole set of grants after the call. A company the member had a grant over and that the body leaves out loses its grant; send `[]` to revoke every grant. - **All or nothing:** either every grant in the body is applied or none is. When a request is rejected, the member's grants stay exactly as they were. - **One grant per company:** each `company_id` appears at most once in `grants`. - **Eligible members:** grants apply only to `MEMBER`. `OWNER` and `ADMIN` reach every company implicitly and cannot receive grants. - **Repeatable:** sending the same body again changes nothing and reports every grant as `unchanged`. - **Single company:** to change one grant without restating the rest, use `PUT /v1/accounts/{account_id}/members/{member_id}/grants/{company_id}`.
Revoke a member's access to a company DELETE
Revokes a `MEMBER`'s access to one company. Their grants over the account's other companies are left as they were.