// WAFIXER.COM API DOKÜMANI

WaFixer API referansı

Bu doküman WaFixer.com servisinin kullanıcı API'leri içindir. Entegrasyon istekleri tek servis adresi olan https://wafixer.com üzerinden yapılır.

49
endpoint
3
auth tipi
26
proxy path

Panel session

WaFixer panelinde oturum açmış kullanıcı için çalışır. Örnek: GET /api/instances.

API key

Panelden oluşturulan wfx_... anahtar harici sistemlerde kullanılır.

Embed token

Müşteriye sınırlı ve süreli chat/embed erişimi verir. Token sadece izin verilen instance'larda çalışır.

Kimlik doğrulama

Auth
API key ile mesaj gönderme
curl -X POST "https://wafixer.com/api/wafixer/message/sendText/INSTANCE" \
  -H "apikey: wfx_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"number":"905551112233","text":"Merhaba"}'
Embed token durumu
curl "https://wafixer.com/api/embed/status" \
  -H "x-embed-token: EMBED_JWT"

Panel ve hesap API

16 endpoint

WaFixer panel oturumu ile çalışan hesap, instance, dosya, abonelik ve takım endpointleri.

GET/api/plansPublic

Aktif paketleri listeler.

Response
  • { plans: Plan[] }
POST/api/auth/registerPublic

Yeni panel kullanıcısı oluşturur ve 15 günlük deneme aboneliği başlatır.

Body
  • email: string
  • password: string (min 6)
  • name?: string
Response
  • { ok, verificationEmailSent, user, trial }
GET/api/auth/verify-email?token={token}Public

E-posta doğrulama tokenini doğrular ve /signin sayfasına yönlendirir.

Query
  • token: string
GET/api/instancesSession

Kullanıcının sahip olduğu instance kayıtlarını listeler.

Response
  • Instance[]
  • Not: Admin kullanıcı tüm instance kayıtlarını görebilir; normal kullanıcı sadece kendi ownerEmail kayıtlarını görür.
PATCH/api/instances/{id}Session

Instance grup bilgisini günceller.

Body
  • groupId?: string | null
Response
  • { instance }
DELETE/api/instances/{id}Session

Instance kaydını veya seçili instance verilerini siler.

Body
  • scope?: "instance" | "data"
  • includes?: { messages?, contacts?, chats?, labels?, integrations?, media? }
Response
  • { ok, scope, summary? }
GET/api/analytics?range=7dSession

Mesaj serisi, toplamlar ve en aktif instance listesi döndürür.

Query
  • range?: "24h" | "7d" | "30d" | "90d"
Response
  • { range, granularity, series, totals, topInstances }
GET/api/filesSession

Kullanıcının instance mesajlarından çıkarılan medya dosyalarını listeler.

Query
  • type?: "all" | "image" | "video" | "audio" | "document"
  • q?: string
  • instanceId?: string
  • limit?: 1..500
Response
  • { items, counts }
GET/api/files/{id}/raw?download=1Session

Medya dosyasını binary olarak döndürür.

Query
  • download?: "1"
  • Not: id değeri /api/files içindeki item id alanıdır. message:{messageId} formatı desteklenir.
GET/api/preferencesSession

Bildirim tercihlerini döndürür.

Response
  • { notifyBrowser, notifySound, notifyUnreadDigest }
PATCH/api/preferencesSession

Bildirim tercihlerini günceller.

Body
  • notifyBrowser?: boolean
  • notifySound?: boolean
  • notifyUnreadDigest?: boolean
GET/api/subscriptionsSession

Kullanıcının aboneliklerini, ödemelerini ve özet bilgisini listeler.

Response
  • { subscriptions, payments, summary }
POST/api/subscriptionsSession

Aktif paketlerden yeni abonelik kaydı oluşturur.

Body
  • items: { planId: string; channels: number }[]
  • billingPeriod: "monthly" | "yearly"
Response
  • { ok, created, subscriptions }
  • Not: Paket adı ve fiyat clienttan alınmaz; sunucuda aktif paket ve katalog fiyatından hesaplanır.
GET/api/me/quotaSession

Kanal kotası ve kullanım bilgisini döndürür.

GET/api/me/trialSession

Deneme/aktif abonelik, kalan gün ve kullanılan instance bilgisini döndürür.

GET/api/teamSession

Normal kullanıcı için kendi profilini, admin için tüm takım üyelerini listeler.

Response
  • { members, counts, currentUserEmail, canInvite }

Kullanıcı yönetimi

19 endpoint

API key, embed token, grup, şablon ve kampanya kayıtlarını yönetmek için kullanılır.

GET/api/me/apikeySession

Kullanıcıya ait API anahtarlarını listeler. Plain key tekrar gösterilmez.

Response
  • { keys }
POST/api/me/apikeySession

Yeni API anahtarı oluşturur.

Body
  • name: string
  • scope?: "global" | "instance"
  • instanceId?: string | null
Response
  • { key, plain }
  • Not: plain sadece oluşturma cevabında gösterilir. instance scope yeni instance oluşturamaz.
DELETE/api/me/apikey/{id}Session

API anahtarini revoke eder.

Response
  • { ok, alreadyRevoked? }
GET/api/me/embed-tokenSession

Embed token kayıtlarını listeler.

Response
  • { tokens }
POST/api/me/embed-tokenSession

Müşteriye özel embed token ve embed URL oluşturur.

Body
  • customerLabel: string
  • instanceIds: string[]
  • ttlMinutes?: number (30 dakika - 30 gun)
  • permissions?: "read" | "read_write"
Response
  • { token, embedUrl, tokenId, customerLabel, instanceIds, permissions, expiresAt }
DELETE/api/me/embed-token/{id}Session

Embed tokeni revoke eder.

GET/api/embed/status?token={token}Embed token

Embed token durumunu, izinleri ve izinli instance listesini döndürür.

Query
  • token?: string
Response
  • { customerLabel, permissions, instances }
  • Not: Token query yerine x-embed-token header ile de gönderilebilir.
GET/api/me/instance-groupSession

Instance gruplarını listeler.

Response
  • { groups }
POST/api/me/instance-groupSession

Yeni instance grubu oluşturur.

Body
  • name: string (1-80)
  • color?: "grape" | "peach" | "wagreen" | "sky" | "rose" | "cream"
PATCH/api/me/instance-group/{id}Session

Instance grubunu günceller.

Body
  • name?: string
  • color?: string
DELETE/api/me/instance-group/{id}Session

Instance grubunu siler; gruptaki instance kayıtları grupsuz kalır.

GET/api/me/templateSession

Kullanıcı mesaj şablonlarını listeler. Boş ise varsayılan şablonları seed eder.

Response
  • { templates }
POST/api/me/templateSession

Yeni panel mesaj şablonu oluşturur.

Body
  • title: string (1-120)
  • body: string
  • category?: string (max 60)
  • shortcut?: string (max 40)
PATCH/api/me/template/{id}Session

Panel mesaj şablonunu günceller.

Body
  • title?: string
  • body?: string
  • category?: string
  • shortcut?: string
DELETE/api/me/template/{id}Session

Panel mesaj şablonunu siler.

GET/api/me/campaignSession

Toplu kampanyaları listeler.

Response
  • { campaigns }
POST/api/me/campaignSession

Toplu mesaj kampanyası oluşturur ve arka planda başlatır.

Body
  • name: string (1-120)
  • instanceId: string
  • body: string
  • delayMs?: number (500-60000)
  • recipients: { phone: string; name?: string; vars?: Record<string,string> }[] (max 5000)
Response
  • { campaign }
  • Not: Kampanya kullanımı paket yetkisine ve sohbet limitine tabidir.
GET/api/me/campaign/{id}Session

Tek kampanya detayını döndürür.

Response
  • { campaign }
DELETE/api/me/campaign/{id}Session

Kampanya queued/running ise iptal eder, bitmiş ise siler.

Response
  • { ok, action }

WhatsApp proxy API

14 endpoint

WaFixer.com üzerindeki WhatsApp instance kayıtlarına API key veya panel session ile erişim sağlar.

GET/api/wafixer/instance/fetchInstancesAPI key / Session

Instance listesini getirir. Normal kullanıcı için sonuç kendi instance kayıtlarıyla filtrelenir.

POST/api/wafixer/instance/createAPI key / Session

Yeni WhatsApp instance oluşturur.

Body
  • instanceName: string
  • integration?: "WHATSAPP-BAILEYS" | "WHATSAPP-BUSINESS" | "WAFIXER"
  • qrcode?: boolean
  • number?: string
  • token?: string
  • Not: Global API key gerekir. Instance scope key ve embed token ile create yasaktır.
GET/api/wafixer/instance/connectionState/{instanceName}API key / Session

Instance bağlantı durumunu döndürür.

POST/api/wafixer/message/sendText/{instanceName}API key / Session

Metin mesajı gönderir.

Body
  • number: string
  • text: string
  • delay?: number
  • linkPreview?: boolean
  • mentioned?: string[]
POST/api/wafixer/message/sendMedia/{instanceName}API key / Session

Resim, video, doküman veya audio medya mesajı gönderir.

Body
  • number: string
  • mediatype: "image" | "video" | "document" | "audio"
  • media: string
  • mimetype?: string
  • caption?: string
  • fileName?: string
  • delay?: number
POST/api/wafixer/message/sendTemplate/{instanceName}API key / Session

Meta template mesajı gönderir.

Body
  • number: string
  • name: string
  • language: string
  • components?: unknown[]
POST/api/wafixer/chat/findChats/{instanceName}API key / Session

Sohbetleri sorgular.

Body
  • where?: Record<string, unknown>
  • limit?: number
  • page?: number
POST/api/wafixer/chat/findMessages/{instanceName}API key / Session

Mesajları sorgular.

Body
  • where?: Record<string, unknown>
  • limit?: number
  • page?: number
POST/api/wafixer/chat/markMessageAsRead/{instanceName}API key / Session

Mesajları okundu olarak işaretler.

Body
  • readMessages: { id: string; fromMe: boolean; remoteJid: string }[]
POST/api/wafixer/chat/getBase64FromMediaMessage/{instanceName}API key / Session

Medya mesajından base64 içerik alır.

Body
  • message: { key: { id: string; remoteJid: string; fromMe: boolean } }
  • convertToMp4?: boolean
GET/api/wafixer/webhook/find/{instanceName}API key / Session

Instance webhook ayarlarını döndürür.

POST/api/wafixer/webhook/set/{instanceName}API key / Session

Instance webhook ayarlarını günceller.

Body
  • url: string
  • enabled: boolean
  • webhookByEvents?: boolean
  • webhookBase64?: boolean
  • events?: string[]
GET/api/wafixer/settings/find/{instanceName}API key / Session

Instance ayarlarını döndürür.

POST/api/wafixer/settings/set/{instanceName}API key / Session

Instance ayarlarını günceller.

Body
  • rejectCall?
  • msgCall?
  • groupsIgnore?
  • alwaysOnline?
  • readMessages?
  • readStatus?
  • syncFullHistory?
  • historySyncDays?

Diğer desteklenen proxy pathleri

Proxy

Bu pathler https://wafixer.com/api/wafixer/{path}/{instanceName}formatıyla kullanılır. Yetki kontrolü WaFixer hesabı, paket, API key scope ve embed izinlerine göre yapılır.

message/sendWhatsAppAudio/{instanceName}message/sendSticker/{instanceName}message/sendLocation/{instanceName}message/sendContact/{instanceName}message/sendReaction/{instanceName}message/sendPoll/{instanceName}message/sendList/{instanceName}message/sendButtons/{instanceName}chat/findContacts/{instanceName}chat/fetchProfile/{instanceName}chat/fetchProfilePictureUrl/{instanceName}chat/whatsappNumbers/{instanceName}chat/sendPresence/{instanceName}group/create/{instanceName}group/fetchAllGroups/{instanceName}group/findGroupInfos/{instanceName}group/participants/{instanceName}group/updateParticipant/{instanceName}label/findLabels/{instanceName}label/handleLabel/{instanceName}proxy/find/{instanceName}proxy/set/{instanceName}template/find/{instanceName}template/create/{instanceName}template/edit/{instanceName}template/delete/{instanceName}

Standart hata cevapları

Errors
400

Geçersiz body veya parametre

401

Oturum, API key veya token yok/geçersiz

403

Kullanıcı bu kayıt veya path için yetkili değil

404

Kayıt bulunamadı

409

WhatsApp numarası zaten kullanımda

402

Instance aboneliği aktif değil

500

Sunucu hatası

502

WhatsApp servisine/proxy upstream'e ulaşılamadı