# Team

Who gets into the empresa in the app, their invitations, roles and permissions, like Ajustes › Miembros and Ajustes › Roles.

The guide, step by step: https://fiscalisto.com/en/docs/api/equipo.md

## Endpoints

- [List members](https://fiscalisto.com/en/docs/api/referencia/equipo/list-members.md): `GET /v1/members`
- [Get a member](https://fiscalisto.com/en/docs/api/referencia/equipo/get-member.md): `GET /v1/members/{id}`
- [Change a member's access](https://fiscalisto.com/en/docs/api/referencia/equipo/update-member.md): `POST /v1/members/{id}`
- [Remove a member](https://fiscalisto.com/en/docs/api/referencia/equipo/delete-member.md): `DELETE /v1/members/{id}`
- [List invitations](https://fiscalisto.com/en/docs/api/referencia/equipo/list-invitations.md): `GET /v1/invitations`
- [Invite someone to the empresa](https://fiscalisto.com/en/docs/api/referencia/equipo/create-invitation.md): `POST /v1/invitations`
- [Cancel an invitation](https://fiscalisto.com/en/docs/api/referencia/equipo/cancel-invitation.md): `DELETE /v1/invitations/{id}`
- [List roles](https://fiscalisto.com/en/docs/api/referencia/equipo/list-roles.md): `GET /v1/roles`
- [Create a role](https://fiscalisto.com/en/docs/api/referencia/equipo/create-role.md): `POST /v1/roles`
- [Change a role](https://fiscalisto.com/en/docs/api/referencia/equipo/update-role.md): `POST /v1/roles/{id}`
- [Delete a role](https://fiscalisto.com/en/docs/api/referencia/equipo/delete-role.md): `DELETE /v1/roles/{id}`
- [List permissions](https://fiscalisto.com/en/docs/api/referencia/equipo/list-permissions.md): `GET /v1/permissions`

## The Member object

A person who signs in to the empresa in the app.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `object` | `"member"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer (iss_…). |
| `name` | string or null | yes | Name. |
| `email` | string | yes | Email to send it to (several separated by commas). Only used if sending is requested. |
| `role` | string | yes | The role (id from GET /v1/roles). |
| `all_permissions` | boolean | yes | true: every permission, including those added later. |
| `permissions_added` | array of string | yes | Permissions on top of the role's. |
| `permissions_removed` | array of string | yes | The role's permissions this person doesn't have. |
| `tax_ids` | array of string or null | yes | Only works with these RFCs of the empresa; null: with all of them. |
| `branches` | array of string or null | yes | Only issues from these branches (brn_…, or "matriz"); null: from all of them. |
| `permissions` | array of string | yes | What they can do in the end: the role's permissions, plus the added ones, minus the removed ones. |
| `two_factor_enabled` | boolean | yes | Whether they sign in with two-step verification. |
| `created_at` | string | yes | When it was created, ISO 8601 with Mexico City time (-06:00). |

Example:

```json
{
  "id": "mem_OufpKqnrvx9p3fT0aW9CxR2YhJ8kLmNqP4",
  "object": "member",
  "livemode": true,
  "issuer": "iss_OufpKqnrvx9p",
  "name": "Laura Méndez",
  "email": "laura@inmobiliariacva.mx",
  "role": "facturista",
  "all_permissions": false,
  "permissions_added": [
    "emitidas:exportar"
  ],
  "permissions_removed": [],
  "tax_ids": null,
  "branches": [
    "matriz",
    "brn_OufpKqnrvx9p3"
  ],
  "permissions": [
    "clientes:ver",
    "emitidas:exportar",
    "emitidas:ver",
    "facturar:timbrar"
  ],
  "two_factor_enabled": true,
  "created_at": "2026-10-02T10:14:00.000Z"
}
```

## The Invitation object

An invitation to the empresa that hasn't been accepted yet.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `object` | `"invitation"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer (iss_…). |
| `email` | string | yes | Email to send it to (several separated by commas). Only used if sending is requested. |
| `role` | string | yes | The role (id from GET /v1/roles). |
| `all_permissions` | boolean | yes | true: every permission, including those added later. |
| `permissions_added` | array of string | yes | Permissions on top of the role's. |
| `permissions_removed` | array of string | yes | The role's permissions this person doesn't have. |
| `tax_ids` | array of string or null | yes | Only works with these RFCs of the empresa; null: with all of them. |
| `branches` | array of string or null | yes | Only issues from these branches (brn_…, or "matriz"); null: from all of them. |
| `status` | `pending`, `canceled` | yes | pending: their link works. canceled: it was canceled. |
| `expires_at` | string | yes | Until when their link works (7 days). |

Example:

```json
{
  "id": "mbi_OufpKqnrvx9p5kE2nT7wQaZ0bY3cXv1dG8",
  "object": "invitation",
  "livemode": true,
  "issuer": "iss_OufpKqnrvx9p",
  "email": "contador@despachoruiz.mx",
  "role": "contador",
  "all_permissions": false,
  "permissions_added": [],
  "permissions_removed": [],
  "tax_ids": null,
  "branches": null,
  "status": "pending",
  "expires_at": "2026-11-21T18:00:00.000Z"
}
```

## The Role object

A role in the empresa: a name and its permissions.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `object` | `"role"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer (iss_…). |
| `name` | string | yes | Name. |
| `description` | string or null | yes | Description. |
| `all_permissions` | boolean | yes | true: the role has every permission, including future ones. |
| `permissions` | array of string | yes | Its permissions (empty with all_permissions). |
| `type` | `owner`, `starter`, `custom` | yes | owner: Propietario. starter: one of Fiscalisto's (can be changed, not deleted). custom: one of the empresa's. |
| `members` | number | yes | How many members have it. |
| `invitations` | number | yes | How many pending invitations grant it. |

Example:

```json
{
  "id": "facturista",
  "object": "role",
  "livemode": true,
  "issuer": "iss_OufpKqnrvx9p",
  "name": "Facturista",
  "description": "Timbra y envía facturas.",
  "all_permissions": false,
  "permissions": [
    "clientes:ver",
    "emitidas:ver",
    "facturar:timbrar"
  ],
  "type": "starter",
  "members": 2,
  "invitations": 0
}
```

## The Permission object

Something a person can do in the empresa.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `object` | `"permission"` | yes | What kind of object it is («invoice», «customer»…). |
| `name` | string | yes | Name. |
| `group` | string | yes | Its group, as in Ajustes › Roles. |
| `sensitive` | boolean | yes | Sensitive (team, credentials, security, plan): granting or removing it is done in the app. |

Example:

```json
{
  "id": "facturar:timbrar",
  "object": "permission",
  "name": "Timbrar",
  "group": "Facturar",
  "sensitive": false
}
```
