# Workspace and team API

Manage dimmi workspace settings, teammates, invitations, teams, custom roles, permissions, SSO domains, and API tokens via the dimmi REST API.

## Invitations

- `GET /invitations` - List invitations: Lists the workspace's invitations, newest first. Only pending ones unless filter[status] asks. Returns a page of invitations with email, role, status, expiry and send count, and next_cursor.
- `POST /invitations` - Invite people: Emails up to 50 people an invitation to join the workspace as admin or member. Each address gets its own answer; inviting someone already invited sends them a fresh link instead. Use only when the person asked, with the addresses they gave. Returns one result per address: created, resent, reactivation, already_member or invalid.
- `POST /invitations/{invitation}/deliveries` - Resend an invitation: Emails a pending invitation again with a fresh link, which stops the old one working and restarts its expiry. Allowed a few times a day per invitation. Returns when it was sent, and the invitation.
- `DELETE /invitations/{invitation}` - Withdraw an invitation: Withdraws a pending invitation, so its link stops working. The person can be invited again. Returns nothing.

## Members

- `GET /members` - List teammates: Lists the people in the workspace, by name by default, with role, status, availability, conversation access and custom role. Use it to find a teammate's id (mem_...) before assigning or mentioning them. Returns a page of members, and next_cursor for more.
- `GET /members/{member}` - Get a teammate: Reads one member of the workspace. Pass me for your own membership. Returns the member with role, status, availability, conversation access and custom role.
- `PATCH /members/{member}` - Change a teammate: Changes one member's role (admin or member), deactivates or reactivates them, gives or takes away a custom role, or sets what conversations they see and their availability. A custom role is a change of its own: send it without role or status. Returns the member as they now are.
- `PATCH /members` - Change several teammates: Gives up to 100 members the same role (admin or member) or custom role, such as moving everyone off a custom role before it is deleted. Each member is changed on its own by the same rules as PATCH /members/{member}. Returns one result per member: updated, skipped or failed with the reason, and the counts.

## Permissions

- `GET /permissions` - List permissions: Lists every permission a role is made of, with its name and what it allows, in the reader's language, and whether a custom role may hold it. Returns the permissions with key, group, label, description, assignable and the base roles it fits.

## Roles

- `GET /roles` - List roles: Lists the built-in roles (owner, admin, member), then the workspace's custom roles by name. A custom role narrows the admin or member role it is based on. Returns the roles with their base role, permissions and, for custom roles, id and member count.
- `GET /roles/{role}` - Get a custom role: Reads one custom role. Built-in roles have no id; read them with GET /roles. Returns the role with its base role, permissions and member count.

## Teams

- `GET /teams` - List teams: Lists the workspace's teams by name. Teams group teammates and can hold conversations. Returns a page of teams with their member counts, and next_cursor for more.
- `POST /teams` - Create a team: Creates a team. Two teams cannot share a name, whatever the letter case. Returns the new team.
- `POST /teams/{team}/members` - Add teammates to a team: Puts up to 100 members in a team. They are told they joined, and teammates whose access follows their teams start seeing its conversations. Deactivated members are skipped. Returns one result per id, in order: added, already_member, inactive or not_found.
- `GET /teams/{team}` - Get a team: Reads one team. Returns the team with its member count.
- `PATCH /teams/{team}` - Rename a team: Renames a team. Two teams cannot share a name, whatever the letter case. Returns the team as it now is.
- `DELETE /teams/{team}` - Delete a team: Deletes a team. Its conversations, open, snoozed and closed, move to the team or teammate named, or are left without a team when neither is. Ask the person where they should go first. Returns nothing.
- `DELETE /teams/{team}/members/{member}` - Remove a teammate from a team: Takes one member out of a team. Their access to the team's conversations may end with it. Returns nothing.

## Workspace

- `GET /workspace` - Get the workspace: Reads the workspace this connection works in: its name, address, time zone and main settings. Every tool acts inside this one workspace. Returns the workspace.
- `GET /workspace/entitlements` - Get the API limits: Reads how many API requests a minute this workspace may make; zero means no limit. Returns the workspace's request limits.
- `GET /workspace/access-policy` - Get the sign-in rules: Reads how people may sign in to the workspace: allowed sign-in methods and Google domains, session limits, IP allowlists for the dashboard and the API, two-factor and single sign-on. Returns the rules, the caller's own IP and how many tokens are used from outside the API allowlist.
- `PATCH /workspace` - Change workspace settings: Changes the workspace's name, address (slug), language, time zone, the name customers see, composer options, link checks and how long data is kept. Only the fields sent change. A new slug keeps the old address pointing here for thirty days. Returns the workspace as it now is.
- `PUT /workspace/logo` - Upload the workspace logo: Replaces the workspace's logo with an uploaded image. It needs a file sent as a multipart form in the field named logo, and the settings:write permission. Returns the workspace with its new logo.
- `DELETE /workspace/logo` - Remove the workspace logo: Takes the workspace logo down, so customers see the workspace without one. Removing it twice is fine. Returns nothing.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
