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.

talks.africa/docs/llms.txtA short index of the docs, written for AI tools
talks.africa/docs/llms-full.txtEvery guide and endpoint in one plain-text file
talks.africa/docs/openapi.jsonThe full OpenAPI 3.1 spec, for code generation and typed clients
Copy page for AIPaste the page you are on straight into a chat

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.

CLAUDE.md
## 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.txt

Prompts that work

  1. 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.
  2. 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.
  3. 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.

Was this page helpful?
Powered by StdioX Labs