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.
Create a new user account and a JWT token.
name required | string non-empty |
phoneNumber required | integer [ 1000000000 .. 9999999999 ] |
password required | string >= 8 characters |
{- "name": "string",
- "phoneNumber": 1234567890,
- "password": "stringst"
}
{- "user": {
- "id": "string",
- "name": "string",
- "phoneNumber": 0
}, - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
Authenticate a user and generate a JWT token.
phoneNumber required | integer [ 1000000000 .. 9999999999 ] |
password required | string >= 8 characters |
{- "phoneNumber": 1234567890,
- "password": "stringst"
}
{- "user": {
- "id": "string",
- "name": "string",
- "phoneNumber": 0
}, - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
Send a message to a user using recipientId
content required | string The message to be sent. |
recipientId required | string The recipient's user ID. |
{- "content": "string",
- "recipientId": "string"
}
{- "message": {
- "id": "string",
- "content": "string",
- "from": "string",
- "to": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
}
Send a message to a user using recipient's Phone Number
content required | string The message to be sent. |
recipientPhoneNumber required | integer The recipient's user ID. |
{- "content": "string",
- "recipientPhoneNumber": 0
}
{- "message": {
- "id": "string",
- "content": "string",
- "from": "string",
- "to": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
}
Retrieve messages of a specific recipient in pages.
page | integer Page number be requested. |
senderId | string The sender's ID. |
recipientId required | string The recipient's ID. |
{- "page": 0,
- "senderId": "string",
- "recipientId": "string"
}
{- "page": 0,
- "lastPage": true,
- "messages": [
- {
- "id": "string",
- "content": "string",
- "from": "string",
- "to": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
]
}
Retrieve a message by its ID.
id required | string The ID of the message to retrieve. |
{- "message": {
- "id": "string",
- "content": "string",
- "from": "string",
- "to": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
}
Update a message by its ID.
id required | string The ID of the message to update. |
content required | string The updated content of the message. |
{- "content": "string"
}
{- "message": {
- "id": "string",
- "content": "string",
- "from": "string",
- "to": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
}