Skip to content

Database APIs ​

Add Member to database ​

http
POST /api/database/:workspaceId/create

Request Body ​

ts
type AddMember = {
  email: string;
  position: string;
  team: string;
};

Response ​

ts
type Response = {
  success: boolean;
  message: string;
};

Get Members ​

http
GET /api/database/:workspaceId

Request Body ​

No Body Required

Response ​

ts
type Response = {
  success: boolean;
  message: string;
  data: Data[];
};

type Data = {
  role_id: string;
  owner: string;
  role: string;
  workspace_id: string;
  position: string;
  team: string;
  timezone: string;
  name: string;
  phone_number: string;
  gender: null;
  country: string;
  status: string;
};

Update Member ​

http
PUT /api/database/:roleId

Request Body ​

ts
type UpdateMember = {
  position?: string;
  team?: string;
  phone_number?: string;
  country?: string;
};

Response ​

ts
type Response = {
  success: boolean;
  message: string;
};

Delete Member ​

http
DELETE /api/database/:roleId

Request Body ​

No Body Required

Response ​

ts
type Response = {
  success: boolean;
  message: string;
};

Import members through excel ​

http
POST /api/database/:workspaceId/import

Request Body ​

Upload a excel file with columns Email, Position, Team

Response ​

ts
type Response = {
  success: boolean;
  message: string;
};

Export members as PDF or Excel ​

http
GET /api/database/:workspaceId/export

Request Body ​

No body required

Response ​

Downloads a file