{
  "openapi": "3.0.3",
  "info": {
    "title": "Tempo WhatsApp Gateway API",
    "version": "1.0",
    "description": "WhatsApp mesaj, dosya, konum ve kişi kartı gönderim; sohbet, kişi ve medya API'si. Ayrıntılı doküman: https://wa.tempomsg.com/dokuman"
  },
  "servers": [
    {
      "url": "https://wa.tempomsg.com"
    }
  ],
  "tags": [
    {
      "name": "Mesaj"
    },
    {
      "name": "İşlem"
    },
    {
      "name": "Takip"
    },
    {
      "name": "Numara"
    },
    {
      "name": "Sohbet"
    },
    {
      "name": "Kişi"
    },
    {
      "name": "Medya"
    },
    {
      "name": "Webhook"
    }
  ],
  "paths": {
    "/{instanceId}/messages/chat": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Metin mesajı gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "body": {
                    "type": "string",
                    "description": "Mesaj metni (≤4096)"
                  }
                },
                "required": [
                  "to",
                  "body"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "body": {
                    "type": "string",
                    "description": "Mesaj metni (≤4096)"
                  }
                },
                "required": [
                  "to",
                  "body"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "body": {
                    "type": "string",
                    "description": "Mesaj metni (≤4096)"
                  }
                },
                "required": [
                  "to",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/document": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Belge gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "document": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı ve uzantısı"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "document"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "document": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı ve uzantısı"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "document"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "document": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı ve uzantısı"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "document"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          },
          "413": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/image": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Resim gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "image": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı (.jpg/.png/.webp)"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "image"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "image": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı (.jpg/.png/.webp)"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "image"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "image": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı (.jpg/.png/.webp)"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "image"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          },
          "413": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages": {
      "get": {
        "tags": [
          "Takip"
        ],
        "summary": "Mesaj durumu ve geçmiş",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filtre",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "queue",
                "sent",
                "unsent",
                "cancelled"
              ]
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Mesaj id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "referenceId",
            "in": "query",
            "required": false,
            "description": "Kendi numaranız",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Sayfa",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "≤100",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/groups": {
      "get": {
        "tags": [
          "Takip"
        ],
        "summary": "Üye olunan gruplar",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Grup listesi",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/status": {
      "get": {
        "tags": [
          "Numara"
        ],
        "summary": "Bağlantı durumu",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Durum",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/qr": {
      "get": {
        "tags": [
          "Numara"
        ],
        "summary": "QR kodu (PNG)",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PNG",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/logout": {
      "post": {
        "tags": [
          "Numara"
        ],
        "summary": "WhatsApp bağlantısını kes",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam"
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/restart": {
      "post": {
        "tags": [
          "Numara"
        ],
        "summary": "Oturumu yeniden başlat",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam"
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/settings": {
      "get": {
        "tags": [
          "Webhook"
        ],
        "summary": "Webhook ayarlarını oku",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ayarlar"
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      },
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Webhook ayarlarını kaydet",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "webhook_url": {
                    "type": "string",
                    "description": "https adresi (boş = kapat)"
                  },
                  "webhook_message_received": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_create": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_ack": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_instance_status": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_reaction": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_download_media": {
                    "type": "string",
                    "description": "true/false (gelen medyaya indirme bağlantısı)"
                  },
                  "webhook_retries": {
                    "type": "string",
                    "description": "1-10 (boş = sistem varsayılanı)"
                  },
                  "webhook_secret_regenerate": {
                    "type": "string",
                    "description": "true = yeni imza anahtarı"
                  }
                },
                "required": []
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "webhook_url": {
                    "type": "string",
                    "description": "https adresi (boş = kapat)"
                  },
                  "webhook_message_received": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_create": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_ack": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_instance_status": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_reaction": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_download_media": {
                    "type": "string",
                    "description": "true/false (gelen medyaya indirme bağlantısı)"
                  },
                  "webhook_retries": {
                    "type": "string",
                    "description": "1-10 (boş = sistem varsayılanı)"
                  },
                  "webhook_secret_regenerate": {
                    "type": "string",
                    "description": "true = yeni imza anahtarı"
                  }
                },
                "required": []
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "webhook_url": {
                    "type": "string",
                    "description": "https adresi (boş = kapat)"
                  },
                  "webhook_message_received": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_create": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_ack": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_instance_status": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_message_reaction": {
                    "type": "string",
                    "description": "true/false"
                  },
                  "webhook_download_media": {
                    "type": "string",
                    "description": "true/false (gelen medyaya indirme bağlantısı)"
                  },
                  "webhook_retries": {
                    "type": "string",
                    "description": "1-10 (boş = sistem varsayılanı)"
                  },
                  "webhook_secret_regenerate": {
                    "type": "string",
                    "description": "true = yeni imza anahtarı"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kaydedildi; yeni webhook_secret yalnızca bir kez döner"
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/instance/webhook-test": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Test olayı gönder",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gönderildi"
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/webhook-log": {
      "get": {
        "tags": [
          "Webhook"
        ],
        "summary": "Son iletimler",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "≤200",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste"
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/webhook-test-alicisi": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Geçici test alıcısı adresi üret",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Adres"
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      },
      "get": {
        "tags": [
          "Webhook"
        ],
        "summary": "Test alıcısına gelen olaylar",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Olaylar"
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/messages/video": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Video gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "video": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. tanitim.mp4"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "video"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "video": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. tanitim.mp4"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "video"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "video": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. tanitim.mp4"
                  },
                  "caption": {
                    "type": "string",
                    "description": "Açıklama (≤1024)"
                  }
                },
                "required": [
                  "to",
                  "video"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          },
          "413": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/audio": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Ses dosyası gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "audio": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. duyuru.mp3"
                  }
                },
                "required": [
                  "to",
                  "audio"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "audio": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. duyuru.mp3"
                  }
                },
                "required": [
                  "to",
                  "audio"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "audio": {
                    "type": "string",
                    "description": "https adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. duyuru.mp3"
                  }
                },
                "required": [
                  "to",
                  "audio"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          },
          "413": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/voice": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Sesli not gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "audio": {
                    "type": "string",
                    "description": "https adresi veya base64 (mp3/ogg)"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. not.ogg"
                  }
                },
                "required": [
                  "to",
                  "audio"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "audio": {
                    "type": "string",
                    "description": "https adresi veya base64 (mp3/ogg)"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. not.ogg"
                  }
                },
                "required": [
                  "to",
                  "audio"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "audio": {
                    "type": "string",
                    "description": "https adresi veya base64 (mp3/ogg)"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. not.ogg"
                  }
                },
                "required": [
                  "to",
                  "audio"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          },
          "413": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/sticker": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Sticker gönder (WebP)",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "sticker": {
                    "type": "string",
                    "description": "WebP adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. sticker.webp"
                  }
                },
                "required": [
                  "to",
                  "sticker"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "sticker": {
                    "type": "string",
                    "description": "WebP adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. sticker.webp"
                  }
                },
                "required": [
                  "to",
                  "sticker"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "sticker": {
                    "type": "string",
                    "description": "WebP adresi veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "ör. sticker.webp"
                  }
                },
                "required": [
                  "to",
                  "sticker"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          },
          "413": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/location": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Konum gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "lat": {
                    "type": "string",
                    "description": "Enlem"
                  },
                  "lng": {
                    "type": "string",
                    "description": "Boylam"
                  },
                  "address": {
                    "type": "string",
                    "description": "Konum adı / adres"
                  }
                },
                "required": [
                  "to",
                  "lat",
                  "lng"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "lat": {
                    "type": "string",
                    "description": "Enlem"
                  },
                  "lng": {
                    "type": "string",
                    "description": "Boylam"
                  },
                  "address": {
                    "type": "string",
                    "description": "Konum adı / adres"
                  }
                },
                "required": [
                  "to",
                  "lat",
                  "lng"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "lat": {
                    "type": "string",
                    "description": "Enlem"
                  },
                  "lng": {
                    "type": "string",
                    "description": "Boylam"
                  },
                  "address": {
                    "type": "string",
                    "description": "Konum adı / adres"
                  }
                },
                "required": [
                  "to",
                  "lat",
                  "lng"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/contact": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "Kişi kartı gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "contact": {
                    "type": "string",
                    "description": "Numara(lar), virgülle ≤5"
                  },
                  "name": {
                    "type": "string",
                    "description": "Kartta görünecek ad"
                  }
                },
                "required": [
                  "to",
                  "contact"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "contact": {
                    "type": "string",
                    "description": "Numara(lar), virgülle ≤5"
                  },
                  "name": {
                    "type": "string",
                    "description": "Kartta görünecek ad"
                  }
                },
                "required": [
                  "to",
                  "contact"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "contact": {
                    "type": "string",
                    "description": "Numara(lar), virgülle ≤5"
                  },
                  "name": {
                    "type": "string",
                    "description": "Kartta görünecek ad"
                  }
                },
                "required": [
                  "to",
                  "contact"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/vcard": {
      "post": {
        "tags": [
          "Mesaj"
        ],
        "summary": "vCard gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "vcard": {
                    "type": "string",
                    "description": "BEGIN:VCARD ... END:VCARD (≤8000)"
                  }
                },
                "required": [
                  "to",
                  "vcard"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "vcard": {
                    "type": "string",
                    "description": "BEGIN:VCARD ... END:VCARD (≤8000)"
                  }
                },
                "required": [
                  "to",
                  "vcard"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "to": {
                    "type": "string",
                    "description": "905321234567 veya ...@g.us"
                  },
                  "referenceId": {
                    "type": "string",
                    "description": "Kendi kayıt numaranız (≤100)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "0-10, küçük önce (varsayılan 5)"
                  },
                  "vcard": {
                    "type": "string",
                    "description": "BEGIN:VCARD ... END:VCARD (≤8000)"
                  }
                },
                "required": [
                  "to",
                  "vcard"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kuyruğa alındı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gonderim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/reaction": {
      "post": {
        "tags": [
          "İşlem"
        ],
        "summary": "Mesaja tepki ver",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "msgId": {
                    "type": "string",
                    "description": "Gönderim id'si veya WhatsApp mesaj kimliği"
                  },
                  "emoji": {
                    "type": "string",
                    "description": "Emoji (boş = kaldır)"
                  }
                },
                "required": [
                  "msgId"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "msgId": {
                    "type": "string",
                    "description": "Gönderim id'si veya WhatsApp mesaj kimliği"
                  },
                  "emoji": {
                    "type": "string",
                    "description": "Emoji (boş = kaldır)"
                  }
                },
                "required": [
                  "msgId"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "msgId": {
                    "type": "string",
                    "description": "Gönderim id'si veya WhatsApp mesaj kimliği"
                  },
                  "emoji": {
                    "type": "string",
                    "description": "Emoji (boş = kaldır)"
                  }
                },
                "required": [
                  "msgId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/delete": {
      "post": {
        "tags": [
          "İşlem"
        ],
        "summary": "Mesajı herkesten sil",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "msgId": {
                    "type": "string",
                    "description": "Gönderim id'si veya WhatsApp mesaj kimliği"
                  },
                  "chatId": {
                    "type": "string",
                    "description": "WhatsApp kimliğiyle silerken gerekebilir"
                  }
                },
                "required": [
                  "msgId"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "msgId": {
                    "type": "string",
                    "description": "Gönderim id'si veya WhatsApp mesaj kimliği"
                  },
                  "chatId": {
                    "type": "string",
                    "description": "WhatsApp kimliğiyle silerken gerekebilir"
                  }
                },
                "required": [
                  "msgId"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "msgId": {
                    "type": "string",
                    "description": "Gönderim id'si veya WhatsApp mesaj kimliği"
                  },
                  "chatId": {
                    "type": "string",
                    "description": "WhatsApp kimliğiyle silerken gerekebilir"
                  }
                },
                "required": [
                  "msgId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/resendByStatus": {
      "post": {
        "tags": [
          "İşlem"
        ],
        "summary": "Duruma göre yeniden gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "status": {
                    "type": "string",
                    "description": "unsent | cancelled"
                  }
                },
                "required": [
                  "status"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "status": {
                    "type": "string",
                    "description": "unsent | cancelled"
                  }
                },
                "required": [
                  "status"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "status": {
                    "type": "string",
                    "description": "unsent | cancelled"
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/resendById": {
      "post": {
        "tags": [
          "İşlem"
        ],
        "summary": "Tek mesajı yeniden gönder",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "id": {
                    "type": "string",
                    "description": "Mesaj id"
                  }
                },
                "required": [
                  "id"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "id": {
                    "type": "string",
                    "description": "Mesaj id"
                  }
                },
                "required": [
                  "id"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "id": {
                    "type": "string",
                    "description": "Mesaj id"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/clear": {
      "post": {
        "tags": [
          "İşlem"
        ],
        "summary": "Kuyruğu iptal et / kayıtları temizle",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "status": {
                    "type": "string",
                    "description": "queue (iptal) | sent | unsent | cancelled"
                  }
                },
                "required": [
                  "status"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "status": {
                    "type": "string",
                    "description": "queue (iptal) | sent | unsent | cancelled"
                  }
                },
                "required": [
                  "status"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "status": {
                    "type": "string",
                    "description": "queue (iptal) | sent | unsent | cancelled"
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/messages/statistics": {
      "get": {
        "tags": [
          "Takip"
        ],
        "summary": "Mesaj sayıları",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/me": {
      "get": {
        "tags": [
          "Numara"
        ],
        "summary": "Bağlı numara bilgisi",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/qrCode": {
      "get": {
        "tags": [
          "Numara"
        ],
        "summary": "QR kodu (metin)",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/instance/clear": {
      "post": {
        "tags": [
          "Numara"
        ],
        "summary": "Kuyruktaki tüm mesajları iptal et",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  }
                },
                "required": []
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  }
                },
                "required": []
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/chats": {
      "get": {
        "tags": [
          "Sohbet"
        ],
        "summary": "Sohbet listesi",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Sayfa",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Kayıt sayısı",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/chats/ids": {
      "get": {
        "tags": [
          "Sohbet"
        ],
        "summary": "Sohbet kimlikleri",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/chats/messages": {
      "get": {
        "tags": [
          "Sohbet"
        ],
        "summary": "Sohbet mesajları",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chatId",
            "in": "query",
            "required": true,
            "description": "905321234567, ...@c.us veya ...@g.us",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Sayfa",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Kayıt sayısı",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/chats/read": {
      "post": {
        "tags": [
          "Sohbet"
        ],
        "summary": "Sohbeti okundu işaretle",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "chatId": {
                    "type": "string",
                    "description": "Sohbet kimliği veya numara"
                  }
                },
                "required": [
                  "chatId"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "chatId": {
                    "type": "string",
                    "description": "Sohbet kimliği veya numara"
                  }
                },
                "required": [
                  "chatId"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "chatId": {
                    "type": "string",
                    "description": "Sohbet kimliği veya numara"
                  }
                },
                "required": [
                  "chatId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/contacts": {
      "get": {
        "tags": [
          "Kişi"
        ],
        "summary": "Kişi listesi",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Sayfa",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Kayıt sayısı",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/contacts/ids": {
      "get": {
        "tags": [
          "Kişi"
        ],
        "summary": "Kişi kimlikleri",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/contacts/contact": {
      "get": {
        "tags": [
          "Kişi"
        ],
        "summary": "Kişi bilgisi",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chatId",
            "in": "query",
            "required": true,
            "description": "905321234567, ...@c.us veya ...@g.us",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/contacts/check": {
      "get": {
        "tags": [
          "Kişi"
        ],
        "summary": "Numara WhatsApp kullanıyor mu",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chatId",
            "in": "query",
            "required": true,
            "description": "905321234567, ...@c.us veya ...@g.us",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/contacts/invalid": {
      "get": {
        "tags": [
          "Kişi"
        ],
        "summary": "WhatsApp kullanmayan numaralar",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/contacts/image": {
      "get": {
        "tags": [
          "Kişi"
        ],
        "summary": "Profil resmi adresi",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chatId",
            "in": "query",
            "required": true,
            "description": "905321234567, ...@c.us veya ...@g.us",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/groups/ids": {
      "get": {
        "tags": [
          "Takip"
        ],
        "summary": "Grup kimlikleri",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/groups/group": {
      "get": {
        "tags": [
          "Takip"
        ],
        "summary": "Grup ayrıntısı ve üyeler",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "description": "Gizli anahtar (veya X-Api-Token başlığı)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "description": "...@g.us",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        }
      }
    },
    "/{instanceId}/media/upload": {
      "post": {
        "tags": [
          "Medya"
        ],
        "summary": "Dosya yükle",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "file": {
                    "type": "string",
                    "description": "multipart dosya veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı"
                  }
                },
                "required": [
                  "file"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "file": {
                    "type": "string",
                    "description": "multipart dosya veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı"
                  }
                },
                "required": [
                  "file"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "file": {
                    "type": "string",
                    "description": "multipart dosya veya base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Dosya adı"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          },
          "413": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/media/delete": {
      "post": {
        "tags": [
          "Medya"
        ],
        "summary": "Yüklenen dosyayı sil",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "url": {
                    "type": "string",
                    "description": "Yükleme yanıtındaki adres"
                  }
                },
                "required": [
                  "url"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "url": {
                    "type": "string",
                    "description": "Yükleme yanıtındaki adres"
                  }
                },
                "required": [
                  "url"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "url": {
                    "type": "string",
                    "description": "Yükleme yanıtındaki adres"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    },
    "/{instanceId}/media/deleteByDate": {
      "post": {
        "tags": [
          "Medya"
        ],
        "summary": "Tarihten önceki dosyaları sil",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "date": {
                    "type": "string",
                    "description": "yyyy-MM-dd"
                  }
                },
                "required": [
                  "date"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "date": {
                    "type": "string",
                    "description": "yyyy-MM-dd"
                  }
                },
                "required": [
                  "date"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gizli anahtar"
                  },
                  "date": {
                    "type": "string",
                    "description": "yyyy-MM-dd"
                  }
                },
                "required": [
                  "date"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tamam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Hata"
          },
          "401": {
            "$ref": "#/components/responses/Hata"
          },
          "403": {
            "$ref": "#/components/responses/Hata"
          },
          "409": {
            "$ref": "#/components/responses/Hata"
          },
          "429": {
            "$ref": "#/components/responses/Hata"
          },
          "502": {
            "$ref": "#/components/responses/Hata"
          }
        },
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inst[0-9]+$"
            },
            "example": "inst1001"
          }
        ]
      }
    }
  },
  "security": [
    {
      "ApiToken": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Token"
      }
    },
    "schemas": {
      "Gonderim": {
        "type": "object",
        "properties": {
          "sent": {
            "type": "string",
            "example": "true"
          },
          "message": {
            "type": "string",
            "example": "ok"
          },
          "id": {
            "type": "integer",
            "example": 1234
          }
        }
      },
      "Hata": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    },
    "responses": {
      "Hata": {
        "description": "Hata",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Hata"
            }
          }
        }
      }
    }
  }
}
