Introduction
The Chat API allows integrating MeetingLawyers' chat into an existing chat engine. JSON is used to encode all data transfer in both directions, so that everything sent to and everything received from the API is encoded in JSON.
Endpoints authentication
All requests must be authenticated using the following headers:
| Header | Value |
|---|---|
Api-Key | Integration identifier provided by MeetingLawyers |
Authorization | Bearer token in JWT format retrieved from User authenticate |
Webhook authentication
This API also includes a webhook with two events: message_created and message_updated. These server-to-server calls are secured in the same way as User API:
| Header | Value |
|---|---|
Api-Key | Integration identifier provided by MeetingLawyers |
Secret-Key | Security key provided by MeetingLawyers to securize server-to-server communications |
HTTP Error Codes
All the API methods (GET, POST, PUT, and DELETE) might fail with an error in the 400 range, which usually means that either the resource is not available (for example, trying to update a user that was previously deleted), or a mistake was made in the URL.
| HTTP Code | Description |
|---|---|
400 Bad Request | Malformed request syntax. For example, Api-Key is missing. |
401 Authentication failure | For example, Api-Key or Secret-Key are invalid. |
403 Authorization failure | The provided credentials don't have permissions to perform the request. |
404 Page not found | The requested resource doesn't exist. |
405 Method not allowed | For example, if you are performing a POST on a resource that only allows PUT. |
406 Invalid payload | The JSON request payload was constructed improperly. |