# Members

In business-to-business (B2B) use cases, members are the users of your business customers and partners (managed as organizations of the tenant).


## Servers

Sandbox environment
```
https://api.sbx.transmitsecurity.io/cis
```

Production environment (US)
```
https://api.transmitsecurity.io/cis
```

Production environment (EU)
```
https://api.eu.transmitsecurity.io/cis
```

Production environment (CA)
```
https://api.ca.transmitsecurity.io/cis
```

Production environment (AU)
```
https://api.au.transmitsecurity.io/cis
```

## Security

### bearer

Type: http
Scheme: bearer
Bearer Format: JWT

### UserAccessToken

A token returned upon end-user authentication, which provides access to resources and data for the user and app for which it was generated

Type: http
Scheme: bearer
Bearer Format: JWT

### AdminAccessToken

A token generated by a management application using the [token endpoint](/openapi/token.openapi/other/getaccesstoken). It provides access to all resources for the tenant and its apps

Type: oauth2

### ClientAccessToken

A token generated by an end-user application using the [token endpoint](/openapi/token.openapi/other/getaccesstoken). It provides access to resources and data on the tenant level or associated with the specific application (but not other apps in the tenant)

Type: oauth2

### OrgAdminAccessToken

A token returned upon B2B authentication for a user that has the organizationAdmin or organizationCreator role.

Type: oauth2

## Download OpenAPI description

[Members](https://developer.transmitsecurity.com/_bundle/openapi/user/members.openapi.yaml)

## Other

### Set member's roles

 - [POST /v1/applications/{app_id}/organizations/{organization_id}/members/{member_id}/roles](https://developer.transmitsecurity.com/openapi/user/members.openapi/other/setroles.md): Update the roles of a member of the organization to control their access to an application. This will replace all the member's roles, if they exist. The roles must first be created for the application and added to a role group for the application, and the role group must be added to the organization. Required permissions: organizations:edit, orgs:edit.

### Get member's roles

 - [GET /v1/members/{member_id}/organizations](https://developer.transmitsecurity.com/openapi/user/members.openapi/other/getmemberorgsbyid.md): Get member's roles in app per organization

### Get member by ID

 - [GET /v1/organizations/{organization_id}/members/{user_id}](https://developer.transmitsecurity.com/openapi/user/members.openapi/other/getmemberbyidinapp.md): Allows an end-user app to search for a member of an organization by their user ID. This should be called from the backend, using a client access token (generated by an end-user app). Required permissions: apps:read, [appId]:read, users:read.

### Update member

 - [PUT /v1/organizations/{organization_id}/members/{user_id}](https://developer.transmitsecurity.com/openapi/user/members.openapi/other/updatemember.md): Update the membership details of the specified user. This should be called from the backend, using an admin access token (generated by a management app). Required permissions: apps:edit, [appId]:edit, users:edit.

### Update member

 - [PATCH /v1/organizations/{organization_id}/members/{user_id}](https://developer.transmitsecurity.com/openapi/user/members.openapi/other/updateorganizationmember.md): Update the member details of the specified user. This should be called from the backend, using an admin access token (generated by a management app). Required permissions: apps:edit, [appId]:edit, users:edit.

### Remove member from application

 - [DELETE /v1/organizations/{organization_id}/members/{user_id}](https://developer.transmitsecurity.com/openapi/user/members.openapi/other/removememberfromapplication.md): Remove a member from an application. Once removed, the member will no longer be associated with the application. This should be called from the backend, using an app access token. Required permissions: apps:edit, [appId]:edit, users:edit.

### Create or assign member

 - [POST /v1/organizations/{organization_id}/members](https://developer.transmitsecurity.com/openapi/user/members.openapi/other/createorassignmember.md): Create a new user in Transmit or assign an existing one as a member to the organization. A user must be created with at least one of the following: email, phone number, or username (used for password authentication). However, an email address is required to federate login using a SAML identity provider. The response contains a user ID that can be used to identify the user/member whenever needed. Required permissions: apps:create, [appId]:create, users:create.

### Get all application's members

 - [GET /v1/organizations/{organization_id}/members](https://developer.transmitsecurity.com/openapi/user/members.openapi/other/getallapplicationmembers.md): Allows an app to get all members of an organization. This should be called from the backend, using a client access token (generated by an end-user app). Required permissions: apps:read, [appId]:read, users:read, apps:list, [appId]:list, users:list.

