Skip to content

API & Docs

Build withTalkify API.

A focused guide from your first API key to call outcomes and webhooks.

# Your first API call — speak a line of Bangla down the phone
curl -X POST https://app.talkify.com.bd/api/v1/outbound/call \
  -H "X-API-Key: $TALKIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone": "8801712345678", "text": "আপনার অর্ডারটি পাঠানো হয়েছে।"}'

# Create the key in the dashboard: Developers → API Keys

Built for developers.

  • API key authentication

    Create keys in the dashboard and send one as X-API-Key or a Bearer token. Each key carries its own permission scopes.

  • Swagger / OpenAPI

    An interactive reference for every public endpoint at app.talkify.com.bd/api/docs. Try calls from the browser with your key.

  • Signed webhooks

    Get notified when calls finish or are missed, campaigns start and end, voicemails arrive, and more — each request signed so you can verify it.

  • RESTful JSON API

    Predictable REST endpoints with JSON bodies, readable error messages, and pagination and filters on the call list.

  • Rate limiting

    Requests are rate limited to keep the platform responsive for every workspace.

  • Safe retries

    Send your own externalId with a call. Sending it again returns the original call instead of dialling twice.

Quickstart

Five steps from an API key to a ringing phone. Create your key in the dashboard under Developers → API Keys, paste it in, and run.

The Interactive Calls API is included with Growth, Professional and Enterprise. Keys carry per-permission scopes — outbound:call to place calls, outbound:status to read them back.

1. Authenticate

Create a key under Developers → API Keys in the dashboard. Send it as a header on every request — either form works.

# Either header is accepted
X-API-Key: tk_live_xxxxxxxxxxxxxxxxxxxx
Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxx

# Base URL
https://app.talkify.com.bd/api/v1

2. Place your first call

Speak a line of text to one number. Bangla works as-is — pick a voice and it is read in Bangla.

curl -X POST https://app.talkify.com.bd/api/v1/outbound/call \
  -H "X-API-Key: $TALKIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "8801712345678",
    "text": "আপনার অর্ডারটি পাঠানো হয়েছে। ধন্যবাদ।",
    "externalId": "order-10482"
  }'

3. Personalise it

Send a template with variables and each recipient hears their own version. Add dtmfOptions and the call becomes a one-question survey.

curl -X POST https://app.talkify.com.bd/api/v1/outbound/call \
  -H "X-API-Key: $TALKIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "8801712345678",
    "template": "{{name}}, আপনার বিল {{amount}} টাকা বকেয়া আছে।",
    "variables": { "name": "রহিম", "amount": "১,২৫০" },
    "dtmfOptions": { "1": "এখনই পরিশোধ", "2": "পরে মনে করিয়ে দিন" },
    "webhookUrl": "https://your-app.com/talkify/webhook"
  }'

4. Call a list

Up to a batch per request, each with its own variables. The response returns an id per call.

curl -X POST https://app.talkify.com.bd/api/v1/outbound/bulk \
  -H "X-API-Key: $TALKIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "calls": [
      { "phone": "8801712345678", "text": "প্রথম বার্তা", "externalId": "a-1" },
      { "phone": "8801812345678", "text": "দ্বিতীয় বার্তা", "externalId": "a-2" }
    ]
  }'

5. Check what happened

Poll by id, or filter the list by status and your own externalId. Or skip polling and let the webhook tell you.

# One call
curl https://app.talkify.com.bd/api/v1/outbound/call/CALL_ID \
  -H "X-API-Key: $TALKIFY_API_KEY"

# Everything you sent for one order
curl "https://app.talkify.com.bd/api/v1/outbound/calls?externalId=order-10482" \
  -H "X-API-Key: $TALKIFY_API_KEY"

In your language

No package to install — Node uses the built-in fetch, PHP uses cURL. The webhook example is the one worth reading twice: the signature covers the raw bytes, so parsing the body before verifying it makes every check fail.

Place a call

No dependencies — fetch is built in from Node 18. Reusing an externalId returns the original call instead of dialling twice.

const BASE = 'https://app.talkify.com.bd/api/v1';

async function talkify(path, options = {}) {
  const res = await fetch(BASE + path, {
    ...options,
    headers: {
      'X-API-Key': process.env.TALKIFY_API_KEY,
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

  const body = await res.json();
  if (!res.ok) {
    // A validation failure returns message as an array of strings;
    // an auth failure returns a single string.
    const detail = Array.isArray(body.message) ? body.message.join('; ') : body.message;
    throw new Error(`Talkify ${res.status}: ${detail}`);
  }
  return body;
}

const { data } = await talkify('/outbound/call', {
  method: 'POST',
  body: JSON.stringify({
    phone: '8801712345678',
    text: 'আপনার অর্ডারটি পাঠানো হয়েছে। ধন্যবাদ।',
    externalId: 'order-10482',      // your id — send it again and you get the
    webhookUrl: 'https://your-app.com/talkify/webhook',
  }),                                // same call back, never a second dial
});

console.log(data.callId, data.status);   // '…-…' 'QUEUED'

Check what happened

Poll one call by id, or fetch everything you sent under one of your own ids. Note the list endpoint has no success wrapper.

// One call
const { data: call } = await talkify('/outbound/call/' + callId);
console.log(call.status, call.dtmfPressed, call.duration);

// Everything for one order — this endpoint returns { data, pagination }
const { data: calls, pagination } = await talkify(
  '/outbound/calls?externalId=order-10482'
);
console.log(`${calls.length} of ${pagination.total}`);

Verify a webhook

Sign-and-compare on the RAW body. Parsing the JSON first and re-serialising it changes the bytes and every signature fails.

import express from 'express';
import crypto from 'node:crypto';

const app = express();

// express.raw, not express.json — the signature covers the exact bytes sent.
app.post('/talkify/webhook',
  express.raw({ type: 'application/json' }),
  (req, res) => {
    const expected = 'sha256=' + crypto
      .createHmac('sha256', process.env.TALKIFY_WEBHOOK_SECRET)
      .update(req.body)                       // the Buffer, untouched
      .digest('hex');

    const got = req.get('X-Talkify-Signature') || '';
    // Constant-time: a plain === leaks the answer one byte at a time.
    const ok = got.length === expected.length &&
      crypto.timingSafeEqual(Buffer.from(got), Buffer.from(expected));

    if (!ok) return res.status(401).send('bad signature');

    const event = JSON.parse(req.body.toString());
    console.log(event.externalId, event.status, event.dtmfLabel);

    res.sendStatus(200);   // anything else and Talkify retries: 2s, 4s, 8s
  });

API endpoints

What an API key opens. The full reference, with every field and example, is in your dashboard under Developers.

  • POST/api/v1/outbound/call

    Place one call — play audio, speak text, or hand it to an AI agent

  • POST/api/v1/outbound/bulk

    Place a batch of calls from a JSON list, up to 100 in a request

  • POST/api/v1/outbound/bulk-file

    Place a batch of calls from an uploaded XLSX or CSV, up to 1,000 rows

  • GET/api/v1/outbound/call/:id

    Status, duration and outcome of one call

  • GET/api/v1/outbound/calls

    List calls placed through the API, with filters

  • POST/api/v1/campaigns

    Create a voice broadcast or Dynamic TTS campaign from your own system

  • POST/api/v1/campaigns/:id/recipients

    Add recipients to a campaign, up to 1,000 in a request

  • POST/api/v1/campaigns/:id/start

    Start or resume a campaign; pause and cancel work the same way

  • GET/api/v1/campaigns/:id

    Status and results of a campaign, with its recipients and cost estimate

  • POST/api/v1/click-to-call

    Ring one of your agents, then connect them to the customer

  • POST/api/v1/phone-widget/tickets

    A short-lived ticket for the phone that opens inside your CRM

Webhook events

Subscribe to these events and react to platform activity.

  • call.completed

    A call finished — direction, duration, billsec and outcome

  • call.missed

    An inbound call was not answered

  • campaign.started

    A broadcasting campaign began dialling

  • campaign.completed

    A broadcasting campaign finished

  • voicemail.new

    A voicemail was recorded and stored

  • contact.created

    A contact was added, by hand or by import

  • payment.received

    An invoice was settled

  • subscription.expiring

    A subscription period is about to end

Beyond a single call.

  1. API keys and scopes

    Create a key in the dashboard under Developers and send it as X-API-Key or as a bearer token. A dashboard login token is not accepted. Each key carries only the scopes you tick, a rate limit of 60 requests a minute by default, and an optional expiry.

    • Calls: outbound:call and outbound:status
    • Campaigns: campaign:manage and campaign:status
    • Click-to-call: click_to_call:call and click_to_call:status
  2. Campaigns from your system

    Create a voice broadcast from an audio file, or a Dynamic TTS campaign, then add recipients in batches of up to 1,000. Duplicates and do-not-call numbers are skipped. You can start, pause or cancel the campaign, read each recipient's result, and request a cost estimate against your balance.

    • States: DRAFT, SCHEDULED, RUNNING, PAUSED, COMPLETED, CANCELLED
    • One shared message with variables, or one per recipient
    • Campaign calls placed 09:00 to 21:00, Bangladesh time
  3. Click-to-call

    Your system names an agent, by extension or email, and a customer number. Talkify rings the agent first, then dials the customer and joins the two. A webhook reports the outcome when the call ends, and the recording can be fetched afterwards.

    • Lifecycle: ringing agent, calling customer, connected, ended
    • Your own reference attached to each call
    • Outcomes include answered, agent no answer and customer busy
  4. A phone inside your CRM

    Your server asks Talkify for a short-lived ticket for one agent, valid for ten minutes. The browser loads the embedded phone with that ticket, and your page receives events such as registered, incoming, connected and ended. The API key stays on your server; the browser only receives the ticket.

    • A ticket is tied to one agent and one origin
    • Events: ready, registered, incoming, connected, ended, error
    • A dial command your page can send to the phone

ONE API KEY

Four things your system can do

With one key your software can place a call that speaks a message and takes a key press, run a whole campaign, and connect an agent to a customer. The result returns on a webhook.

  • Place a spoken call and read back the key the customer pressed
  • Create, start, pause and cancel a campaign from your own system
  • Connect an agent to a customer and receive the outcome on a webhook

An API request places a call that reads an order and asks the customer to press 1 to confirm; the key press comes back on a webhook.

A little more clarity.

Which plan includes the API?

Webhooks are on every plan, Free included. API keys and click-to-call start on Starter, at ৳2,500 a month. The Interactive Calls API, which places a spoken call that takes a key press, starts on Growth, at ৳5,000 a month.

How do I verify a webhook?

Each webhook is signed with HMAC-SHA256. Compute the signature over the raw request body with your secret and compare it with the signature header before you parse the JSON. Per-call and account-level webhooks are signed differently, so follow the reference example for the kind you receive.

What happens when I reach the rate limit?

Each key has its own limit: 60 requests a minute by default, set when you create the key. A request above the limit is refused with a rate-limit error, so wait and send it again. The bulk and file endpoints carry many calls in one request.

Are requests idempotent?

A single call is, when you send your own externalId: sending it again returns the original call instead of dialling twice. Creating a campaign is not idempotent, so check your campaign list before you repeat a create request. Adding recipients can be repeated, because duplicates are skipped.

Where is the full reference?

In the dashboard under Developers. It covers every endpoint with its fields, error guidance and examples in cURL, Node.js, Python and PHP. This page is a short guide, so treat the reference as the source for request and response details.

What does a call placed by API cost?

The normal rates, paid from your prepaid call credit: ৳0.45 a minute for an outgoing call and ৳2.29 a minute of text-to-speech. A call that is not answered costs nothing. For a campaign, the estimate request returns the expected cost before you start.