Skip to main content

Quickstart

Get started with the TimelinesAI API in just a few steps.

Prerequisites

A TimelinesAI account with at least one connected WhatsApp number
Basic familiarity with REST APIs

Step 1: Get your API token

1

Log in to TimelinesAI

Go to app.timelines.ai and sign in to your account.
2

Navigate to API settings

Click IntegrationsPublic API in the left sidebar.
3

Copy your token

Click Copy to copy your API token. Keep this secure—it provides full access to your workspace.
Never share your API token publicly or commit it to version control. Use environment variables in production.

Step 2: Test your connection

Verify your token works by listing your WhatsApp accounts:
curl -X GET "https://app.timelines.ai/integrations/api/whatsapp_accounts" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
You should see a response like:
{
  "status": "ok",
  "data": [
    {
      "id": "14155551234@s.whatsapp.net",
      "phone": "+14155551234",
      "name": "Business WhatsApp",
      "connected": true
    }
  ]
}

Step 3: Send your first message

Now send a message to a phone number:
curl -X POST "https://app.timelines.ai/integrations/api/messages" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+14155559999",
    "text": "Hello from TimelinesAI API! 🎉"
  }'
Replace +14155559999 with a real phone number. The recipient must have WhatsApp installed.
Success response:
{
  "status": "ok",
  "data": {
    "message_uid": "a5bbb005-37f2-402c-96fa-e479a2e09b02"
  }
}
Messages are queued and sent asynchronously. Use the message_uid to track delivery status.

Step 4: Check message status

Track your message delivery:
curl -X GET "https://app.timelines.ai/integrations/api/messages/a5bbb005-37f2-402c-96fa-e479a2e09b02/status_history" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Next steps