{
 "openapi": "3.1.0",
 "info": {
  "title": "SocialRoute API",
  "version": "1",
  "description": "Kendi yazılımınızı platforma bağlamak için özel API anahtarıyla çağrılabilen uçlar. Anahtar bir firmaya aittir ve üye yetkisiyle çalışır.",
  "x-description-en": "The endpoints your own software can call with a private API key. A key belongs to one organization and works with member permissions."
 },
 "servers": [
  {
   "url": "https://socialroute.tr"
  }
 ],
 "tags": [
  {
   "name": "Müşteriler",
   "description": "Rehberdeki müşteri kartları. Bir telefon numarasının tek kartı olur; arayan herkes kendiliğinden eklenir.",
   "x-name-en": "Contacts",
   "x-description-en": "Customer profiles in your contacts. A phone number has one profile; everyone who calls is added automatically."
  },
  {
   "name": "Ticketlar",
   "description": "Müşterinin istediği ve kimin ilgilendiği. Değiştirirken okuduğunuz revision değerini gönderin.",
   "x-name-en": "Tickets",
   "x-description-en": "What a customer asked for and who is handling it. Send the revision you read when you change one."
  },
  {
   "name": "Görüşmeler",
   "description": "Asistanın görüşmeleri, giden aramalar ve süren görüşmeye müdahale.",
   "x-name-en": "Calls",
   "x-description-en": "The assistant's calls, outbound calls and acting on a call in progress."
  },
  {
   "name": "Santral",
   "description": "Dahililerin aramaları, anlık durumu, raporları ve departmanlar.",
   "x-name-en": "Switchboard",
   "x-description-en": "Extension calls, live status, reports and departments."
  },
  {
   "name": "Arama kuralları",
   "description": "Mesai, tatil, kara liste ve aktarma ayarları (yalnız okuma; kaydetmek panelden yapılır).",
   "x-name-en": "Call rules",
   "x-description-en": "Working hours, holidays, block list and transfer settings (read only; saving is done in the dashboard)."
  },
  {
   "name": "Ödemeler",
   "description": "Ödeme bağlantıları. Tutarlar kuruş cinsindendir.",
   "x-name-en": "Payments",
   "x-description-en": "Payment links. Amounts are in minor units (1/100 of a lira)."
  },
  {
   "name": "Doğrulama kodu",
   "description": "Kendi uygulamanıza girişte ya da bir işlemi onaylatırken SMS veya WhatsApp ile kod.",
   "x-name-en": "Verification codes",
   "x-description-en": "A code by SMS or WhatsApp for signing in to your own app or confirming an action."
  },
  {
   "name": "Bilgi tabanı ve araçlar",
   "description": "Bilgi tabanına dosya yükleme, asistanı dışa aktarma ve araçların geçmişi.",
   "x-name-en": "Knowledge base and tools",
   "x-description-en": "Uploading files to a knowledge base, exporting an assistant and tool history."
  }
 ],
 "paths": {
  "/api/contacts": {
   "get": {
    "operationId": "list_contacts_api_contacts_get",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Q"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 100,
       "title": "Limit"
      }
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 0,
       "title": "Offset"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Kartları listele ve ara",
    "x-summary-en": "List and search profiles",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/contacts?q=Elif\" \\\n  -H \"Authorization: Bearer sa_...\""
   },
   "post": {
    "operationId": "create_contact_api_contacts_post",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ContactSave"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Kart aç",
    "x-summary-en": "Create a profile",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "number": "0532 111 22 33",
     "name": "Elif Yıldız",
     "company": "Yıldız Turizm",
     "email": "elif@ornek.com",
     "code": "M-1001",
     "tags": [
      "vip"
     ]
    },
    "x-ornek-en": {
     "number": "0532 111 22 33",
     "name": "Elif Kaya",
     "company": "Kaya Travel",
     "email": "elif@example.com",
     "code": "M-1001",
     "tags": [
      "vip"
     ]
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/contacts\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"number\": \"0532 111 22 33\", \"name\": \"Elif Yıldız\", \"company\": \"Yıldız Turizm\", \"email\": \"elif@ornek.com\", \"code\": \"M-1001\", \"tags\": [\"vip\"]}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/contacts\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"number\": \"0532 111 22 33\", \"name\": \"Elif Kaya\", \"company\": \"Kaya Travel\", \"email\": \"elif@example.com\", \"code\": \"M-1001\", \"tags\": [\"vip\"]}'"
   }
  },
  "/api/contacts/by-number/{number}": {
   "get": {
    "operationId": "card_by_number_api_contacts_by_number__number__get",
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "title": "Number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Numaradan kartı bul",
    "x-summary-en": "Find a profile by phone number",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/contacts/by-number/<number>\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/contacts/{contact_id}": {
   "get": {
    "operationId": "contact_card_api_contacts__contact_id__get",
    "parameters": [
     {
      "name": "contact_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Contact Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Kartı ve altındakileri oku",
    "x-summary-en": "Read a profile and its history",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/contacts/<contact_id>\" \\\n  -H \"Authorization: Bearer sa_...\""
   },
   "put": {
    "operationId": "update_contact_api_contacts__contact_id__put",
    "parameters": [
     {
      "name": "contact_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Contact Id"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ContactSave"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Kartı değiştir",
    "x-summary-en": "Update a profile",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "number": "0532 111 22 33",
     "name": "Elif Yıldız",
     "company": "Yıldız Turizm",
     "email": "elif@ornek.com",
     "code": "M-1001",
     "tags": [
      "vip",
      "vize"
     ]
    },
    "x-ornek-en": {
     "number": "0532 111 22 33",
     "name": "Elif Kaya",
     "company": "Kaya Travel",
     "email": "elif@example.com",
     "code": "M-1001",
     "tags": [
      "vip",
      "visa"
     ]
    },
    "x-curl": "curl -X PUT \"https://socialroute.tr/api/contacts/<contact_id>\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"number\": \"0532 111 22 33\", \"name\": \"Elif Yıldız\", \"company\": \"Yıldız Turizm\", \"email\": \"elif@ornek.com\", \"code\": \"M-1001\", \"tags\": [\"vip\", \"vize\"]}'",
    "x-curl-en": "curl -X PUT \"https://socialroute.tr/api/contacts/<contact_id>\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"number\": \"0532 111 22 33\", \"name\": \"Elif Kaya\", \"company\": \"Kaya Travel\", \"email\": \"elif@example.com\", \"code\": \"M-1001\", \"tags\": [\"vip\", \"visa\"]}'"
   }
  },
  "/api/contacts/{contact_id}/notes": {
   "post": {
    "operationId": "add_note_api_contacts__contact_id__notes_post",
    "parameters": [
     {
      "name": "contact_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Contact Id"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ContactNoteCreate"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Karta not ekle",
    "x-summary-en": "Add a note to a profile",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "text": "Cuma günü geri aranacak."
    },
    "x-ornek-en": {
     "text": "Call back on Friday."
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/contacts/<contact_id>/notes\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Cuma günü geri aranacak.\"}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/contacts/<contact_id>/notes\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Call back on Friday.\"}'"
   }
  },
  "/api/contacts/{contact_id}/notes/{note_id}": {
   "delete": {
    "operationId": "delete_note_api_contacts__contact_id__notes__note_id__delete",
    "parameters": [
     {
      "name": "contact_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Contact Id"
      }
     },
     {
      "name": "note_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Note Id"
      }
     }
    ],
    "responses": {
     "204": {
      "description": "Successful Response"
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Notu sil",
    "x-summary-en": "Delete a note",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl -X DELETE \"https://socialroute.tr/api/contacts/<contact_id>/notes/<note_id>\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/contacts/{contact_id}/kimlikler": {
   "post": {
    "operationId": "add_identity_api_contacts__contact_id__kimlikler_post",
    "parameters": [
     {
      "name": "contact_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Contact Id"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/KisiKimlikEkle"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Karta başka numara ya da e-posta ekle",
    "x-summary-en": "Add another number or email to a profile",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "tur": "telefon",
     "deger": "0533 444 55 66"
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/contacts/<contact_id>/kimlikler\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"tur\": \"telefon\", \"deger\": \"0533 444 55 66\"}'"
   }
  },
  "/api/contacts/{contact_id}/kimlikler/{kimlik_id}": {
   "delete": {
    "operationId": "remove_identity_api_contacts__contact_id__kimlikler__kimlik_id__delete",
    "parameters": [
     {
      "name": "contact_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Contact Id"
      }
     },
     {
      "name": "kimlik_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Kimlik Id"
      }
     }
    ],
    "responses": {
     "204": {
      "description": "Successful Response"
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Müşteriler"
    ],
    "summary": "Karttan numarayı ya da e-postayı kaldır",
    "x-summary-en": "Remove a number or email from a profile",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl -X DELETE \"https://socialroute.tr/api/contacts/<contact_id>/kimlikler/<kimlik_id>\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/tickets": {
   "get": {
    "operationId": "list_tickets_api_tickets_get",
    "parameters": [
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Status"
      }
     },
     {
      "name": "assignee",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Assignee"
      }
     },
     {
      "name": "contact_id",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string",
         "format": "uuid"
        },
        {
         "type": "null"
        }
       ],
       "title": "Contact Id"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Q"
      }
     },
     {
      "name": "late",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean",
       "default": false,
       "title": "Late"
      }
     },
     {
      "name": "source",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Source"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 100,
       "title": "Limit"
      }
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 0,
       "title": "Offset"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ticketlar"
    ],
    "summary": "Ticketları listele",
    "x-summary-en": "List tickets",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/tickets?status=open&late=true\" \\\n  -H \"Authorization: Bearer sa_...\""
   },
   "post": {
    "operationId": "create_ticket_api_tickets_post",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/TicketCreate"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ticketlar"
    ],
    "summary": "Ticket aç",
    "x-summary-en": "Open a ticket",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "title": "Pasaport teslimi",
     "description": "Cuma günü ofisten alacak.",
     "priority": "high",
     "customer_number": "0532 111 22 33",
     "tags": [
      "vize"
     ],
     "due_at": "2026-11-20T09:00:00Z"
    },
    "x-ornek-en": {
     "title": "Passport pickup",
     "description": "Will collect it from the office on Friday.",
     "priority": "high",
     "customer_number": "0532 111 22 33",
     "tags": [
      "visa"
     ],
     "due_at": "2026-11-20T09:00:00Z"
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/tickets\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Pasaport teslimi\", \"description\": \"Cuma günü ofisten alacak.\", \"priority\": \"high\", \"customer_number\": \"0532 111 22 33\", \"tags\": [\"vize\"], \"due_at\": \"2026-11-20T09:00:00Z\"}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/tickets\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Passport pickup\", \"description\": \"Will collect it from the office on Friday.\", \"priority\": \"high\", \"customer_number\": \"0532 111 22 33\", \"tags\": [\"visa\"], \"due_at\": \"2026-11-20T09:00:00Z\"}'"
   }
  },
  "/api/tickets/report": {
   "get": {
    "operationId": "ticket_report_api_tickets_report_get",
    "parameters": [
     {
      "name": "days",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 30,
       "title": "Days"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ticketlar"
    ],
    "summary": "Ticket özeti",
    "x-summary-en": "Ticket summary",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/tickets/report?days=30\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/tickets/{ticket_id}": {
   "get": {
    "operationId": "get_ticket_api_tickets__ticket_id__get",
    "parameters": [
     {
      "name": "ticket_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Ticket Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ticketlar"
    ],
    "summary": "Ticketı oku",
    "x-summary-en": "Read a ticket",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/tickets/<ticket_id>\" \\\n  -H \"Authorization: Bearer sa_...\""
   },
   "put": {
    "operationId": "update_ticket_api_tickets__ticket_id__put",
    "parameters": [
     {
      "name": "ticket_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Ticket Id"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/TicketUpdate"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ticketlar"
    ],
    "summary": "Ticketı değiştir",
    "x-summary-en": "Update a ticket",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "title": "Pasaport teslimi",
     "description": "Cuma günü ofisten aldı.",
     "priority": "normal",
     "customer_number": "0532 111 22 33",
     "assignee_user_id": null,
     "tags": [
      "vize"
     ],
     "due_at": null,
     "status": "solved",
     "revision": 3
    },
    "x-ornek-en": {
     "title": "Passport pickup",
     "description": "Collected it from the office on Friday.",
     "priority": "normal",
     "customer_number": "0532 111 22 33",
     "assignee_user_id": null,
     "tags": [
      "visa"
     ],
     "due_at": null,
     "status": "solved",
     "revision": 3
    },
    "x-curl": "curl -X PUT \"https://socialroute.tr/api/tickets/<ticket_id>\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Pasaport teslimi\", \"description\": \"Cuma günü ofisten aldı.\", \"priority\": \"normal\", \"customer_number\": \"0532 111 22 33\", \"assignee_user_id\": null, \"tags\": [\"vize\"], \"due_at\": null, \"status\": \"solved\", \"revision\": 3}'",
    "x-curl-en": "curl -X PUT \"https://socialroute.tr/api/tickets/<ticket_id>\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Passport pickup\", \"description\": \"Collected it from the office on Friday.\", \"priority\": \"normal\", \"customer_number\": \"0532 111 22 33\", \"assignee_user_id\": null, \"tags\": [\"visa\"], \"due_at\": null, \"status\": \"solved\", \"revision\": 3}'"
   }
  },
  "/api/tickets/{ticket_id}/comments": {
   "post": {
    "operationId": "add_comment_api_tickets__ticket_id__comments_post",
    "parameters": [
     {
      "name": "ticket_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Ticket Id"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/TicketCommentCreate"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ticketlar"
    ],
    "summary": "Yorum ekle",
    "x-summary-en": "Add a comment",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "text": "Müşteri arandı, belgeler hazır."
    },
    "x-ornek-en": {
     "text": "Called the customer; the documents are ready."
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/tickets/<ticket_id>/comments\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Müşteri arandı, belgeler hazır.\"}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/tickets/<ticket_id>/comments\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Called the customer; the documents are ready.\"}'"
   }
  },
  "/api/calls": {
   "get": {
    "operationId": "list_calls_api_calls_get",
    "parameters": [
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Kind"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Status"
      }
     },
     {
      "name": "assistant_id",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string",
         "format": "uuid"
        },
        {
         "type": "null"
        }
       ],
       "title": "Assistant Id"
      }
     },
     {
      "name": "date_from",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string",
         "format": "date-time"
        },
        {
         "type": "null"
        }
       ],
       "title": "Date From"
      }
     },
     {
      "name": "date_to",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string",
         "format": "date-time"
        },
        {
         "type": "null"
        }
       ],
       "title": "Date To"
      }
     },
     {
      "name": "call_id",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Call Id"
      }
     },
     {
      "name": "squad_id",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string",
         "format": "uuid"
        },
        {
         "type": "null"
        }
       ],
       "title": "Squad Id"
      }
     },
     {
      "name": "phone_number_id",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string",
         "format": "uuid"
        },
        {
         "type": "null"
        }
       ],
       "title": "Phone Number Id"
      }
     },
     {
      "name": "customer",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Customer"
      }
     },
     {
      "name": "ended_reason",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Ended Reason"
      }
     },
     {
      "name": "assistant_version_id",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string",
         "format": "uuid"
        },
        {
         "type": "null"
        }
       ],
       "title": "Assistant Version Id"
      }
     },
     {
      "name": "success",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "boolean"
        },
        {
         "type": "null"
        }
       ],
       "title": "Success"
      }
     },
     {
      "name": "min_score",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Min Score"
      }
     },
     {
      "name": "max_score",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "integer"
        },
        {
         "type": "null"
        }
       ],
       "title": "Max Score"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "started_at",
        "duration",
        "cost"
       ],
       "type": "string",
       "default": "started_at",
       "title": "Sort"
      }
     },
     {
      "name": "order",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "asc",
        "desc"
       ],
       "type": "string",
       "default": "desc",
       "title": "Order"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 1,
       "title": "Page"
      }
     },
     {
      "name": "per_page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 25,
       "title": "Per Page"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Asistanın görüşmeleri",
    "x-summary-en": "The assistant's calls",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/calls?per_page=20\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/calls/{call_id}": {
   "get": {
    "operationId": "get_call_api_calls__call_id__get",
    "parameters": [
     {
      "name": "call_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Call Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CallDetail"
        }
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Bir görüşme (yazısıyla)",
    "x-summary-en": "A call with its transcript",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/calls/<call_id>\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/calls/{call_id}/recording": {
   "get": {
    "operationId": "call_recording_api_calls__call_id__recording_get",
    "parameters": [
     {
      "name": "call_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Call Id"
      }
     },
     {
      "name": "download",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean",
       "default": false,
       "title": "Download"
      }
     },
     {
      "name": "channel",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "stereo",
        "mono",
        "caller",
        "assistant"
       ],
       "type": "string",
       "default": "stereo",
       "title": "Channel"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Görüşmenin ses kaydı (WAV)",
    "x-summary-en": "The call's recording (WAV)",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/calls/<call_id>/recording?channel=stereo\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/calls/{call_id}/transcript.txt": {
   "get": {
    "operationId": "call_transcript_text_api_calls__call_id__transcript_txt_get",
    "parameters": [
     {
      "name": "call_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Call Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Görüşmenin yazısı (düz metin)",
    "x-summary-en": "The call's transcript (plain text)",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/calls/<call_id>/transcript.txt\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/calls/{call_id}/end": {
   "post": {
    "operationId": "end_call_api_calls__call_id__end_post",
    "parameters": [
     {
      "name": "call_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Call Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CallDetail"
        }
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Süren görüşmeyi bitir",
    "x-summary-en": "End a call in progress",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl -X POST \"https://socialroute.tr/api/calls/<call_id>/end\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/calls/{call_id}/say": {
   "post": {
    "operationId": "say_in_call_api_calls__call_id__say_post",
    "parameters": [
     {
      "name": "call_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Call Id"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CallSayIn"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Süren görüşmede asistana bir cümle söylet",
    "x-summary-en": "Have the assistant say a sentence in a call in progress",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "text": "Kaydınız açıldı, birazdan SMS gelecek."
    },
    "x-ornek-en": {
     "text": "Your request is open; you will get an SMS shortly."
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/calls/<call_id>/say\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Kaydınız açıldı, birazdan SMS gelecek.\"}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/calls/<call_id>/say\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Your request is open; you will get an SMS shortly.\"}'"
   }
  },
  "/api/calls/{call_id}/context": {
   "post": {
    "operationId": "add_call_context_api_calls__call_id__context_post",
    "parameters": [
     {
      "name": "call_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Call Id"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CallContextIn"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Süren görüşmeye not ekle (arayana söylenmez)",
    "x-summary-en": "Add a note to a call in progress (not said to the caller)",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "text": "Arayan VIP müşteri."
    },
    "x-ornek-en": {
     "text": "The caller is a VIP customer."
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/calls/<call_id>/context\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Arayan VIP müşteri.\"}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/calls/<call_id>/context\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"The caller is a VIP customer.\"}'"
   }
  },
  "/api/calls/outbound": {
   "post": {
    "operationId": "place_call_api_calls_outbound_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OutboundCallCreate"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Asistanla ara",
    "x-summary-en": "Call with the assistant",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "assistant_id": "…",
     "phone_number_id": "…",
     "to": "0532 111 22 33",
     "purpose": "vize başvurunuzla ilgili geri dönüş",
     "variables": {
      "musteri_adi": "Elif"
     }
    },
    "x-ornek-en": {
     "assistant_id": "…",
     "phone_number_id": "…",
     "to": "0532 111 22 33",
     "purpose": "following up on your visa application",
     "variables": {
      "customer_name": "Elif"
     }
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/calls/outbound\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"assistant_id\": \"…\", \"phone_number_id\": \"…\", \"to\": \"0532 111 22 33\", \"purpose\": \"vize başvurunuzla ilgili geri dönüş\", \"variables\": {\"musteri_adi\": \"Elif\"}}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/calls/outbound\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"assistant_id\": \"…\", \"phone_number_id\": \"…\", \"to\": \"0532 111 22 33\", \"purpose\": \"following up on your visa application\", \"variables\": {\"customer_name\": \"Elif\"}}'"
   },
   "get": {
    "operationId": "list_placed_calls_api_calls_outbound_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Giden arama istekleri",
    "x-summary-en": "Outbound call requests",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/calls/outbound\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/calls/outbound/{outbound_id}": {
   "get": {
    "operationId": "placed_call_api_calls_outbound__outbound_id__get",
    "parameters": [
     {
      "name": "outbound_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Outbound Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Bir giden arama isteği",
    "x-summary-en": "An outbound call request",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/calls/outbound/<outbound_id>\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/campaigns/{campaign_id}/progress": {
   "get": {
    "operationId": "campaign_progress_api_campaigns__campaign_id__progress_get",
    "parameters": [
     {
      "name": "campaign_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Campaign Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Görüşmeler"
    ],
    "summary": "Kampanyanın ilerlemesi",
    "x-summary-en": "A campaign's progress",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/campaigns/<campaign_id>/progress\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/extensions/calls": {
   "get": {
    "operationId": "call_history_api_extensions_calls_get",
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 50,
       "title": "Limit"
      }
     },
     {
      "name": "before",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string",
         "format": "date-time"
        },
        {
         "type": "null"
        }
       ],
       "title": "Before"
      }
     },
     {
      "name": "extension",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Extension"
      }
     },
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Kind"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Status"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Santral"
    ],
    "summary": "Santral aramaları",
    "x-summary-en": "Switchboard calls",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/extensions/calls?limit=50\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/extensions/calls/{call_id}/recording": {
   "get": {
    "operationId": "switchboard_recording_api_extensions_calls__call_id__recording_get",
    "parameters": [
     {
      "name": "call_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Call Id"
      }
     },
     {
      "name": "download",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean",
       "default": false,
       "title": "Download"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Santral"
    ],
    "summary": "Santral aramasının ses kaydı",
    "x-summary-en": "A switchboard call's recording",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/extensions/calls/<call_id>/recording\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/extensions/live": {
   "get": {
    "operationId": "live_state_api_extensions_live_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "tags": [
     "Santral"
    ],
    "summary": "Dahililerin anlık durumu",
    "x-summary-en": "Live status of extensions",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/extensions/live\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/extensions/board": {
   "get": {
    "operationId": "call_board_api_extensions_board_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "tags": [
     "Santral"
    ],
    "summary": "Günün özeti ve canlı pano",
    "x-summary-en": "Today's summary and live board",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/extensions/board\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/extensions/report": {
   "get": {
    "operationId": "call_report_api_extensions_report_get",
    "parameters": [
     {
      "name": "days",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 7,
       "title": "Days"
      }
     },
     {
      "name": "target",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 20,
       "title": "Target"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Santral"
    ],
    "summary": "Gün ve dahili bazında rapor",
    "x-summary-en": "Report by day and extension",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/extensions/report?days=7\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/extensions/presence": {
   "get": {
    "operationId": "presence_report_api_extensions_presence_get",
    "parameters": [
     {
      "name": "days",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 7,
       "title": "Days"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Santral"
    ],
    "summary": "Mesai ve mola süreleri",
    "x-summary-en": "Work and break times",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/extensions/presence?days=7\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/departments": {
   "get": {
    "operationId": "list_departments_api_departments_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "tags": [
     "Santral"
    ],
    "summary": "Departmanlar ve üyeleri",
    "x-summary-en": "Departments and their members",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/departments\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/org/call-rules": {
   "get": {
    "operationId": "read_call_rules_api_org_call_rules_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "tags": [
     "Arama kuralları"
    ],
    "summary": "Mesai, tatil ve kayıt saklama süresi",
    "x-summary-en": "Working hours, holidays and recording retention",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/org/call-rules\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/call-blocks": {
   "get": {
    "operationId": "list_call_blocks_api_call_blocks_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "tags": [
     "Arama kuralları"
    ],
    "summary": "Arama kara listesi",
    "x-summary-en": "Call block list",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/call-blocks\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/org/transfer-settings": {
   "get": {
    "operationId": "read_transfer_settings_api_org_transfer_settings_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "tags": [
     "Arama kuralları"
    ],
    "summary": "Aktarılabilecek dış numaralar",
    "x-summary-en": "External numbers calls can be transferred to",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/org/transfer-settings\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/org/outbound-settings": {
   "get": {
    "operationId": "read_outbound_settings_api_org_outbound_settings_get",
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "tags": [
     "Arama kuralları"
    ],
    "summary": "Giden arama ayarları",
    "x-summary-en": "Outbound call settings",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/org/outbound-settings\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/payments": {
   "get": {
    "operationId": "list_payments_api_payments_get",
    "parameters": [
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Status"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 100,
       "title": "Limit"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ödemeler"
    ],
    "summary": "Ödemeleri listele",
    "x-summary-en": "List payments",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/payments\" \\\n  -H \"Authorization: Bearer sa_...\""
   },
   "post": {
    "operationId": "create_payment_api_payments_post",
    "parameters": [
     {
      "name": "origin",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Origin"
      }
     },
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string",
       "default": "",
       "title": "Idempotency-Key"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/PaymentCreate"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ödemeler"
    ],
    "summary": "Ödeme bağlantısı oluştur",
    "x-summary-en": "Create a payment link",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "amount_minor": 125000,
     "currency": "TRY",
     "description": "Danışmanlık ücreti",
     "payer_name": "Elif Yıldız",
     "customer_number": "0532 111 22 33",
     "send_sms": true
    },
    "x-ornek-en": {
     "amount_minor": 125000,
     "currency": "TRY",
     "description": "Consulting fee",
     "payer_name": "Elif Kaya",
     "customer_number": "0532 111 22 33",
     "send_sms": true
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/payments\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount_minor\": 125000, \"currency\": \"TRY\", \"description\": \"Danışmanlık ücreti\", \"payer_name\": \"Elif Yıldız\", \"customer_number\": \"0532 111 22 33\", \"send_sms\": true}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/payments\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount_minor\": 125000, \"currency\": \"TRY\", \"description\": \"Consulting fee\", \"payer_name\": \"Elif Kaya\", \"customer_number\": \"0532 111 22 33\", \"send_sms\": true}'"
   }
  },
  "/api/payments/{payment_id}/refresh": {
   "post": {
    "operationId": "refresh_payment_api_payments__payment_id__refresh_post",
    "parameters": [
     {
      "name": "payment_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Payment Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ödemeler"
    ],
    "summary": "Ödendi mi, şimdi sor",
    "x-summary-en": "Check now whether it was paid",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl -X POST \"https://socialroute.tr/api/payments/<payment_id>/refresh\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/payments/{payment_id}/cancel": {
   "post": {
    "operationId": "cancel_payment_api_payments__payment_id__cancel_post",
    "parameters": [
     {
      "name": "payment_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Payment Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Ödemeler"
    ],
    "summary": "Beklemeyi bırak",
    "x-summary-en": "Stop waiting for a payment",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl -X POST \"https://socialroute.tr/api/payments/<payment_id>/cancel\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/otp/send": {
   "post": {
    "operationId": "send_code_api_otp_send_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OtpSend"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Doğrulama kodu"
    ],
    "summary": "Kod gönder",
    "x-summary-en": "Send a code",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "to": "0532 111 22 33",
     "channel": "sms",
     "purpose": "giris",
     "length": 6,
     "ttl_seconds": 180
    },
    "x-ornek-en": {
     "to": "0532 111 22 33",
     "channel": "sms",
     "purpose": "login",
     "length": 6,
     "ttl_seconds": 180
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/otp/send\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"to\": \"0532 111 22 33\", \"channel\": \"sms\", \"purpose\": \"giris\", \"length\": 6, \"ttl_seconds\": 180}'",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/otp/send\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"to\": \"0532 111 22 33\", \"channel\": \"sms\", \"purpose\": \"login\", \"length\": 6, \"ttl_seconds\": 180}'"
   }
  },
  "/api/otp/verify": {
   "post": {
    "operationId": "verify_code_api_otp_verify_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OtpVerify"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Doğrulama kodu"
    ],
    "summary": "Kodu doğrula",
    "x-summary-en": "Verify a code",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": {
     "id": "…",
     "code": "123456"
    },
    "x-curl": "curl -X POST \"https://socialroute.tr/api/otp/verify\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"id\": \"…\", \"code\": \"123456\"}'"
   }
  },
  "/api/knowledge-bases/{base_id}/documents/upload": {
   "post": {
    "operationId": "upload_document_api_knowledge_bases__base_id__documents_upload_post",
    "parameters": [
     {
      "name": "base_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Base Id"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "$ref": "#/components/schemas/Body_upload_document_api_knowledge_bases__base_id__documents_upload_post"
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/DocumentOut"
        }
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Bilgi tabanı ve araçlar"
    ],
    "summary": "Bilgi tabanına dosya yükle",
    "x-summary-en": "Upload a file to a knowledge base",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-ornek": "dosya",
    "x-curl": "curl -X POST \"https://socialroute.tr/api/knowledge-bases/<base_id>/documents/upload\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -F \"file=@belge.pdf\"",
    "x-curl-en": "curl -X POST \"https://socialroute.tr/api/knowledge-bases/<base_id>/documents/upload\" \\\n  -H \"Authorization: Bearer sa_...\" \\\n  -F \"file=@document.pdf\""
   }
  },
  "/api/assistants/{assistant_id}/export": {
   "get": {
    "operationId": "export_setup_api_assistants__assistant_id__export_get",
    "parameters": [
     {
      "name": "assistant_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Assistant Id"
      }
     },
     {
      "name": "include_documents",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean",
       "default": false,
       "title": "Include Documents"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Bilgi tabanı ve araçlar"
    ],
    "summary": "Asistanı dosyaya aktar",
    "x-summary-en": "Export an assistant to a file",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/assistants/<assistant_id>/export\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  },
  "/api/tools/{tool_id}/versions": {
   "get": {
    "operationId": "list_tool_versions_api_tools__tool_id__versions_get",
    "parameters": [
     {
      "name": "tool_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid",
       "title": "Tool Id"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "Bilgi tabanı ve araçlar"
    ],
    "summary": "Aracın önceki ayarları",
    "x-summary-en": "A tool's earlier settings",
    "security": [
     {
      "apiKey": []
     }
    ],
    "x-curl": "curl \"https://socialroute.tr/api/tools/<tool_id>/versions\" \\\n  -H \"Authorization: Bearer sa_...\""
   }
  }
 },
 "components": {
  "schemas": {
   "Body_upload_document_api_knowledge_bases__base_id__documents_upload_post": {
    "properties": {
     "file": {
      "type": "string",
      "contentMediaType": "application/octet-stream",
      "title": "File"
     }
    },
    "type": "object",
    "required": [
     "file"
    ],
    "title": "Body_upload_document_api_knowledge_bases__base_id__documents_upload_post"
   },
   "CallContextIn": {
    "properties": {
     "text": {
      "type": "string",
      "maxLength": 1000,
      "minLength": 1,
      "title": "Text"
     }
    },
    "type": "object",
    "required": [
     "text"
    ],
    "title": "CallContextIn"
   },
   "CallDetail": {
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
     },
     "assistant_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Assistant Id"
     },
     "assistant_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Assistant Name"
     },
     "assistant_version": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Assistant Version"
     },
     "assistant_version_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Assistant Version Id"
     },
     "assistant_draft_revision": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Assistant Draft Revision"
     },
     "squad_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Squad Id"
     },
     "squad_name": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Squad Name"
     },
     "squad_version": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Squad Version"
     },
     "phone_number_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Phone Number Id"
     },
     "assistant_number": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Assistant Number"
     },
     "kind": {
      "type": "string",
      "title": "Kind"
     },
     "status": {
      "type": "string",
      "title": "Status"
     },
     "customer_number": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Number"
     },
     "started_at": {
      "type": "string",
      "format": "date-time",
      "title": "Started At"
     },
     "ended_at": {
      "anyOf": [
       {
        "type": "string",
        "format": "date-time"
       },
       {
        "type": "null"
       }
      ],
      "title": "Ended At"
     },
     "duration_seconds": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Duration Seconds"
     },
     "ended_reason": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Ended Reason"
     },
     "cost_minor": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Cost Minor"
     },
     "avg_latency_ms": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Avg Latency Ms"
     },
     "analysis": {
      "additionalProperties": true,
      "type": "object",
      "title": "Analysis",
      "default": {}
     },
     "has_recording": {
      "type": "boolean",
      "title": "Has Recording",
      "default": false
     },
     "recording_seconds": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Recording Seconds"
     },
     "analysis_status": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Analysis Status"
     },
     "success": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "title": "Success"
     },
     "score": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Score"
     },
     "variables": {
      "additionalProperties": true,
      "type": "object",
      "title": "Variables",
      "default": {}
     },
     "messages": {
      "items": {
       "$ref": "#/components/schemas/MessageOut"
      },
      "type": "array",
      "title": "Messages",
      "default": []
     }
    },
    "type": "object",
    "required": [
     "id",
     "assistant_id",
     "phone_number_id",
     "kind",
     "status",
     "customer_number",
     "started_at",
     "ended_at",
     "duration_seconds",
     "ended_reason",
     "cost_minor"
    ],
    "title": "CallDetail"
   },
   "CallSayIn": {
    "properties": {
     "text": {
      "type": "string",
      "maxLength": 300,
      "minLength": 1,
      "title": "Text"
     }
    },
    "type": "object",
    "required": [
     "text"
    ],
    "title": "CallSayIn"
   },
   "ContactNoteCreate": {
    "properties": {
     "text": {
      "type": "string",
      "maxLength": 2000,
      "minLength": 1,
      "title": "Text"
     }
    },
    "type": "object",
    "required": [
     "text"
    ],
    "title": "ContactNoteCreate"
   },
   "ContactSave": {
    "properties": {
     "number": {
      "type": "string",
      "title": "Number"
     },
     "name": {
      "type": "string",
      "maxLength": 160,
      "title": "Name",
      "default": ""
     },
     "company": {
      "type": "string",
      "maxLength": 160,
      "title": "Company",
      "default": ""
     },
     "email": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 254,
        "pattern": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"
       },
       {
        "type": "null"
       }
      ],
      "title": "Email"
     },
     "code": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 60,
        "minLength": 1
       },
       {
        "type": "null"
       }
      ],
      "title": "Code"
     },
     "tags": {
      "items": {
       "type": "string",
       "maxLength": 40,
       "minLength": 1
      },
      "type": "array",
      "maxItems": 20,
      "title": "Tags",
      "default": []
     },
     "custom_fields": {
      "anyOf": [
       {
        "additionalProperties": {
         "anyOf": [
          {
           "type": "string"
          },
          {
           "type": "integer"
          },
          {
           "type": "number"
          },
          {
           "type": "null"
          }
         ]
        },
        "type": "object",
        "maxProperties": 60
       },
       {
        "type": "null"
       }
      ],
      "title": "Custom Fields"
     }
    },
    "type": "object",
    "required": [
     "number"
    ],
    "title": "ContactSave"
   },
   "DocumentOut": {
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
     },
     "title": {
      "type": "string",
      "title": "Title"
     },
     "source_url": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Source Url"
     },
     "size": {
      "type": "integer",
      "title": "Size",
      "default": 0
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
     },
     "sorumlu": {
      "type": "string",
      "title": "Sorumlu",
      "default": ""
     },
     "gecerlilik_bitis": {
      "anyOf": [
       {
        "type": "string",
        "format": "date"
       },
       {
        "type": "null"
       }
      ],
      "title": "Gecerlilik Bitis"
     },
     "icerik_degisti": {
      "anyOf": [
       {
        "type": "string",
        "format": "date-time"
       },
       {
        "type": "null"
       }
      ],
      "title": "Icerik Degisti"
     },
     "gozden_gecirme": {
      "anyOf": [
       {
        "type": "string",
        "format": "date-time"
       },
       {
        "type": "null"
       }
      ],
      "title": "Gozden Gecirme"
     },
     "tazelik": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Tazelik"
     }
    },
    "type": "object",
    "required": [
     "id",
     "title",
     "source_url",
     "created_at"
    ],
    "title": "DocumentOut"
   },
   "HTTPValidationError": {
    "properties": {
     "detail": {
      "items": {
       "$ref": "#/components/schemas/ValidationError"
      },
      "type": "array",
      "title": "Detail"
     }
    },
    "type": "object",
    "title": "HTTPValidationError"
   },
   "KisiKimlikEkle": {
    "properties": {
     "tur": {
      "type": "string",
      "enum": [
       "telefon",
       "eposta"
      ],
      "title": "Tur"
     },
     "deger": {
      "type": "string",
      "maxLength": 254,
      "minLength": 1,
      "title": "Deger"
     }
    },
    "type": "object",
    "required": [
     "tur",
     "deger"
    ],
    "title": "KisiKimlikEkle",
    "description": "Another number or e-mail address of a card's person (app/kisi_kimlik.py)."
   },
   "MessageOut": {
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
     },
     "seq": {
      "type": "integer",
      "title": "Seq"
     },
     "role": {
      "type": "string",
      "title": "Role"
     },
     "content": {
      "type": "string",
      "title": "Content"
     },
     "timings": {
      "anyOf": [
       {
        "additionalProperties": true,
        "type": "object"
       },
       {
        "type": "null"
       }
      ],
      "title": "Timings"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
     }
    },
    "type": "object",
    "required": [
     "id",
     "seq",
     "role",
     "content",
     "timings",
     "created_at"
    ],
    "title": "MessageOut"
   },
   "OtpSend": {
    "properties": {
     "to": {
      "type": "string",
      "title": "To"
     },
     "channel": {
      "type": "string",
      "enum": [
       "sms",
       "whatsapp"
      ],
      "title": "Channel",
      "default": "sms"
     },
     "purpose": {
      "type": "string",
      "maxLength": 40,
      "title": "Purpose",
      "default": ""
     },
     "length": {
      "type": "integer",
      "maximum": 6.0,
      "minimum": 4.0,
      "title": "Length",
      "default": 6
     },
     "ttl_seconds": {
      "type": "integer",
      "maximum": 600.0,
      "minimum": 60.0,
      "title": "Ttl Seconds",
      "default": 180
     },
     "text": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 140
       },
       {
        "type": "null"
       }
      ],
      "title": "Text"
     },
     "language": {
      "type": "string",
      "enum": [
       "tr",
       "en"
      ],
      "title": "Language",
      "default": "tr"
     },
     "sms_fallback": {
      "type": "boolean",
      "title": "Sms Fallback",
      "default": true
     }
    },
    "type": "object",
    "required": [
     "to"
    ],
    "title": "OtpSend"
   },
   "OtpVerify": {
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
     },
     "code": {
      "type": "string",
      "maxLength": 6,
      "minLength": 4,
      "pattern": "^[0-9]+$",
      "title": "Code"
     }
    },
    "type": "object",
    "required": [
     "id",
     "code"
    ],
    "title": "OtpVerify"
   },
   "OutboundCallCreate": {
    "properties": {
     "assistant_id": {
      "type": "string",
      "format": "uuid",
      "title": "Assistant Id"
     },
     "phone_number_id": {
      "type": "string",
      "format": "uuid",
      "title": "Phone Number Id"
     },
     "to": {
      "type": "string",
      "title": "To"
     },
     "variables": {
      "additionalProperties": true,
      "type": "object",
      "title": "Variables",
      "default": {}
     },
     "voicemail_detection": {
      "type": "boolean",
      "title": "Voicemail Detection",
      "default": false
     },
     "purpose": {
      "type": "string",
      "maxLength": 200,
      "title": "Purpose",
      "default": ""
     }
    },
    "type": "object",
    "required": [
     "assistant_id",
     "phone_number_id",
     "to"
    ],
    "title": "OutboundCallCreate",
    "description": "One call the assistant is to place now, through one of the organisation's own lines."
   },
   "PaymentCreate": {
    "properties": {
     "amount_minor": {
      "type": "integer",
      "maximum": 100000000.0,
      "minimum": 100.0,
      "title": "Amount Minor"
     },
     "currency": {
      "type": "string",
      "enum": [
       "TRY",
       "USD",
       "EUR"
      ],
      "title": "Currency",
      "default": "TRY"
     },
     "description": {
      "type": "string",
      "maxLength": 200,
      "minLength": 2,
      "title": "Description"
     },
     "payer_name": {
      "type": "string",
      "maxLength": 120,
      "minLength": 2,
      "title": "Payer Name"
     },
     "customer_number": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Number"
     },
     "ticket_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Ticket Id"
     },
     "send_sms": {
      "type": "boolean",
      "title": "Send Sms",
      "default": false
     }
    },
    "type": "object",
    "required": [
     "amount_minor",
     "description",
     "payer_name"
    ],
    "title": "PaymentCreate"
   },
   "TicketCommentCreate": {
    "properties": {
     "text": {
      "type": "string",
      "maxLength": 5000,
      "minLength": 1,
      "title": "Text"
     }
    },
    "type": "object",
    "required": [
     "text"
    ],
    "title": "TicketCommentCreate"
   },
   "TicketCreate": {
    "properties": {
     "title": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Title"
     },
     "description": {
      "type": "string",
      "maxLength": 10000,
      "title": "Description",
      "default": ""
     },
     "priority": {
      "type": "string",
      "enum": [
       "low",
       "normal",
       "high",
       "urgent"
      ],
      "title": "Priority",
      "default": "normal"
     },
     "customer_number": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Number"
     },
     "contact_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact Id"
     },
     "assignee_user_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Assignee User Id"
     },
     "tags": {
      "items": {
       "type": "string",
       "maxLength": 40,
       "minLength": 1
      },
      "type": "array",
      "maxItems": 20,
      "title": "Tags",
      "default": []
     },
     "due_at": {
      "anyOf": [
       {
        "type": "string",
        "format": "date-time"
       },
       {
        "type": "null"
       }
      ],
      "title": "Due At"
     },
     "source": {
      "anyOf": [
       {
        "type": "string",
        "enum": [
         "pazaryeri",
         "sosyal"
        ]
       },
       {
        "type": "null"
       }
      ],
      "title": "Source"
     }
    },
    "type": "object",
    "required": [
     "title"
    ],
    "title": "TicketCreate"
   },
   "TicketUpdate": {
    "properties": {
     "title": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Title"
     },
     "description": {
      "type": "string",
      "maxLength": 10000,
      "title": "Description",
      "default": ""
     },
     "priority": {
      "type": "string",
      "enum": [
       "low",
       "normal",
       "high",
       "urgent"
      ],
      "title": "Priority",
      "default": "normal"
     },
     "customer_number": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Customer Number"
     },
     "contact_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Contact Id"
     },
     "assignee_user_id": {
      "anyOf": [
       {
        "type": "string",
        "format": "uuid"
       },
       {
        "type": "null"
       }
      ],
      "title": "Assignee User Id"
     },
     "tags": {
      "items": {
       "type": "string",
       "maxLength": 40,
       "minLength": 1
      },
      "type": "array",
      "maxItems": 20,
      "title": "Tags",
      "default": []
     },
     "due_at": {
      "anyOf": [
       {
        "type": "string",
        "format": "date-time"
       },
       {
        "type": "null"
       }
      ],
      "title": "Due At"
     },
     "source": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Source"
     },
     "status": {
      "type": "string",
      "enum": [
       "open",
       "in_progress",
       "waiting",
       "solved",
       "closed"
      ],
      "title": "Status"
     },
     "revision": {
      "type": "integer",
      "title": "Revision"
     }
    },
    "type": "object",
    "required": [
     "title",
     "status",
     "revision"
    ],
    "title": "TicketUpdate"
   },
   "ValidationError": {
    "properties": {
     "loc": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "integer"
        }
       ]
      },
      "type": "array",
      "title": "Location"
     },
     "msg": {
      "type": "string",
      "title": "Message"
     },
     "type": {
      "type": "string",
      "title": "Error Type"
     },
     "input": {
      "title": "Input"
     },
     "ctx": {
      "type": "object",
      "title": "Context"
     }
    },
    "type": "object",
    "required": [
     "loc",
     "msg",
     "type"
    ],
    "title": "ValidationError"
   }
  },
  "securitySchemes": {
   "apiKey": {
    "type": "http",
    "scheme": "bearer",
    "description": "Panelde API anahtarları sayfasında oluşturulan özel anahtar (sa_ ile başlar). Erişimi 'read' olan anahtar yalnız GET isteklerine yanıt alır; ötekiler 403 döner.",
    "x-description-en": "A private key created on the API keys page of the dashboard (starts with sa_). A key whose access is 'read' gets answers to GET requests only; the others return 403."
   }
  }
 },
 "x-rate-limit-per-minute": 60,
 "x-olaylar": [
  {
   "ad": "call.started",
   "neZaman": "Bir görüşme başlayınca (sunucuda CALL_CONTROL açıksa)",
   "neZamanEn": "When a call starts (if CALL_CONTROL is on for the server)",
   "govde": "call"
  },
  {
   "ad": "call.ended",
   "neZaman": "Asistanın bir görüşmesi bitince",
   "neZamanEn": "When one of the assistant's calls ends",
   "govde": "call"
  },
  {
   "ad": "call.analyzed",
   "neZaman": "Çağrı sonu analizi bitince (Ayarlar'da açıksa)",
   "neZamanEn": "When the post-call analysis is done (if turned on in Settings)",
   "govde": "call"
  },
  {
   "ad": "campaign.completed",
   "neZaman": "Bir kampanyanın bütün kişileri bitince",
   "neZamanEn": "When every contact of a campaign is done",
   "govde": "campaign"
  },
  {
   "ad": "monitor.triggered",
   "neZaman": "Bir izleme kuralı bozulunca (Ayarlar'da açıksa)",
   "neZamanEn": "When a monitoring rule breaks (if turned on in Settings)",
   "govde": "monitor"
  },
  {
   "ad": "monitor.resolved",
   "neZaman": "Bozulan izleme kuralı düzelince (Ayarlar'da açıksa)",
   "neZamanEn": "When a broken monitoring rule recovers (if turned on in Settings)",
   "govde": "monitor"
  },
  {
   "ad": "eval.failed",
   "neZaman": "Zamanlanmış bir değerlendirme başarısız olunca (Ayarlar'da açıksa)",
   "neZamanEn": "When a scheduled evaluation fails (if turned on in Settings)",
   "govde": "eval"
  },
  {
   "ad": "switchboard_call.ended",
   "neZaman": "Santraldeki bir arama bitince",
   "neZamanEn": "When a switchboard call ends",
   "govde": "call"
  },
  {
   "ad": "ticket.created",
   "neZaman": "Ticket açılınca (kişi, entegrasyon ya da arama)",
   "neZamanEn": "When a ticket is opened (by a person, an integration or a call)",
   "govde": "ticket"
  },
  {
   "ad": "ticket.updated",
   "neZaman": "Ticket değişince ya da yorum eklenince",
   "neZamanEn": "When a ticket changes or gets a comment",
   "govde": "ticket, comment"
  },
  {
   "ad": "form.submitted",
   "neZaman": "Panelde hazırlanan bir web formu doldurulup gönderilince",
   "neZamanEn": "When a web form built in the dashboard is filled in and sent",
   "govde": "form, response"
  },
  {
   "ad": "contact.created",
   "neZaman": "Panelden ya da API ile kart açılınca",
   "neZamanEn": "When a profile is created in the dashboard or through the API",
   "govde": "contact"
  },
  {
   "ad": "payment.paid",
   "neZaman": "Bir ödeme banka tarafından doğrulanınca",
   "neZamanEn": "When the bank confirms a payment",
   "govde": "payment"
  },
  {
   "ad": "payment.refunded",
   "neZaman": "Bir ödeme tamamen ya da kısmen iade edilince",
   "neZamanEn": "When a payment is refunded in full or in part",
   "govde": "payment, refunded_now_minor"
  },
  {
   "ad": "order.created",
   "neZaman": "Bağlı e-ticaret mağazası yeni bir sipariş bildirince",
   "neZamanEn": "When a connected online store reports a new order",
   "govde": "order"
  },
  {
   "ad": "order.updated",
   "neZaman": "Bağlı e-ticaret mağazası değişen bir sipariş bildirince",
   "neZamanEn": "When a connected online store reports a changed order",
   "govde": "order"
  },
  {
   "ad": "test",
   "neZaman": "Ayarlar sayfasındaki sına düğmesine basılınca",
   "neZamanEn": "When the test button on the Settings page is pressed",
   "govde": "message"
  }
 ]
}
