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

Demo

PreviousBusinessesNextEmail

Last updated 6 months ago

GET

POST

PATCH

DELETE

Retrieves all demo accounts.

get
Query parameters
limitnumberOptional

The maximum number of records to return.

Example: 10
offsetnumberOptional

The number of records to skip.

Example: 0
Responses
200
Demo accounts retrieved successfully
application/json
403
Access denied
application/json
get
GET /demo HTTP/1.1
Host: 
Accept: */*
{
  "count": 10,
  "users": [
    {
      "id": 1,
      "email": "user@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "previewLink": "encrypted_preview_link"
    }
  ]
}

Validates a preview link by decrypting the hash.

post
Responses
200
Preview link validated successfully
application/json
ResponsestringExample: user@example.com;password
400
Invalid hash
application/json
post
POST /demo/preview HTTP/1.1
Host: 
Accept: */*
user@example.com;password

Resets a demo account by its ID.

post
Path parameters
idnumberRequired
Responses
200
Demo account reset successfully
application/json
ResponseanyExample: {"message":"Demo account reset successfully","description":"The demo account has been reset successfully."}
400
Invalid account ID
application/json
403
Access denied
application/json
404
Demo account not found
application/json
post
POST /demo/account/reset/{id} HTTP/1.1
Host: 
Accept: */*
{
  "message": "Demo account reset successfully",
  "description": "The demo account has been reset successfully."
}

Deletes a demo account by its ID.

delete
Path parameters
idnumberRequired
Responses
200
Demo account deleted successfully
application/json
ResponseanyExample: {"message":"Demo account deleted successfully","description":"The demo account has been deleted successfully."}
400
Invalid account ID
application/json
403
Access denied
application/json
404
Demo account not found
application/json
delete
DELETE /demo/account/{id} HTTP/1.1
Host: 
Accept: */*
{
  "message": "Demo account deleted successfully",
  "description": "The demo account has been deleted successfully."
}

Deletes a file by its name from the S3 bucket.

delete
Path parameters
fileNamestringRequired
Responses
200
File deleted successfully
application/json
ResponseanyExample: {"message":"File deleted successfully","description":"The file has been deleted successfully."}
404
File not found
application/json
500
Internal server error
application/json
delete
DELETE /action-demo-files/{fileName} HTTP/1.1
Host: 
Accept: */*
{
  "message": "File deleted successfully",
  "description": "The file has been deleted successfully."
}
  • GET
  • GETRetrieves all demo accounts.
  • POST
  • POSTCreates a new demo account.
  • POSTValidates a preview link by decrypting the hash.
  • POSTResets a demo account by its ID.
  • POSTUploads a file to the S3 bucket.
  • PATCH
  • PATCHEdits an existing demo account.
  • DELETE
  • DELETEDeletes a demo account by its ID.
  • DELETEDeletes a file by its name from the S3 bucket.

Creates a new demo account.

post
Body
emailstringOptionalExample: user@example.com
firstNamestringOptionalExample: John
lastNamestringOptionalExample: Doe
passwordstring | nullableOptionalExample: securePassword123
Responses
201
Demo account created successfully
application/json
400
User with such email already registered
application/json
403
Access denied
application/json
post
POST /demo/account HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 95

{
  "email": "user@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "password": "securePassword123"
}
{
  "id": 1,
  "email": "user@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "previewLink": "encrypted_preview_link"
}

Uploads a file to the S3 bucket.

post
Body
filestring ยท binaryOptional
Responses
200
File uploaded successfully
application/json
ResponsestringExample: formatted_file_name.jpg
400
Invalid file
application/json
post
POST /action-demo-files HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
formatted_file_name.jpg

Edits an existing demo account.

patch
Path parameters
idnumberRequired
Body
emailstringRequiredExample: user@example.com
firstNamestringRequiredExample: John
lastNamestringRequiredExample: Doe
passwordstring | nullableRequiredExample: securePassword123
Responses
200
Demo account edited successfully
application/json
400
User with such email already registered
application/json
403
Access denied
application/json
patch
PATCH /demo/account/{id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 95

{
  "email": "user@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "password": "securePassword123"
}
{
  "id": 1,
  "email": "user@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "previewLink": "encrypted_preview_link"
}