Chat Messaging
Send messages to your AI assistants and receive responses.
The MyGPTAssistants API allows you to programmatically interact with your AI assistants, manage conversations, and integrate chat functionality into your applications. REST API

All API requests should be made to:
https://api.mygptassistants.com/api/v1const response = await fetch('https://api.mygptassistants.com/api/v1/bot/YOUR_BOT_ID', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', }, body: JSON.stringify({ message: 'Hello, what can you help me with?', sessionId: 'optional-session-id' }),});
const data = await response.json();console.log(data.response);import requests
response = requests.post( 'https://api.mygptassistants.com/api/v1/bot/YOUR_BOT_ID', headers={ 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', }, json={ 'message': 'Hello, what can you help me with?', 'sessionId': 'optional-session-id' })
data = response.json()print(data['response'])curl -X POST 'https://api.mygptassistants.com/api/v1/bot/YOUR_BOT_ID' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"message": "Hello, what can you help me with?", "sessionId": "optional-session-id"}'Chat Messaging
Send messages to your AI assistants and receive responses.
Conversation Management
Create, retrieve, and manage conversation sessions.
Webhook Events
Real-time
Receive notifications for new messages and events.
Contact API
Manage CRM contacts programmatically.
| Endpoint Type | Limit |
|---|---|
| Chat endpoints | 100 requests/minute |
| Data endpoints | 1000 requests/hour |
| Webhook endpoints | 500 requests/minute |
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed |
X-RateLimit-Remaining | Requests remaining |
X-RateLimit-Reset | Unix timestamp when limit resets |
{ "success": true, "data": { "response": "Hello! I can help you with...", "conversationId": "conv_123abc", "messageId": "msg_456def" }, "error": null}{ "success": false, "data": null, "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Too many requests. Please try again later." }}| Code | Description | Solution |
|---|---|---|
RATE_LIMIT_EXCEEDED | Too many requests | Implement backoff, wait and retry |
INVALID_API_KEY | API key invalid | Check key in dashboard |
BOT_NOT_FOUND | Bot ID doesn’t exist | Verify bot ID |
INVALID_REQUEST | Malformed request | Check request body |
INTERNAL_ERROR | Server error | Contact support if persists |
Get your API key
Navigate to Settings → API in your dashboard to generate a key.
Choose your endpoint
Determine which API endpoints you need for your integration.
Make your first request
Use the Quick Start examples above to test the connection.
Set up webhooks
Configure webhooks for real-time event notifications.
Go to production
Replace test keys with production keys when ready.
Official SDKs for popular languages are in development:
JavaScript/TypeScript
NPM package for Node.js and browser.
Python
PyPI package with async support.
PHP
Composer package for Laravel and more.