Skip to main content

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:

HeaderValue
Api-KeyIntegration identifier provided by MeetingLawyers
AuthorizationBearer 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:

HeaderValue
Api-KeyIntegration identifier provided by MeetingLawyers
Secret-KeySecurity 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 CodeDescription
400 Bad RequestMalformed request syntax. For example, Api-Key is missing.
401 Authentication failureFor example, Api-Key or Secret-Key are invalid.
403 Authorization failureThe provided credentials don't have permissions to perform the request.
404 Page not foundThe requested resource doesn't exist.
405 Method not allowedFor example, if you are performing a POST on a resource that only allows PUT.
406 Invalid payloadThe JSON request payload was constructed improperly.