Skip to content

API Reference

The MyGPTAssistants API allows you to programmatically interact with your AI assistants, manage conversations, and integrate chat functionality into your applications. REST API

API integration options

All API requests should be made to:

https://api.mygptassistants.com/api/v1
const 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);

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 TypeLimit
Chat endpoints100 requests/minute
Data endpoints1000 requests/hour
Webhook endpoints500 requests/minute
{
"success": true,
"data": {
"response": "Hello! I can help you with...",
"conversationId": "conv_123abc",
"messageId": "msg_456def"
},
"error": null
}
CodeDescriptionSolution
RATE_LIMIT_EXCEEDEDToo many requestsImplement backoff, wait and retry
INVALID_API_KEYAPI key invalidCheck key in dashboard
BOT_NOT_FOUNDBot ID doesn’t existVerify bot ID
INVALID_REQUESTMalformed requestCheck request body
INTERNAL_ERRORServer errorContact support if persists
  1. Get your API key

    Navigate to SettingsAPI in your dashboard to generate a key.

  2. Choose your endpoint

    Determine which API endpoints you need for your integration.

  3. Make your first request

    Use the Quick Start examples above to test the connection.

  4. Set up webhooks

    Configure webhooks for real-time event notifications.

  5. Go to production

    Replace test keys with production keys when ready.

SDKs & Libraries Coming Soon

Section titled “SDKs & Libraries ”

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.