Intercode SaaS Kit
  • Welcome to SaaS Starter Kit
  • Getting Started
    • Technology stack
    • Database Setup
    • Local Environment Setup
  • Basics
    • Dependencies
    • App architecture
    • Deployment
    • App roles
    • Endpoints List
      • Auth
      • Two Factor Auth
      • Businesses
      • Demo
      • Email
      • Export Document
      • Email Files
      • Files Demo
      • Leads
      • Orders
      • Payments
      • Subscriptions
      • Teams
      • Team Memberships
      • User Admin
  • Animation and Styles
    • Framer Motion
    • Ant Design and Styles
  • Pages
    • Auth
      • Working with PassportJS
      • Two-Factor Auth
      • OAuth Providers
    • Leads
    • Businesses
    • Team management
      • Ownership
    • Profile
    • User Settings
      • App Tour
    • App Settings
      • Lead Statuses
    • Dashboard
      • Lead volume widget
      • Doughnut chart widget
      • Recent leads table widget
      • Lead count over period widget
    • Demo
  • Features
    • Impersonation
    • Subscriptions (Stripe)
    • Search
    • Sentry
    • Captcha
    • Audit Logs
    • Internationalization
  • External integrations
    • Mailer
    • Google oAuth2
    • Facebook oAuth2
    • S3 compatible storage (AWS, MinIO)
Powered by GitBook
On this page
  1. Basics
  2. Endpoints List

Team Memberships

PreviousTeamsNextUser Admin

Last updated 6 months ago

GET

PUT

DELETE

Finds the membership of the authenticated user in the current team.

get
Responses
200
Membership found successfully
application/json
400
Membership not found
application/json
403
Access denied
application/json
500
Internal server error
application/json
get
GET /memberships/find-membership HTTP/1.1
Host: 
Accept: */*
{
  "id": 1,
  "firstName": "John",
  "lastName": "Doe",
  "phone": "123-456-7890",
  "role": "Member",
  "isActive": true,
  "invitationAccepted": true
}

Retrieves the memberships of the authenticated user.

get
Responses
200
Memberships retrieved successfully
application/json
400
Invalid parameters
application/json
403
Access denied
application/json
500
Internal server error
application/json
get
GET /memberships/me HTTP/1.1
Host: 
Accept: */*
{
  "count": 5,
  "memberships": [
    {
      "id": 1,
      "firstName": "John",
      "lastName": "Doe",
      "phone": "123-456-7890",
      "role": "Member",
      "isActive": true,
      "invitationAccepted": true
    }
  ]
}
  • GET
  • GETFinds the membership of the authenticated user in the current team.
  • GETRetrieves the memberships of the authenticated user.
  • PUT
  • PUTArchives multiple team memberships.
  • PUTRestores multiple archived team memberships.
  • DELETE
  • DELETEDeletes multiple team memberships.

Archives multiple team memberships.

put
Body
idsnumber[]OptionalExample: [1,2,3]
Responses
200
Memberships archived successfully
application/json
ResponseanyExample: {"message":"Memberships archived successfully","description":"The memberships have been archived successfully."}
400
One or more memberships not found
application/json
403
Access denied
application/json
500
Internal server error
application/json
put
PUT /memberships/archive HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "ids": [
    1,
    2,
    3
  ]
}
{
  "message": "Memberships archived successfully",
  "description": "The memberships have been archived successfully."
}

Restores multiple archived team memberships.

put
Body
idsnumber[]OptionalExample: [1,2,3]
teamRolestringOptionalExample: Member
Responses
200
Memberships restored successfully
application/json
ResponseanyExample: {"message":"Memberships restored successfully","description":"The memberships have been restored successfully."}
400
One or more memberships not found
application/json
403
Access denied
application/json
500
Internal server error
application/json
put
PUT /memberships/restore HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "ids": [
    1,
    2,
    3
  ],
  "teamRole": "Member"
}
{
  "message": "Memberships restored successfully",
  "description": "The memberships have been restored successfully."
}

Deletes multiple team memberships.

delete
Body
idsnumber[]OptionalExample: [1,2,3]
Responses
200
Memberships deleted successfully
application/json
ResponseanyExample: {"message":"Memberships deleted successfully","description":"The memberships have been deleted successfully."}
400
One or more memberships not found
application/json
403
Access denied
application/json
500
Internal server error
application/json
delete
DELETE /memberships HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "ids": [
    1,
    2,
    3
  ]
}
{
  "message": "Memberships deleted successfully",
  "description": "The memberships have been deleted successfully."
}