Docs · Getting started
Build with AI tools
Coding with Claude Code, Cursor, Copilot or another AI assistant? Give it the right context and it can build a working talks integration for you.
Give your assistant the docs
AI tools write better code when they read the real reference instead of guessing. Every page here has a Copy page for AI button, and the whole API is available in machine-readable form.
Add a project rules file
Put this in CLAUDE.md for Claude Code, .cursor/rules for Cursor, or .github/copilot-instructions.md for Copilot. It teaches the assistant how talks works before it writes a line.
## talks API
- Base URL: https://api.talks.africa/v1
- Auth: header "Authorization: Bearer $TALKS_KEY". Read the key from env, never hard-code it.
- Use tk_test_ keys in development and tests. Never commit tk_live_ keys.
- Phone numbers must be international format: +254712345678.
- Send: POST /v1/sms/send, POST /v1/email/send, POST /v1/whatsapp/send.
- Bulk: POST /v1/sms/send-bulk (10 req/min), not loops of single sends.
- Errors return { error: { type, code, message, param, request_id } }.
Retry only 429 (respect Retry-After) and 5xx with backoff. Never retry other 4xx.
- Delivery results arrive by webhook; do not poll in a tight loop.
- Full reference: https://talks.africa/docs/llms-full.txtPrompts that work
Point it at the reference
Ask the assistant to read the docs first, so it uses real endpoints and fields.
Read https://talks.africa/docs/llms-full.txt, then add a sendOrderSms(order) function that texts the customer when an order ships. Use $TALKS_KEY and handle errors as the docs say.Ask for error handling up front
Name the cases you care about: out of credits, invalid numbers, rate limits.
Handle insufficient_credits by alerting #finance on Slack, invalid_phone_number by flagging the customer record, and rate limits with Retry-After.Test with a test key
Have it write tests that run against a tk_test_ key, so nothing real is sent.
Write integration tests for sendOrderSms using TALKS_TEST_KEY. Assert on status and credits_used in the response.
MCP server
Note: Coming soon: a talks MCP server so assistants like Claude can check balances, look up delivery status and send test messages directly, with your permission.
Stay safe
Warning: Never paste a live API key into an AI chat. Give the assistant a test key or an environment variable name instead, and review generated code before it touches production.