Learn how to use ChatGPT effectively with Tomba API documentation to generate accurate code and get development assistance.
Quick Use
Direct Documentation Reference
Reference our documentation directly in your ChatGPT prompts:
Code
Please review the Tomba API documentation at https://docs.tomba.io/llms.txt and help me create a Python Flask application that integrates email verification into user registration.
Code Generation with Context
Code
Based on the Tomba API documentation (https://docs.tomba.io/llms.txt), generate a complete Node.js Express middleware for email verification that includes:- Rate limiting- Error handling- Response caching- Logging- TypeScript types
Project Setup Strategies
Method 1: Documentation Upload (ChatGPT Plus)
For ChatGPT Plus users with file upload capability:
Using the uploaded Tomba API documentation, create a comprehensive Python client library with async support, rate limiting, and proper error handling.
Method 2: URL Reference Method
For all ChatGPT users:
Code
I'm working with the Tomba API for email verification. The complete API documentation is available at https://docs.tomba.io/llms.txt.Please help me create a React component that:1. Validates email addresses in real-time2. Shows validation results with confidence scores3. Handles API errors gracefully4. Includes TypeScript types5. Uses proper rate limiting
Method 3: Context Building
Build context gradually in your conversation:
Message 1:
Code
I'm building an email verification service using the Tomba API. The API base URL is https://api.tomba.io/v1 and uses X-Tomba-Key and X-Tomba-Secret headers for authentication. I need help creating a robust client library.
Message 2:
Code
The main endpoints I need to integrate are:- Email Verifier: GET /email-verifier?email={email}- Domain Search: GET /domain-search?domain={domain}- Bulk operations for processing multiple emailsCan you help me start with the email verifier endpoint?
Development Workflows
1. API Client Development
Initial Architecture Discussion:
Code
I need to build a production-ready API client for Tomba email verification service. The API documentation is at https://docs.tomba.io/llms.txt.Help me design the architecture for a TypeScript client that needs to:- Handle authentication- Implement rate limiting- Provide retry logic- Cache responses- Support both individual and bulk operations- Include comprehensive error handling- Be easily testableWhat would be the best architectural approach?
Implementation Request:
Code
Based on our architecture discussion and the Tomba API docs, implement the core client class with:1. Constructor that accepts API credentials2. Private method for making authenticated requests3. Error handling for different HTTP status codes4. Rate limiting with exponential backoff5. TypeScript interfaces for all response types6. Logging capabilitiesStart with the basic structure and authentication.
2. Framework Integration
Express.js Integration:
Code
Using the Tomba API (docs at https://docs.tomba.io/llms.txt), help me create an Express.js application with:1. Middleware for email verification2. Route handlers for verification endpoints3. Background job processing for bulk operations4. Error handling middleware5. Request logging6. API documentation with Swagger7. Rate limiting at the application level8. Health check endpointsPlease start with the project structure and basic setup.
React Integration:
Code
I want to integrate Tomba email verification into my React application. Based on the API documentation at https://docs.tomba.io/llms.txt, create:1. Custom React hooks for email operations2. Context provider for API configuration3. Form components with real-time validation4. Loading states and error handling5. TypeScript throughout6. Integration with React Query for cachingBegin with the context provider and basic hook structure.
3. Testing Strategy
Comprehensive Testing Plan:
Code
For my Tomba API integration (docs: https://docs.tomba.io/llms.txt), help me create a comprehensive testing strategy:1. Unit tests for all client methods2. Integration tests with API mocks3. Error scenario testing4. Rate limiting tests5. Performance benchmarks6. End-to-end tests for user flows7. Test data and fixtures8. CI/CD pipeline integrationStart with the testing framework setup and basic unit tests.
Code Generation Examples
1. Complete TypeScript Client
Prompt:
Code
Based on the Tomba API documentation at https://docs.tomba.io/llms.txt, create a complete TypeScript client with:- Full type definitions for all API endpoints- Authentication handling- Request/response interceptors- Automatic retry with exponential backoff- Rate limiting- Caching support- Comprehensive error handling- Logging integration- Configuration options- JSDoc documentationPlease provide the complete implementation with proper TypeScript types.
2. Python Async Client
Prompt:
Code
Using the Tomba API documentation (https://docs.tomba.io/llms.txt), create a Python async client using aiohttp with:- AsyncTombaClient class- Async context manager support- Session management with connection pooling- Rate limiting with asyncio- Retry logic with exponential backoff- Type hints throughout- Error handling for all scenarios- Async generators for bulk operations- Caching with TTL- Logging integrationInclude usage examples and error handling patterns.
3. React Email Verification Form
Prompt:
Code
Based on the Tomba API (docs: https://docs.tomba.io/llms.txt), create a React email verification form component with:- Real-time email validation as user types- Debounced API calls to avoid rate limits- Loading states and progress indicators- Error handling and user feedback- Confidence score display- TypeScript throughout- Accessibility support- Mobile responsive design- Integration with React Hook Form- Unit tests with React Testing LibraryProvide the complete component with all dependencies.
Advanced Use Cases
1. Microservices Architecture
Architecture Planning:
Code
I'm designing a microservices architecture for email validation using Tomba API. Based on the documentation at https://docs.tomba.io/llms.txt, help me plan:Services:- Email verification service- Bulk processing service- API gateway- Cache service (Redis)- Queue service- Monitoring serviceRequirements:- 100k+ requests/day- 99.9% uptime- Auto-scaling- Circuit breaker pattern- Distributed tracing- Comprehensive monitoringProvide service boundaries, communication patterns, and technology recommendations.
2. Performance Optimization
Optimization Analysis:
Code
My Tomba API integration is experiencing performance issues:Metrics:- 800ms average response time- 15% timeout rate- High memory consumption- Frequent rate limit errorsCurrent implementation uses:- Node.js with Express- Basic HTTP client (axios)- No caching- Sequential processingBased on the Tomba API documentation (https://docs.tomba.io/llms.txt), analyze and provide optimizations for:1. Connection pooling2. Request batching3. Caching strategies4. Memory management5. Rate limiting optimization6. Error recoveryInclude code examples for each optimization.
3. Enterprise Integration
Enterprise Solution:
Code
Design an enterprise-grade solution for email verification using Tomba API (docs: https://docs.tomba.io/llms.txt) with:Requirements:- Multi-tenant architecture- SSO integration- Audit logging- Data privacy compliance- High availability- Disaster recovery- API versioning- Monitoring and alerting- Cost optimization- Security hardeningProvide:1. Architecture diagram2. Implementation approach3. Security considerations4. Scalability strategy5. Cost analysis6. Migration plan
Conversation Management
1. Context Preservation
Keep important context in your conversation:
Code
For reference, I'm building an email verification service with these requirements:- Technology: Node.js, TypeScript, Express, Redis- Scale: 50k requests/day- SLA: 99.9% uptime, <500ms response time- API: Tomba (docs: https://docs.tomba.io/llms.txt)[Continue with specific questions]
2. Progressive Development
Build features incrementally:
Code
Phase 1: Basic email verificationPhase 2: Bulk processingPhase 3: Caching and optimizationPhase 4: Monitoring and alertingLet's start with Phase 1. Based on the Tomba API docs, create a basic email verification function.
3. Code Review and Iteration
Code
Here's my current Tomba API client implementation:[Paste code]Based on the Tomba API documentation and best practices, please review this code for:- Security vulnerabilities- Performance issues- Error handling gaps- Type safety improvements- Code maintainabilityProvide specific recommendations with code examples.
Best Practices for ChatGPT
1. Specific and Detailed Prompts
Instead of:
Code
Help me use Tomba API
Use:
Code
Based on the Tomba API documentation at https://docs.tomba.io/llms.txt, create a TypeScript service class for email verification that handles rate limiting, caching with Redis, and provides detailed error messages for a React application.
2. Include Technical Context
Code
Context: React TypeScript application using Next.js 14, Tailwind CSS, and React QueryGoal: Integrate Tomba email verification in user registration formConstraints: Client-side validation, server-side verification, rate limit handlingUsing Tomba API docs (https://docs.tomba.io/llms.txt), implement email verification with these requirements...
3. Request Examples and Tests
Code
Along with the implementation, provide:1. Usage examples2. Unit tests with Jest3. Integration test examples4. Error handling demonstrations5. Performance considerations6. Security best practices
Troubleshooting
Common Issues
Generic Responses: Be more specific about your requirements and technical stack
Outdated Patterns: Always reference the current API documentation URL
Incomplete Code: Ask for complete implementations with error handling
Missing Context: Provide your technical environment and constraints
Optimization Tips
Use Follow-up Questions: "Can you add error handling to the previous code?"
Request Alternatives: "Show me 3 different approaches to implement this"
Ask for Explanations: "Explain why you chose this approach over alternatives"
Request Documentation: "Add JSDoc comments to explain the API usage"