API & Geliştirici

Rıza kayıtlarını
kendi sisteminize bağlayın.

Veribenim API ile ziyaretçi izinlerini, veri taleplerini ve temel raporları kendi panelinize ya da iş akışınıza aktarabilirsiniz.

Hızlı Başlangıç

01

Token alın

Hesabınızı oluşturduktan sonra siteye özel erişim bilgilerini panelden alın.

02

API'ye bağlanın

İstekler JSON döner; kimlik doğrulama tek header üzerinden yapılır.

03

Webhook ekleyin

Önemli olaylar olduğunda kendi sistemlerinize otomatik bildirim gönderin.

Authentication
# Giriş — Bearer Token al
curl -X POST https://live.veribenim.com/api/auth/console \
  -H "Content-Type: application/json" \
  -d '{"email":"siz@domain.com","password":"****"}'

# Yanıt
{
  "token": "1|abc123...",
  "user": { "id": 1, "name": "Ad Soyad" }
}

# Sonraki isteklerde token'ı header'a ekleyin
curl https://live.veribenim.com/api/environments \
  -H "Authorization: Bearer 1|abc123..."

Endpoint Referansı

Tüm endpoint'ler https://live.veribenim.com

POST/api/impressions/{token} PUBLIC
POST/api/consents/{token}/log PUBLIC
GET/api/preferences/{token} PUBLIC
POST/api/preferences/{token} PUBLIC
POST/api/dsar/{token} PUBLIC
POST/api/form-consents/{token} PUBLIC
POST/api/v/{token}/e PUBLIC
POST/api/v/{token}/ce PUBLIC
GET/api/public/vendors/{token} PUBLIC
GET/api/public/verify/{domain} PUBLIC
POST/api/public/cookie-scan PUBLIC
GET/api/environments AUTH
GET/api/cookies/{token}/analytics AUTH
GET/api/cookies/{token}/compliance-score AUTH
GET/api/cookies/{token}/ropa-export AUTH
POST/api/cookies/{token}/generate-bundle AUTH
GET/api/cookies/{token}/dsar AUTH
GET/api/cookies/{token}/breaches AUTH
GET/POST/api/cookies/{token}/webhooks AUTH

Webhook Entegrasyonu

Her webhook isteği X-Veribenim-Signature

Desteklenen Olaylar

consent.accept_all

Tüm çerezler kabul edildi

consent.reject_all

Tüm çerezler reddedildi

consent.save_preferences

Kategori bazlı tercih kaydedildi

dsar.created

Yeni veri hakkı talebi

dsar.resolved

DSAR talebi yanıtlandı

breach.created

Veri ihlali kaydedildi

breach.reported

İhlal otoriteye bildirildi

Payload Örneği
{
  "event": "consent.accept_all",
  "environment": "abc123...",
  "timestamp": "2026-03-28T10:00:00Z",
  "data": {
    "session_id": "uuid-here",
    "ip_masked": "192.168.***.*",
    "categories": {
      "analytics": true,
      "marketing": true,
      "functional": true
    }
  }
}
İmza Doğrulama (Node.js)
const crypto = require('crypto');

function verifySignature(rawBody, secret, signature) {
  const expected = 'sha256=' +
    crypto.createHmac('sha256', secret)
          .update(rawBody)
          .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
}

app.post('/webhook', express.raw({type: 'application/json'}), (req, res) => {
  const sig = req.headers['x-veribenim-signature'];
  if (!verifySignature(req.body, process.env.VBN_SECRET, sig)) {
    return res.status(401).send('Unauthorized');
  }
  const { event, data } = JSON.parse(req.body);
  // İşle
  res.sendStatus(200);
});

Token ile erişim

Oturum çerezi kullanmadan Bearer Token ile istek atabilirsiniz.

JSON yanıtlar

Yanıtlar standart {status, data, message} formatında döner.

CORS Açık

JS bundle endpoint'leri herhangi bir origin'den erişilebilir.