legoshichat (1.0.0)

Download OpenAPI specification:Download

Welcome to the legoshichat API, the official interface for the legoshichat. Unlock seamless integration and access the unique features of legoshichat through this official API.

auth

Create a new user account

Create a new user account and a JWT token.

Request Body schema: application/json
required
name
required
string non-empty
phoneNumber
required
integer [ 1000000000 .. 9999999999 ]
password
required
string >= 8 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "phoneNumber": 1234567890,
  • "password": "stringst"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

User Login

Authenticate a user and generate a JWT token.

Request Body schema: application/json
required
phoneNumber
required
integer [ 1000000000 .. 9999999999 ]
password
required
string >= 8 characters

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": 1234567890,
  • "password": "stringst"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

message

Send Message by Recipient ID

Send a message to a user using recipientId

Authorizations:
bearerAuth
Request Body schema: application/json
required
content
required
string

The message to be sent.

recipientId
required
string

The recipient's user ID.

Responses

Request samples

Content type
application/json
{
  • "content": "string",
  • "recipientId": "string"
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

Send Message by Phone Number

Send a message to a user using recipient's Phone Number

Authorizations:
bearerAuth
Request Body schema: application/json
required
content
required
string

The message to be sent.

recipientPhoneNumber
required
integer

The recipient's user ID.

Responses

Request samples

Content type
application/json
{
  • "content": "string",
  • "recipientPhoneNumber": 0
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

Get Messages by Recipient ID

Retrieve messages of a specific recipient in pages.

Authorizations:
bearerAuth
Request Body schema: application/json
required
page
integer

Page number be requested.

senderId
string

The sender's ID.

recipientId
required
string

The recipient's ID.

Responses

Request samples

Content type
application/json
{
  • "page": 0,
  • "senderId": "string",
  • "recipientId": "string"
}

Response samples

Content type
application/json
{
  • "page": 0,
  • "lastPage": true,
  • "messages": [
    ]
}

Get Message by ID

Retrieve a message by its ID.

Authorizations:
bearerAuth
path Parameters
id
required
string

The ID of the message to retrieve.

Responses

Response samples

Content type
application/json
{
  • "message": {
    }
}

Delete Message by ID

Delete a message by its ID.

Authorizations:
bearerAuth
path Parameters
id
required
string

The ID of the message to delete.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Update Message by ID

Update a message by its ID.

Authorizations:
bearerAuth
path Parameters
id
required
string

The ID of the message to update.

Request Body schema: application/json
required
content
required
string

The updated content of the message.

Responses

Request samples

Content type
application/json
{
  • "content": "string"
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

friends

Retrieve Friends of User

Retrieve a list of friends of authorized in pages.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "friends": [
    ]
}