Heytelmi API (0.27.0)

Download OpenAPI specification:

Heytelmi bulut santral ve sesli asistan platformunun API'si. İstek ve yanıtlar JSON; zamanlar saat dilimi ofsetiyle ISO 8601. Günlük filtrelerde tz parametresi kullanılır, varsayılan Europe/Istanbul. Numara + ya da 00 ile başlamıyorsa Türkiye numarası sayılır, country_hint ile başka ülke seçilir; numaralar E.164 olarak saklanır.

Başlarken

Heytelmi API'si CRM'inizin, otomasyon aracınızın ya da kendi yazılımınızın santralinize bağlanmasını sağlar: çağrı kayıtlarını okur, süren çağrıları izler, tek istekle arama başlatır (click-to-call) ve olayları webhook ile alırsınız.

Taban adres:

https://api.heytelmi.com/v1

API anahtarı

  1. Panelde Ayarlar > API anahtarları sayfasını açın (sahip ya da yönetici).
  2. Anahtar oluştur deyin, bir ad verin ve yalnızca gereken izinleri seçin.
  3. İsterseniz anahtarı belirli IP adreslerine ya da aralıklara bağlayın (203.0.113.10, 198.51.100.0/24).
  4. Anahtar yalnızca bir kez gösterilir; güvenli bir yere kaydedin. Heytelmi anahtarın kendisini saklamaz.

Anahtarı her istekte Authorization başlığında gönderin:

curl https://api.heytelmi.com/v1/extensions \
  -H "Authorization: Bearer hk_live_..."

İzinler

İzin Ne verir
calls.read Çağrı kayıtları, süren çağrılar, dahili durumları, canlı olay akışı, sesli mesajlar
calls.control Okumaya ek olarak arama başlatma (click-to-call), sesli mesajı dinlendi işaretleme ve silme
pbx.read Dahililer, numaralar, çağrı grupları, mesai, gelen akışlar, anonslar
pbx.manage Okumaya ek olarak bunları ve SIP hatlarını ekleme, değiştirme, silme
webhooks.manage Olay aboneliklerini yönetme, teslimleri yeniden gönderme

Yönetme izni okumayı da kapsar. Her ucun gerektirdiği izin, ucun açıklamasında yazar. Bu dokümanda yer almayan uçlar (ekip üyeleri, SIP parolası, anahtar yönetimi) yalnızca panelden kullanılır.

Anahtarı yenileme ve iptal

  • Yenile: yeni anahtar üretilir, eskisi 24 saat daha çalışır. Bu sürede sisteminizi yeni anahtara geçirin.
  • İptal et: anahtar hemen geçersiz olur. Sızdığından şüphelendiğiniz anahtarı iptal edin.

İstek ve yanıt kuralları

  • İstek ve yanıt gövdeleri JSON'dur (Content-Type: application/json).
  • Zamanlar saat dilimi ofsetiyle ISO 8601 biçimindedir (2026-10-22T14:30:00+03:00).
  • Telefon numaraları E.164 olarak döner (+905321234567). İstekte 0532 123 45 67 gibi yerel yazım da kabul edilir.
  • Kayıt üzerinde çalışan eylemler yolun sonunda iki noktayla yazılır: POST /event-subscriptions/{id}:ping.

Hatalar

Hata yanıtları her zaman aynı biçimdedir:

{
  "problem": {
    "kind": "live_call.invalid",
    "detail": "Arama isteği geçersiz",
    "context": { "fields": { "destination": "geçerli bir telefon numarası" } }
  }
}

kind değeri sabittir; kodunuzu ona göre yazın. detail insan için açıklamadır ve değişebilir. Alan hatalarında context.fields hangi alanın neden reddedildiğini söyler.

Durum kind Anlamı
401 credential.rejected Anahtar geçersiz, iptal edilmiş ya da yenilemeden sonra 24 saati geçmiş
403 credential.scope_missing Anahtarda bu uç için gereken izin yok
403 credential.ip_forbidden İstek anahtarın izin verdiği IP adreslerinden gelmiyor
403 credential.endpoint_forbidden Bu uç yalnızca panelden kullanılır
404 ….not_found Kayıt yok ya da başka bir çalışma alanına ait
429 ….rate_limited Çok sık istek; Retry-After başlığındaki süre kadar bekleyin

Sayfalama

Liste uçları page_size ve page_token parametrelerini alır. Yanıttaki next_page_token bir sonraki sayfanın anahtarıdır; boşsa son sayfadasınız. Toplam kayıt sayısı X-Result-Count başlığındadır.

Tekrar koruması

Arama başlatan isteklerde Idempotency-Key başlığı gönderin (ör. bir UUID ya da CRM'deki düğme tıklamasının kimliği). Bağlantı koptuğu için isteği tekrarlarsanız ikinci bir arama başlamaz, ilk çağrı döner. Aynı anahtar başka bir istek gövdesiyle gelirse 422 request.idempotency_key_reused döner.

Click-to-call

CRM'inizdeki bir düğmeyle arama başlatın: önce temsilcinin dahilisi çalar, temsilci açınca müşteri firmanızın numarasıyla aranır ve ikisi bağlanır. Anahtarda calls.control izni gerekir.

curl -X POST https://api.heytelmi.com/v1/live-calls \
  -H "Authorization: Bearer $HEYTELMI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: crm-4711-btn-1" \
  -d '{
    "mode": "bridge",
    "agent": { "extension": "101" },
    "destination": "0532 123 45 67",
    "metadata": { "crm_contact_id": "4711" }
  }'

Yanıt 202 ve süren çağrıdır; id çağrının kimliğidir ve çağrı bitince GET /call-logs/{id} altında aynı kalır.

Akış ve süreler

  1. Temsilcinin dahilisi 20 saniye çalar. Açmazsa çağrı müşteri aranmadan biter (missed).
  2. Temsilci açınca çalma sesi duyar; müşteri 30 saniye aranır.
  3. Müşteri açınca görüşme başlar. Açmazsa temsilci kısa bir meşgul sesi duyar ve çağrı biter.

Dış arama kuralları temsilci çaldırılmadan önce uygulanır: yurt dışı izni, günlük dış arama dakikası ve eşzamanlı çağrı sınırı. Kurallar izin vermezse çağrı rejected olarak kapanır, nedeni hangup_reason alanındadır.

Sonucu izlemek

  • Webhook: call.initiated, call.connected, call.completed ve call.unanswered olaylarına abone olun. Her olay istekte gönderdiğiniz metadata'yı geri taşır; CRM kaydını onunla eşleştirin.
  • Sorgu: GET /live-calls/{id} süren çağrının durumunu, çağrı bitince GET /call-logs/{id} sonucu ve süreyi verir.

Kurallar

  • metadata en çok 20 metin alanı alır (anahtar 1–40, değer en çok 200 karakter).
  • Aynı Idempotency-Key ile gelen istek yeni arama başlatmaz. Çağrı bitmişse 409 live_call.ended ve context.call_id döner.
  • Görüşme kaydı henüz desteklenmez; record: true gönderirseniz istek reddedilir.

Webhook'lar

Olaylar gerçekleştiği anda adresinize POST edilir. Aboneliği panelde Ayarlar > Webhook'lar sayfasından ya da webhooks.manage izinli bir anahtarla POST /event-subscriptions ile oluşturun. İmza anahtarı (whsec_…) yalnızca oluşturma ve yenilemede bir kez gösterilir.

Olaylar

Olay Ne zaman
call.initiated Çağrı başladı (gelen, giden, dahili ya da click-to-call)
call.connected Görüşme başladı
call.completed Görüşme bitti
call.unanswered Çağrı karşılanmadan bitti (cevapsız, meşgul, reddedildi)
extension.online, extension.offline Dahilinin cihazı bağlandı ya da düştü
voicemail.left Sesli mesaj bırakıldı

Gövde

{
  "event_id": "5c0f6a9e2b1d4e7f8a9b0c1d",
  "event": "call.completed",
  "occurred_at": "2026-10-22T11:42:07Z",
  "data": {
    "call": {
      "id": 170,
      "direction": "outbound",
      "kind": "click_to_call",
      "status": "answered",
      "from_number": "101",
      "to_number": "+905321234567",
      "duration_seconds": 74
    }
  },
  "metadata": { "crm_contact_id": "4711" }
}

data olaya göre call, voicemail ya da extension taşır; alanlar ilgili API uçlarının yanıtlarıyla aynıdır.

İmzayı doğrulamak

Her istek iki başlık taşır:

  • X-Imza: t=1792664527,v1=5d41402a… — v1, HMAC-SHA256(imza_anahtarı, "<t>.<gövde>") değerinin onaltılık yazımıdır.
  • X-Teslim-Id: 812 — teslimin kimliği; tekrar denemelerinde aynı kalır.

Gövdeyi ayrıştırmadan önce, geldiği haliyle doğrulayın. Anahtarı yenilediyseniz 24 saat boyunca başlıkta iki v1 bulunur; biri eşleşmesi yeterlidir. Eski istekleri reddetmek için t ile şimdiki zaman arasındaki farkı da denetleyin (ör. 5 dakika).

Node.js:

import { createHmac, timingSafeEqual } from "node:crypto";

function verify(header, rawBody, secret, toleranceSec = 300) {
  const parts = header.split(",");
  const t = parts.find((p) => p.startsWith("t="))?.slice(2);
  if (!t || Math.abs(Date.now() / 1000 - Number(t)) > toleranceSec) return false;
  const want = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
  return parts
    .filter((p) => p.startsWith("v1="))
    .some((p) => {
      const got = Buffer.from(p.slice(3), "hex");
      return got.length === want.length && timingSafeEqual(got, want);
    });
}

Go:

func verify(header string, body []byte, secret string, tolerance time.Duration) bool {
    var ts string
    var sigs []string
    for _, p := range strings.Split(header, ",") {
        if v, ok := strings.CutPrefix(p, "t="); ok {
            ts = v
        } else if v, ok := strings.CutPrefix(p, "v1="); ok {
            sigs = append(sigs, v)
        }
    }
    sec, err := strconv.ParseInt(ts, 10, 64)
    if err != nil || time.Since(time.Unix(sec, 0)).Abs() > tolerance {
        return false
    }
    m := hmac.New(sha256.New, []byte(secret))
    m.Write([]byte(ts + "."))
    m.Write(body)
    want := m.Sum(nil)
    for _, s := range sigs {
        if got, err := hex.DecodeString(s); err == nil && hmac.Equal(got, want) {
            return true
        }
    }
    return false
}

PHP:

function heytelmi_verify(string $header, string $body, string $secret, int $tolerance = 300): bool {
    $t = null; $sigs = [];
    foreach (explode(',', $header) as $part) {
        if (str_starts_with($part, 't=')) $t = substr($part, 2);
        elseif (str_starts_with($part, 'v1=')) $sigs[] = substr($part, 3);
    }
    if ($t === null || abs(time() - (int) $t) > $tolerance) return false;
    $want = hash_hmac('sha256', $t . '.' . $body, $secret);
    foreach ($sigs as $sig) {
        if (hash_equals($want, $sig)) return true;
    }
    return false;
}

Teslim kuralları

  • Adres https olmalı; iç ağ adreslerine teslim yapılmaz, yönlendirme izlenmez.
  • Alıcı 10 saniye içinde 2xx dönmelidir. Uzun işleri kuyruğa alıp hemen yanıt verin.
  • 2xx dışındaki yanıtlarda 1 dk, 5 dk, 30 dk, 2 sa ve 12 sa sonra tekrar denenir; altıncı denemeden sonra teslim başarısız sayılır.
  • Aynı olay birden fazla gelebilir; event_id ile daha önce işlediğiniz olayı atlayın.
  • Teslim geçmişini GET /event-subscriptions/{id}/attempts ile görün, başarısız teslimi :redeliver ile yeniden gönderin. Adresinizi :ping ile sınayın.

Santral

Santral: dahililer. Dahilinin Asterisk kimliği kiracı önekli (t42_101); SIP parolası hiçbir yanıtta görünmez, yalnızca :issueSecret yeniler ve bir kez döndürür.

Etkin kiracının dahilileri (kısa numaraya göre)

Gerekli izin: pbx.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/extensions" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "max_extensions": 0
}

Dahili ekler; Asterisk'in ps_* satırları aynı işlemde yazılır (yalnızca sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
Request Body schema: application/json
required
short_no
required
string^[1-9][0-9]{1,5}$

2-6 hane, 0 ile başlamaz; kiracı içinde tekil, sonradan değişmez

name
required
string [ 1 .. 80 ] characters
kind
required
string (ExtensionKind)
Enum: "softphone" "ip_phone" "mobile"

softphone: tarayıcı (WebRTC); ip_phone: masaüstü IP telefon; mobile: mobil SIP uygulaması

user_id
integer or null <int64>
registration_enabled
boolean
Default: true

Responses

Request samples

Content type
application/json
{
  • "short_no": "string",
  • "name": "string",
  • "kind": "softphone",
  • "user_id": 0,
  • "registration_enabled": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "short_no": "string",
  • "name": "string",
  • "kind": "softphone",
  • "user_id": 0,
  • "user_name": "string",
  • "registration_enabled": true,
  • "sip_username": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Dahili

Gerekli izin: pbx.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/extensions/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "short_no": "string",
  • "name": "string",
  • "kind": "softphone",
  • "user_id": 0,
  • "user_name": "string",
  • "registration_enabled": true,
  • "sip_username": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Dahiliyi değiştirir (yalnızca sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
name
string [ 1 .. 80 ] characters
kind
string (ExtensionKind)
Enum: "softphone" "ip_phone" "mobile"

softphone: tarayıcı (WebRTC); ip_phone: masaüstü IP telefon; mobile: mobil SIP uygulaması

user_id
integer or null <int64>

null atamayı kaldırır

registration_enabled
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "kind": "softphone",
  • "user_id": 0,
  • "registration_enabled": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "short_no": "string",
  • "name": "string",
  • "kind": "softphone",
  • "user_id": 0,
  • "user_name": "string",
  • "registration_enabled": true,
  • "sip_username": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Dahiliyi ve ps_* satırlarını siler (yalnızca sahip ve yönetici); bir gelen akışta kullanılıyorsa silinmez

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/extensions/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Etkin kiracının SIP hatları (yalnızca sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/trunks" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Hat ekler; Asterisk'in ps_* satırları aynı işlemde yazılır (yalnızca sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 80 ] characters
kind
required
string (TrunkKind)
Enum: "register" "ip"

register: operatöre kullanıcı adı ve parolayla kayıt olan hat; ip: operatörün IP adresinden tanınan hat

host
required
string [ 3 .. 253 ] characters

Operatörün SIP sunucusu (alan adı ya da IP)

port
integer [ 1 .. 65535 ]
Default: 5060
username
string [ 1 .. 80 ] characters
password
string [ 1 .. 128 ] characters
max_channels
integer [ 1 .. 1000 ]
Default: 2

Hattın eşzamanlı çağrı sınırı

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "kind": "register",
  • "host": "string",
  • "port": 5060,
  • "username": "string",
  • "password": "string",
  • "max_channels": 2
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "kind": "register",
  • "host": "string",
  • "port": 0,
  • "username": "string",
  • "max_channels": 0,
  • "sip_endpoint": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Hat

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/trunks/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "kind": "register",
  • "host": "string",
  • "port": 0,
  • "username": "string",
  • "max_channels": 0,
  • "sip_endpoint": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Hattı değiştirir

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
name
string [ 1 .. 80 ] characters
host
string [ 3 .. 253 ] characters

Operatörün SIP sunucusu (alan adı ya da IP)

port
integer [ 1 .. 65535 ]
Default: 5060
username
string [ 1 .. 80 ] characters
password
string [ 1 .. 128 ] characters
max_channels
integer [ 1 .. 1000 ]
Default: 2

Hattın eşzamanlı çağrı sınırı

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "host": "string",
  • "port": 5060,
  • "username": "string",
  • "password": "string",
  • "max_channels": 2
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "kind": "register",
  • "host": "string",
  • "port": 0,
  • "username": "string",
  • "max_channels": 0,
  • "sip_endpoint": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Hattı, numaralarını ve ps_* satırlarını siler

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/trunks/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Etkin kiracının numaraları

Gerekli izin: pbx.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/phone-numbers" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Numara ekler (yalnızca sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
Request Body schema: application/json
required
number
required
string <= 32 characters

+ ya da 00 ile başlamıyorsa Türkiye numarası sayılır; E.164 olarak saklanır

label
string or null <= 80 characters
trunk_id
required
integer <int64>
inbound_target_type
string
Default: "none"
Enum: "none" "extension" "ring_group" "inbound_flow"

Gelen çağrının gideceği yer: none hedef yok, extension dahili, ring_group çağrı grubu, inbound_flow gelen akış. Asistan sonraki sürümlerde eklenir

inbound_extension_id
integer or null <int64>
inbound_ring_group_id
integer or null <int64>

Hedef türü ring_group ise grup

outbound_default
boolean
Default: false

Dahililerin dış aramalarında arayan numara olarak bu numara ve hattı kullanılır. Çalışma alanında en fazla bir numara işaretlidir; biri işaretlenince öteki kalkar. Hiçbiri işaretli değilse ilk eklenen numara kullanılır.

inbound_flow_id
integer or null <int64>

Hedef türü inbound_flow ise akış

Responses

Request samples

Content type
application/json
{
  • "number": "string",
  • "label": "string",
  • "trunk_id": 0,
  • "inbound_target_type": "none",
  • "inbound_extension_id": 0,
  • "inbound_ring_group_id": 0,
  • "outbound_default": false,
  • "inbound_flow_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "number": "string",
  • "label": "string",
  • "trunk_id": 0,
  • "inbound_target_type": "none",
  • "inbound_extension_id": 0,
  • "inbound_ring_group_id": 0,
  • "outbound_default": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "inbound_flow_id": 0
}

Numara

Gerekli izin: pbx.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/phone-numbers/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "number": "string",
  • "label": "string",
  • "trunk_id": 0,
  • "inbound_target_type": "none",
  • "inbound_extension_id": 0,
  • "inbound_ring_group_id": 0,
  • "outbound_default": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "inbound_flow_id": 0
}

Gelen hedefini ve etiketi değiştirir (yalnızca sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
label
string or null <= 80 characters
inbound_target_type
string (InboundTargetType)
Enum: "none" "extension" "ring_group" "inbound_flow"

Gelen çağrının gideceği yer: none hedef yok, extension dahili, ring_group çağrı grubu, inbound_flow gelen akış. Asistan sonraki sürümlerde eklenir

inbound_extension_id
integer or null <int64>
inbound_ring_group_id
integer or null <int64>

Hedef türü ring_group ise grup

outbound_default
boolean

Dahililerin dış aramalarında arayan numara olarak bu numara ve hattı kullanılır. Çalışma alanında en fazla bir numara işaretlidir; biri işaretlenince öteki kalkar. Hiçbiri işaretli değilse ilk eklenen numara kullanılır.

inbound_flow_id
integer or null <int64>

Hedef türü inbound_flow ise akış

Responses

Request samples

Content type
application/json
{
  • "label": "string",
  • "inbound_target_type": "none",
  • "inbound_extension_id": 0,
  • "inbound_ring_group_id": 0,
  • "outbound_default": true,
  • "inbound_flow_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "number": "string",
  • "label": "string",
  • "trunk_id": 0,
  • "inbound_target_type": "none",
  • "inbound_extension_id": 0,
  • "inbound_ring_group_id": 0,
  • "outbound_default": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "inbound_flow_id": 0
}

Numarayı siler (yalnızca sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/phone-numbers/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Kayıt durumu ve son deneme araması (yalnızca sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/trunks/42/health" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "registration": {
    },
  • "last_probe": {
    }
}

Hattan deneme araması başlatır; karşı taraf açınca deneme anonsu çalınır (yalnızca sahip ve yönetici)

Sonuç GET /trunks/{id}/health içindeki last_probe'da görünür. Kiracı başına saatte 10 deneme.

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
destination
required
string <= 32 characters

Aranacak numara; şimdilik yalnızca Türkiye numaraları

Responses

Request samples

Content type
application/json
{
  • "destination": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "destination": "string",
  • "status": "queued",
  • "cause": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "finished_at": "2019-08-24T14:15:22Z"
}

Dış arama kuralları ve sınırlar

Gerekli izin: pbx.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/call-policy" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "allow_international": true,
  • "daily_outbound_minutes": 0,
  • "used_outbound_minutes": 0,
  • "max_concurrent_calls": 0,
  • "active_calls": 0
}

Çağrı grupları

Gerekli izin: pbx.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/ring-groups" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Çağrı grubu ekle (sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
Request Body schema: application/json
required
short_no
required
string^[1-9][0-9]{1,5}$
name
required
string [ 1 .. 80 ] characters
strategy
string
Default: "ring_all"
Enum: "ring_all" "sequential"

ring_all: bütün üyeler aynı anda çalar; sequential: üyeler sırayla, her biri ring_seconds kadar çalar

ring_seconds
integer [ 5 .. 120 ]
Default: 20
members
required
Array of integers <int64> <= 20 items [ items <int64 > ]

Dahili kimlikleri, çaldırma sırasıyla

Responses

Request samples

Content type
application/json
{
  • "short_no": "string",
  • "name": "string",
  • "strategy": "ring_all",
  • "ring_seconds": 20,
  • "members": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "short_no": "string",
  • "name": "string",
  • "strategy": "ring_all",
  • "ring_seconds": 0,
  • "members": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Çağrı grubu

Gerekli izin: pbx.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/ring-groups/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "short_no": "string",
  • "name": "string",
  • "strategy": "ring_all",
  • "ring_seconds": 0,
  • "members": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Çağrı grubunu değiştir (sahip ve yönetici); üyeler verilen listeyle değişir

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
short_no
required
string^[1-9][0-9]{1,5}$
name
required
string [ 1 .. 80 ] characters
strategy
string
Default: "ring_all"
Enum: "ring_all" "sequential"

ring_all: bütün üyeler aynı anda çalar; sequential: üyeler sırayla, her biri ring_seconds kadar çalar

ring_seconds
integer [ 5 .. 120 ]
Default: 20
members
required
Array of integers <int64> <= 20 items [ items <int64 > ]

Dahili kimlikleri, çaldırma sırasıyla

Responses

Request samples

Content type
application/json
{
  • "short_no": "string",
  • "name": "string",
  • "strategy": "ring_all",
  • "ring_seconds": 20,
  • "members": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "short_no": "string",
  • "name": "string",
  • "strategy": "ring_all",
  • "ring_seconds": 0,
  • "members": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Çağrı grubunu sil; onu hedefleyen numaralar hedefsiz kalır, bir gelen akışta kullanılıyorsa silinmez

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/ring-groups/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Mesai çizelgeleri

Gerekli izin: pbx.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/business-hours" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Mesai çizelgesi ekle (sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 80 ] characters
timezone
string
Default: "Europe/Istanbul"
required
Array of objects (BusinessHoursInterval) <= 28 items

Aynı günün aralıkları çakışamaz

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "timezone": "Europe/Istanbul",
  • "intervals": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "timezone": "string",
  • "intervals": [
    ],
  • "open_now": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Mesai çizelgesi

Gerekli izin: pbx.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/business-hours/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "timezone": "string",
  • "intervals": [
    ],
  • "open_now": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Mesai çizelgesini değiştir (sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
name
required
string [ 1 .. 80 ] characters
timezone
string
Default: "Europe/Istanbul"
required
Array of objects (BusinessHoursInterval) <= 28 items

Aynı günün aralıkları çakışamaz

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "timezone": "Europe/Istanbul",
  • "intervals": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "timezone": "string",
  • "intervals": [
    ],
  • "open_now": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Mesai çizelgesini sil

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/business-hours/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Tatiller

Gerekli izin: pbx.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/holidays" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Tatil ekle (sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 80 ] characters
starts_on
required
string <date>
ends_on
required
string <date>
closed_from
string or null^([01][0-9]|2[0-3]):[0-5][0-9]$

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "starts_on": "2019-08-24",
  • "ends_on": "2019-08-24",
  • "closed_from": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "starts_on": "2019-08-24",
  • "ends_on": "2019-08-24",
  • "closed_from": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Tatil

Gerekli izin: pbx.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/holidays/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "starts_on": "2019-08-24",
  • "ends_on": "2019-08-24",
  • "closed_from": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Tatili değiştir (sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
name
required
string [ 1 .. 80 ] characters
starts_on
required
string <date>
ends_on
required
string <date>
closed_from
string or null^([01][0-9]|2[0-3]):[0-5][0-9]$

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "starts_on": "2019-08-24",
  • "ends_on": "2019-08-24",
  • "closed_from": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "starts_on": "2019-08-24",
  • "ends_on": "2019-08-24",
  • "closed_from": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Tatili sil

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/holidays/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Gelen akışlar

Gerekli izin: pbx.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/inbound-flows" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Gelen akış ekle (sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 80 ] characters
required
object (FlowNode)

Gelen akışın bir adımı. hours mesai çizelgesine göre dallanır (tatilde holiday, verilmemişse closed); announcement anonsu çalıp next adımına geçer; menu anonsu çalar ve tuşa göre options dalına gider, tuşlanmazsa ya da geçersiz tuşta retries kez tekrarlar, sonra fallback; diğerleri çağrıyı bitirir: dahili, çağrı grubu ya da kapatma (meşgul). voicemail isteğe bağlı karşılama anonsunu (prompt_id) ve bipi çalıp mesajı extension_id dahilisinin posta kutusuna kaydeder (en çok max_seconds, # ile biter). extension ve ring_group açılmazsa (cevap yok, meşgul, cihaz yok) no_answer verilmişse akış o adımdan sürer. queue arayanı cevaplar, isteğe bağlı karşılama anonsundan sonra bekleme müziği çalar ve ring_group_id grubunu biri açana kadar aralıklarla yeniden çaldırır; max_seconds (varsayılan 300) dolarsa no_answer adımına geçer, yoksa kapatır.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "root": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "root": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Gelen akış

Gerekli izin: pbx.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/inbound-flows/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "root": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Gelen akışı değiştir (sahip ve yönetici)

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
name
required
string [ 1 .. 80 ] characters
required
object (FlowNode)

Gelen akışın bir adımı. hours mesai çizelgesine göre dallanır (tatilde holiday, verilmemişse closed); announcement anonsu çalıp next adımına geçer; menu anonsu çalar ve tuşa göre options dalına gider, tuşlanmazsa ya da geçersiz tuşta retries kez tekrarlar, sonra fallback; diğerleri çağrıyı bitirir: dahili, çağrı grubu ya da kapatma (meşgul). voicemail isteğe bağlı karşılama anonsunu (prompt_id) ve bipi çalıp mesajı extension_id dahilisinin posta kutusuna kaydeder (en çok max_seconds, # ile biter). extension ve ring_group açılmazsa (cevap yok, meşgul, cihaz yok) no_answer verilmişse akış o adımdan sürer. queue arayanı cevaplar, isteğe bağlı karşılama anonsundan sonra bekleme müziği çalar ve ring_group_id grubunu biri açana kadar aralıklarla yeniden çaldırır; max_seconds (varsayılan 300) dolarsa no_answer adımına geçer, yoksa kapatır.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "root": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "root": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Gelen akışı sil; onu hedefleyen numaralar hedefsiz kalır

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/inbound-flows/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Anonslar

Gerekli izin: pbx.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/audio-prompts" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Anons yükle (sahip ve yönetici); WAV ya da MP3, en fazla 10 MB ve 5 dakika. Metinden seslendirme sonraki sürümde

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
required
name
required
string [ 1 .. 80 ] characters
file
required
string <binary>

Responses

Request samples

curl -X POST "https://api.heytelmi.com/v1/audio-prompts" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "duration_ms": 0,
  • "size_bytes": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Anons

Gerekli izin: pbx.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/audio-prompts/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "duration_ms": 0,
  • "size_bytes": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Anonsu sil; bir gelen akışta kullanılıyorsa silinmez

Gerekli izin: pbx.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/audio-prompts/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Anonsun sesi (8 kHz mono WAV)

Gerekli izin: pbx.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/audio-prompts/42/audio" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Sesli mesajlar, yeniden eskiye. Sahip ve yönetici bütün posta kutularını, temsilci yalnızca kendisine atanmış dahililerinkini görür

Gerekli izin: calls.read.

Authorizations:
bearerAuth
query Parameters
extension_id
integer <int64>

Yalnızca bu posta kutusu

limit
integer [ 1 .. 200 ]
Default: 100

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/voicemails" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Sesli mesaj

Gerekli izin: calls.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/voicemails/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "extension": {
    },
  • "call_id": 0,
  • "from_number": "string",
  • "from_name": "string",
  • "duration_ms": 0,
  • "heard": true,
  • "heard_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Dinlendi ya da dinlenmedi olarak işaretle

Gerekli izin: calls.control.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
heard
required
boolean

Responses

Request samples

Content type
application/json
{
  • "heard": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "extension": {
    },
  • "call_id": 0,
  • "from_number": "string",
  • "from_name": "string",
  • "duration_ms": 0,
  • "heard": true,
  • "heard_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Sesli mesajı ve sesini sil

Gerekli izin: calls.control.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/voicemails/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Sesli mesajın sesi (WAV)

Gerekli izin: calls.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/voicemails/42/audio" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Çağrı kayıtları

Biten çağrıların kayıtları (call-logs). Süren çağrılar live-calls altındadır. Kayıtlar çağrı anındaki adları taşır; dahili ya da hat sonradan silinse de kayıt kalır.

Biten çağrılar, yeniden eskiye

Gerekli izin: calls.read.

Authorizations:
bearerAuth
query Parameters
direction
string (CallDirection)
Enum: "inbound" "outbound" "internal"

Yön

status
string (CallStatus)
Enum: "answered" "missed" "busy" "failed" "rejected"

Sonuç

from
string <date>

Bu günden (dahil), tz saat diliminde

to
string <date>

Bu güne kadar (dahil), tz saat diliminde

q
string <= 64 characters

Arayan ya da aranan numarada, dahili kısa numarasında veya arayan adında geçen metin

tz
string
Default: "Europe/Istanbul"

Günlük filtrelerin saat dilimi

page_size
integer [ 1 .. 200 ]
Default: 50

Sayfadaki kayıt sayısı

page_token
string

Önceki yanıttaki next_page_token

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/call-logs" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "next_page_token": "string"
}

Çağrı ve bacakları

Gerekli izin: calls.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/call-logs/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "direction": "inbound",
  • "kind": "pbx",
  • "status": "answered",
  • "from_number": "string",
  • "from_name": "string",
  • "to_number": "string",
  • "extension": {
    },
  • "ring_group": {
    },
  • "trunk": {
    },
  • "phone_number": "string",
  • "ended_by": "caller",
  • "hangup_cause": 0,
  • "hangup_reason": "string",
  • "started_at": "2019-08-24T14:15:22Z",
  • "answered_at": "2019-08-24T14:15:22Z",
  • "ended_at": "2019-08-24T14:15:22Z",
  • "duration_seconds": 0,
  • "metadata": {
    },
  • "campaign_id": 0,
  • "legs": [
    ]
}

Canlı çağrılar

Süren çağrılar, dahililerin anlık durumu ve canlı olay akışı. Durum çağrı kontrol servisinin Asterisk'ten okuduğu bilgidir; olay akışı panelin listeleri yenilemesi içindir.

Süren çağrılar, yeniden eskiye

Gerekli izin: calls.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/live-calls" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Çağrı başlat (click-to-call); aranmayacaklar listesindeki ya da aranmasın işaretli numara `409 live_call.suppressed`

Temsilcinin dahilisi 20 saniye çaldırılır; açınca ona çalma sesi verilir ve müşteri firmanın hattından 30 saniye aranır, açınca ikisi bağlanır. Temsilci açmazsa çağrı missed, kurallar izin vermezse rejected olarak kapanır; sonuç call-logs altında ve olay akışında görünür. Aynı Idempotency-Key aynı istekle tekrar gelirse ilk çağrı döner. Panel oturumunda temsilci yalnızca kendisine bağlı dahiliden arama başlatabilir; sahip, yönetici ve API anahtarı her dahiliden.

Gerekli izin: calls.control.

Authorizations:
bearerAuth
header Parameters
Idempotency-Key
string <= 255 characters

Çağrı başlatan ve kayıt oluşturan POST isteklerinde tekrar koruması

Request Body schema: application/json
required
mode
required
string
Value: "bridge"

bridge: önce temsilcinin dahilisi aranır, açınca müşteri aranır ve ikisi bağlanır. assistant ve direct ilgili bölümlerle gelir

required
object
destination
required
string [ 3 .. 32 ] characters

Aranacak numara (05321234567, +905321234567). Dış arama kuralları uygulanır: yurt dışı izni, günlük dakika, eşzamanlı çağrı sınırı

record
boolean

Görüşme kaydı henüz yok; true gönderilirse istek live_call.recording_unavailable ile reddedilir

object <= 20 properties

Çağrı kaydında saklanan dış sistem bilgileri (anahtar en çok 40 karakter)

Responses

Request samples

Content type
application/json
{
  • "mode": "bridge",
  • "agent": {
    },
  • "destination": "string",
  • "record": true,
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "direction": "inbound",
  • "status": "ringing",
  • "from_number": "string",
  • "from_name": "string",
  • "to_number": "string",
  • "extension": {
    },
  • "ring_group": {
    },
  • "trunk": {
    },
  • "phone_number": "string",
  • "started_at": "2019-08-24T14:15:22Z",
  • "answered_at": "2019-08-24T14:15:22Z",
  • "kind": "pbx",
  • "metadata": {
    }
}

Süren çağrı

Gerekli izin: calls.read.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/live-calls/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "direction": "inbound",
  • "status": "ringing",
  • "from_number": "string",
  • "from_name": "string",
  • "to_number": "string",
  • "extension": {
    },
  • "ring_group": {
    },
  • "trunk": {
    },
  • "phone_number": "string",
  • "started_at": "2019-08-24T14:15:22Z",
  • "answered_at": "2019-08-24T14:15:22Z",
  • "kind": "pbx",
  • "metadata": {
    }
}

Dahililerin anlık durumu

Gerekli izin: calls.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/presence" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Canlı olay akışı (Server-Sent Events)

Etkin kiracının çağrı ve dahili olayları. Her olay event: <ad> ve data: <LiveEvent JSON> satırlarıyla gelir; bağlantıyı açık tutmak için 20 saniyede bir yorum satırı (: ping) gönderilir. Panel olay geldikçe live-calls ve presence listelerini yeniler (K72).

Gerekli izin: calls.read.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/live-events" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Olay abonelikleri

Olay abonelikleri ve teslimler

Olay abonelikleri

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/event-subscriptions" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Abonelik oluştur; imza anahtarı yalnızca bu yanıtta döner

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 80 ] characters
url
required
string <= 2048 characters

https adresi; iç ağ adresleri kabul edilmez

events
required
Array of strings (WebhookEventName) [ 1 .. 32 ] items
Items Enum: "call.initiated" "call.connected" "call.completed" "call.unanswered" "extension.online" "extension.offline" "voicemail.left" "follow_up.created" "booking.created" "booking.changed" "booking.cancelled" "funnel_card.advanced"
enabled
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "url": "string",
  • "events": [
    ],
  • "enabled": true
}

Response samples

Content type
application/json
{
  • "subscription": {
    },
  • "secret": "string"
}

Abonelik

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/event-subscriptions/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "url": "string",
  • "events": [
    ],
  • "enabled": true,
  • "secret_rotation_until": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Aboneliği değiştir

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
Request Body schema: application/json
required
non-empty
name
string [ 1 .. 80 ] characters
url
string <= 2048 characters

https adresi; iç ağ adresleri kabul edilmez

events
Array of strings (WebhookEventName) [ 1 .. 32 ] items
Items Enum: "call.initiated" "call.connected" "call.completed" "call.unanswered" "extension.online" "extension.offline" "voicemail.left" "follow_up.created" "booking.created" "booking.changed" "booking.cancelled" "funnel_card.advanced"
enabled
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "url": "string",
  • "events": [
    ],
  • "enabled": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "url": "string",
  • "events": [
    ],
  • "enabled": true,
  • "secret_rotation_until": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Aboneliği sil; teslim geçmişi de silinir

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X DELETE "https://api.heytelmi.com/v1/event-subscriptions/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "problem": {
    }
}

Deneme olayı gönder; sonuç hemen döner, tekrar denenmez

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X POST "https://api.heytelmi.com/v1/event-subscriptions/42:ping" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "event_id": "string",
  • "event": "string",
  • "status": "pending",
  • "attempts": 0,
  • "next_attempt_at": "2019-08-24T14:15:22Z",
  • "last_attempt_at": "2019-08-24T14:15:22Z",
  • "response_status": 0,
  • "error": "string",
  • "duration_ms": 0,
  • "delivered_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "payload": {
    },
  • "response_body": "string"
}

İmza anahtarını yenile; eski anahtarın imzası 24 saat daha eklenir

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Responses

Request samples

curl -X POST "https://api.heytelmi.com/v1/event-subscriptions/42:rotateSecret" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "subscription": {
    },
  • "secret": "string"
}

Son 100 teslim, yeniden eskiye

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
query Parameters
status
string
Enum: "pending" "succeeded" "failed"

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/event-subscriptions/42/attempts" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Teslim ayrıntısı: gönderilen gövde ve alıcının yanıtı

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
aid
required
integer <int64>

Responses

Request samples

curl -X GET "https://api.heytelmi.com/v1/event-subscriptions/42/attempts/42" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "event_id": "string",
  • "event": "string",
  • "status": "pending",
  • "attempts": 0,
  • "next_attempt_at": "2019-08-24T14:15:22Z",
  • "last_attempt_at": "2019-08-24T14:15:22Z",
  • "response_status": 0,
  • "error": "string",
  • "duration_ms": 0,
  • "delivered_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "payload": {
    },
  • "response_body": "string"
}

Başarısız teslimi bir kez daha gönder

Gerekli izin: webhooks.manage.

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>
aid
required
integer <int64>

Responses

Request samples

curl -X POST "https://api.heytelmi.com/v1/event-subscriptions/42/attempts/42:redeliver" \
  -H "Authorization: Bearer $HEYTELMI_API_KEY"

Response samples

Content type
application/json
{
  • "id": 0,
  • "event_id": "string",
  • "event": "string",
  • "status": "pending",
  • "attempts": 0,
  • "next_attempt_at": "2019-08-24T14:15:22Z",
  • "last_attempt_at": "2019-08-24T14:15:22Z",
  • "response_status": 0,
  • "error": "string",
  • "duration_ms": 0,
  • "delivered_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}