API Documentation

Everything you need to integrate Message Reply into your application

Getting Started

To get started with the Message Reply API, you'll need an API key. You can get one by signing up for an account.

curl -X POST https://api.messagereply.com/v1/chat   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"message": "Hello, world!"}'

Authentication

All API requests must include your API key in the Authorization header.

const response = await fetch('https://api.messagereply.com/v1/chat', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  // ... rest of the request
});

API Endpoints

Create Chat

POST /v1/chat

Create a new chat session and get the initial response.

{
  "message": "Hello, how can I help?",
  "context": {
    "previous_messages": []
  }
}

Send Message

POST /v1/messages

Send a message to an existing chat session.

{
  "chat_id": "chat_123",
  "message": "What's the weather like?",
  "options": {
    "temperature": 0.7
  }
}

Webhooks

Set up webhooks to receive real-time updates about chat events.

app.post('/webhook', (req, res) => {
  const event = req.body;
  
  switch (event.type) {
    case 'message.created':
      // Handle new message
      break;
    case 'chat.ended':
      // Handle chat end
      break;
  }

  res.sendStatus(200);
});

Rate Limits

1000

Requests per minute

10MB

Max request size

100

Concurrent connections