Skip to main content

Entegrasyon Güncelle

Entegrasyon bilgilerini günceller.

Endpoint

PUT /api/v1/integrations/\{uuid\}
PATCH /api/v1/integrations/\{uuid\}

Authentication

Bu endpoint authentication gerektirir.

Header: Authorization: Bearer \{token\}

Permission

  • integrations.manage - Tüm entegrasyonları güncelleme
  • integrations.manage.own - Sadece kendi entegrasyonlarını güncelleme

Request

Headers

HeaderDeğerZorunlu
AuthorizationBearer \{token\}Evet
Content-Typeapplication/jsonEvet

Path Parameters

ParametreTipZorunluAçıklama
uuidstringEvetEntegrasyon UUID'si

Request Body

ParametreTipZorunluAçıklama
namestringHayırEntegrasyon adı
typestringHayırEntegrasyon tipi (webhook, oauth, api)
providerstringHayırSağlayıcı adı
descriptionstringHayırEntegrasyon açıklaması
configobjectHayırYapılandırma ayarları (JSON)
credentialsobjectHayırKimlik bilgileri (JSON, şifrelenmiş saklanır)
statusstringHayırDurum (active, inactive, error, pending)
metadataobjectHayırEk metadata bilgileri (JSON)
is_activebooleanHayırAktif durumu

Example Request

{
"name": "Updated Stripe Webhook",
"status": "active",
"config": {
"webhook_url": "https://api.example.com/webhooks/stripe/v2",
"events": ["payment.succeeded", "payment.failed", "charge.refunded"]
}
}

Response

Success Response (200 OK)

{
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Stripe Webhook",
"status": "active",
"config": {
"webhook_url": "https://api.example.com/webhooks/stripe/v2",
"events": ["payment.succeeded", "payment.failed", "charge.refunded"]
},
"updated_at": "2025-11-20T12:00:00.000000Z"
}

Error Responses

404 Not Found

{
"message": "Not Found"
}

403 Forbidden

{
"message": "Forbidden"
}

Code Examples

cURL

curl -X PATCH https://api.example.com/api/v1/integrations/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Stripe Webhook",
"status": "active"
}'

Notes

  • .own permission'ı olan kullanıcılar sadece kendi entegrasyonlarını güncelleyebilir
  • PUT tüm alanları günceller, PATCH sadece gönderilen alanları günceller
  • credentials alanı güncellenirse şifrelenerek saklanır