{
  "openapi": "3.0.0",
  "info": {
    "title": "Netsipp Public API",
    "description": "Public API for Netsipp. Authenticate every request with an API key sent as a Bearer token (`Authorization: Bearer {api_key}`). Each endpoint additionally requires the API user to hold the relevant permission.",
    "contact": {
      "name": "Netsipp Support",
      "email": "teknikdestek@netgsm.com.tr"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.netsipp.com",
      "description": "Public API server"
    }
  ],
  "paths": {
    "/v1/accounts": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "List organization accounts",
        "description": "Paginated list of the API key's organization accounts (members), including the organization owner. Filters: name, surname, email, and a generic `search`. Authenticated by API key.",
        "operationId": "listAccounts",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "surname",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Per page (default 15, max 100)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated accounts",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Account"
                      }
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/breaks": {
      "get": {
        "tags": [
          "Breaks"
        ],
        "summary": "List breaks",
        "description": "Lists the organization's (non-system) breaks. Filters: name, status, search, page, per_page. Requires `api_user|break_view`.",
        "operationId": "listBreaks",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated breaks",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Break"
                      }
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Breaks"
        ],
        "summary": "Create a break",
        "description": "Requires `api_user|break_create`. Name must be 3-50 alphanumeric chars, unique within the organization, and not a reserved name (ACW, NotReady, Logout, AutoPause).",
        "operationId": "createBreak",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "name",
                  "color",
                  "duration"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Lunch",
                    "maxLength": 50,
                    "minLength": 3
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255
                  },
                  "color": {
                    "description": "7-char hex color",
                    "type": "string",
                    "example": "#FF5733"
                  },
                  "duration": {
                    "description": "Duration in seconds",
                    "type": "integer",
                    "example": 900
                  },
                  "status": {
                    "type": "boolean",
                    "example": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Break"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error (e.g. name already used or reserved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/breaks/{id}": {
      "get": {
        "tags": [
          "Breaks"
        ],
        "summary": "Show a break",
        "description": "Returns a single break. Requires `api_user|break_view`.",
        "operationId": "getBreak",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated break id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Break",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Break"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Breaks"
        ],
        "summary": "Delete a break",
        "description": "Soft-deletes the break. System breaks cannot be deleted (403). Requires `api_user|break_delete`.",
        "operationId": "deleteBreak",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated break id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission or system break",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Breaks"
        ],
        "summary": "Update a break",
        "description": "Partial update; at least one field required. System breaks cannot be updated (403). Requires `api_user|break_update`.",
        "operationId": "updateBreak",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated break id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 50,
                    "minLength": 3
                  },
                  "description": {
                    "type": "string",
                    "nullable": true
                  },
                  "color": {
                    "type": "string",
                    "example": "#FF5733"
                  },
                  "duration": {
                    "type": "integer",
                    "example": 900
                  },
                  "status": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Break"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission or system break",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/call-scripts": {
      "get": {
        "tags": [
          "Call Scripts"
        ],
        "summary": "List call scripts",
        "description": "Lists the organization's call scripts (with their steps). Filters: name, is_active, search, page, limit. Requires `api_user|call_script_view`.",
        "operationId": "listCallScripts",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Matched against name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated call scripts",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CallScript"
                      }
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Call Scripts"
        ],
        "summary": "Create a call script",
        "description": "Creates a call script with at least one ordered step. Requires `api_user|call_script_create`.",
        "operationId": "createCallScript",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "name",
                  "steps"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Outbound sales opener",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "nullable": true
                  },
                  "is_active": {
                    "type": "boolean",
                    "example": true
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "required": [
                        "label",
                        "text"
                      ],
                      "properties": {
                        "label": {
                          "type": "string",
                          "example": "Greeting",
                          "maxLength": 255
                        },
                        "text": {
                          "type": "string",
                          "example": "Hello, thank you for taking the call..."
                        },
                        "quote": {
                          "type": "string",
                          "nullable": true
                        },
                        "order": {
                          "type": "integer",
                          "nullable": true,
                          "minimum": 0
                        }
                      },
                      "type": "object"
                    },
                    "minItems": 1
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallScript"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/call-scripts/{id}": {
      "get": {
        "tags": [
          "Call Scripts"
        ],
        "summary": "Show a call script",
        "description": "Returns a call script with its ordered steps. Requires `api_user|call_script_view`.",
        "operationId": "getCallScript",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated call script id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Call script",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallScript"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Call Scripts"
        ],
        "summary": "Delete a call script",
        "description": "Soft-deletes the call script. Requires `api_user|call_script_delete`.",
        "operationId": "deleteCallScript",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated call script id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Call Scripts"
        ],
        "summary": "Update a call script (partial)",
        "description": "Partial update: send only the fields you want to change (at least one is required). When `steps` is provided it REPLACES the whole step set (steps are not merged); omit it to leave steps untouched. Requires `api_user|call_script_update`.",
        "operationId": "updateCallScript",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated call script id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "nullable": true
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "required": [
                        "label",
                        "text"
                      ],
                      "properties": {
                        "label": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "text": {
                          "type": "string"
                        },
                        "quote": {
                          "type": "string",
                          "nullable": true
                        },
                        "order": {
                          "type": "integer",
                          "nullable": true,
                          "minimum": 0
                        }
                      },
                      "type": "object"
                    },
                    "minItems": 1
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallScript"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "List contacts",
        "description": "Lists the organization's contacts. Filters: name, email, phone, is_blacklisted, page, per_page. Requires `api_user|contact_view`.",
        "operationId": "listContacts",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_blacklisted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated contacts",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Contact"
                      }
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Create a contact",
        "description": "Requires `api_user|contact_create`. `form_values` holds custom (dynamic-form) fields.",
        "operationId": "createContact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Ada Lovelace",
                    "maxLength": 30,
                    "minLength": 3
                  },
                  "email": {
                    "type": "string",
                    "example": "ada@example.com",
                    "nullable": true
                  },
                  "address": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 300
                  },
                  "phone_numbers": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "example": [
                      "+905321234567"
                    ]
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 500
                  },
                  "is_blacklisted": {
                    "type": "boolean"
                  },
                  "form_values": {
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission or contact limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error (e.g. phone already used)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/contacts/{id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Show a contact",
        "description": "Returns a contact with groups and custom form values. Requires `api_user|contact_view`.",
        "operationId": "getContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated contact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Delete a contact",
        "description": "Soft-deletes the contact. Requires `api_user|contact_delete`.",
        "operationId": "deleteContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated contact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Contacts"
        ],
        "summary": "Update a contact",
        "description": "Partial update; at least one field required. `form_values` is optional — only the submitted custom fields are updated and required fields are NOT enforced on update (they are enforced on create). Omit form_values to leave custom fields untouched. Requires `api_user|contact_update`.",
        "operationId": "updateContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated contact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 30
                  },
                  "email": {
                    "type": "string",
                    "nullable": true
                  },
                  "address": {
                    "type": "string",
                    "nullable": true
                  },
                  "phone_numbers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "description": {
                    "type": "string",
                    "nullable": true
                  },
                  "is_blacklisted": {
                    "type": "boolean"
                  },
                  "form_values": {
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/contacts/{id}/blacklist": {
      "patch": {
        "tags": [
          "Contacts"
        ],
        "summary": "Toggle contact blacklist",
        "description": "Sets the is_blacklisted flag only. Requires `api_user|contact_blacklist`.",
        "operationId": "blacklistContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated contact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "is_blacklisted"
                ],
                "properties": {
                  "is_blacklisted": {
                    "type": "boolean",
                    "example": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/contacts/{id}/tickets": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "List a contact's tickets",
        "description": "Up to 50 tickets belonging to the contact. Requires `api_user|contact_view_tickets`.",
        "operationId": "listContactTickets",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated contact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tickets"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/contacts/{id}/activity-logs": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Contact activity logs",
        "description": "Audit trail for the contact and its tickets (paginated: page, limit). Requires `api_user|contact_activity_logs`.",
        "operationId": "listContactActivityLogs",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated contact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Activity log entries"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/originate": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Originate",
        "description": "Independently dials an internal extension and a customer number and bridges them once both answer. `originate_order` picks which side is dialed first (`if` = extension first, `of` = customer first).\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmOriginateGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmCustomerNum"
          },
          {
            "$ref": "#/components/parameters/CrmInternalNum"
          },
          {
            "$ref": "#/components/parameters/CrmRingTimeout"
          },
          {
            "$ref": "#/components/parameters/CrmWaitResponse"
          },
          {
            "$ref": "#/components/parameters/CrmOriginateOrder"
          },
          {
            "$ref": "#/components/parameters/CrmTrunk"
          },
          {
            "$ref": "#/components/parameters/CrmCallTime"
          },
          {
            "$ref": "#/components/parameters/CrmHideCallerId"
          },
          {
            "$ref": "#/components/parameters/CrmCallerText"
          },
          {
            "$ref": "#/components/parameters/CrmCalledText"
          },
          {
            "$ref": "#/components/parameters/CrmCallerRecord"
          },
          {
            "$ref": "#/components/parameters/CrmCalledRecord"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCallResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Originate",
        "description": "Independently dials an internal extension and a customer number and bridges them once both answer. `originate_order` picks which side is dialed first (`if` = extension first, `of` = customer first).\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmOriginatePost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmOriginateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCallResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/linkup": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Linkup",
        "description": "Bridges two free-form numbers (`caller` and `called`) over a trunk. Unlike `originate`, either side may be an outside number.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmLinkupGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmCaller"
          },
          {
            "$ref": "#/components/parameters/CrmCalled"
          },
          {
            "$ref": "#/components/parameters/CrmRingTimeout"
          },
          {
            "$ref": "#/components/parameters/CrmWaitResponse"
          },
          {
            "$ref": "#/components/parameters/CrmOriginateOrder"
          },
          {
            "$ref": "#/components/parameters/CrmTrunk"
          },
          {
            "$ref": "#/components/parameters/CrmCallTime"
          },
          {
            "$ref": "#/components/parameters/CrmCallerText"
          },
          {
            "$ref": "#/components/parameters/CrmCalledText"
          },
          {
            "$ref": "#/components/parameters/CrmCallerRecord"
          },
          {
            "$ref": "#/components/parameters/CrmCalledRecord"
          },
          {
            "$ref": "#/components/parameters/CrmWarningFile"
          },
          {
            "$ref": "#/components/parameters/CrmWarningRemainingSecond"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCallResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Linkup",
        "description": "Bridges two free-form numbers (`caller` and `called`) over a trunk. Unlike `originate`, either side may be an outside number.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmLinkupPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmLinkupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCallResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/local": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Local",
        "description": "Dials two internal extensions of the same PBX against each other (no trunk involved).\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmLocalGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmCaller"
          },
          {
            "$ref": "#/components/parameters/CrmCalled"
          },
          {
            "$ref": "#/components/parameters/CrmRingTimeout"
          },
          {
            "$ref": "#/components/parameters/CrmWaitResponse"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCallResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Local",
        "description": "Dials two internal extensions of the same PBX against each other (no trunk involved).\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmLocalPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmLocalRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCallResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/dynamic_redirect": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Dynamic redirect",
        "description": "Dials `called` and bridges the call into the target named by `redirect_type` + `redirect_menu`. The full target name is derived upstream: `queue` -> `{hizmetNumarasi}-queue-{redirect_menu}`, `announcement` -> `{hizmetNumarasi}-announcement-{redirect_menu}`, `ivr` -> `{redirect_menu}-{hizmetNumarasi}`. If the target or trunk is not defined on the PBX, the response has `code: \"70\"`. If `brandcode` and `filter` are both sent, an IYS (İleti Yönetim Sistemi) permission check runs first; a number without permission returns `code: \"50\"` (IYS RED) and the call is not placed.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmDynamicRedirectGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmCalled"
          },
          {
            "$ref": "#/components/parameters/CrmRedirectMenu"
          },
          {
            "$ref": "#/components/parameters/CrmRedirectType"
          },
          {
            "$ref": "#/components/parameters/CrmRingTimeout"
          },
          {
            "$ref": "#/components/parameters/CrmWaitResponse"
          },
          {
            "$ref": "#/components/parameters/CrmTrunk"
          },
          {
            "$ref": "#/components/parameters/CrmPrefix"
          },
          {
            "$ref": "#/components/parameters/CrmCallerId"
          },
          {
            "$ref": "#/components/parameters/CrmCallerText"
          },
          {
            "$ref": "#/components/parameters/CrmCalledText"
          },
          {
            "$ref": "#/components/parameters/CrmCallerRecord"
          },
          {
            "$ref": "#/components/parameters/CrmCalledRecord"
          },
          {
            "$ref": "#/components/parameters/CrmBrandCode"
          },
          {
            "$ref": "#/components/parameters/CrmFilter"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCallResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Dynamic redirect",
        "description": "Dials `called` and bridges the call into the target named by `redirect_type` + `redirect_menu`. The full target name is derived upstream: `queue` -> `{hizmetNumarasi}-queue-{redirect_menu}`, `announcement` -> `{hizmetNumarasi}-announcement-{redirect_menu}`, `ivr` -> `{redirect_menu}-{hizmetNumarasi}`. If the target or trunk is not defined on the PBX, the response has `code: \"70\"`. If `brandcode` and `filter` are both sent, an IYS (İleti Yönetim Sistemi) permission check runs first; a number without permission returns `code: \"50\"` (IYS RED) and the call is not placed.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmDynamicRedirectPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmDynamicRedirectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCallResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/hangup": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Hangup",
        "description": "Hangs up the call identified by `unique_id`. netcrm first tries the last channel of the call, then falls back to the first channel if that fails.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmHangupGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmUniqueId"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Hangup",
        "description": "Hangs up the call identified by `unique_id`. netcrm first tries the last channel of the call, then falls back to the first channel if that fails.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmHangupPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmHangupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/xfer": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Xfer",
        "description": "Blind-transfers the active call to `exten` without consulting the other party first.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmXferGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmUniqueId"
          },
          {
            "$ref": "#/components/parameters/CrmExten"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Xfer",
        "description": "Blind-transfers the active call to `exten` without consulting the other party first.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmXferPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmXferRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/atxfer": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Atxfer",
        "description": "Attended-transfers the active call to `exten`, consulting the target extension before completing the transfer.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmAtXferGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmUniqueId"
          },
          {
            "$ref": "#/components/parameters/CrmExten"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Atxfer",
        "description": "Attended-transfers the active call to `exten`, consulting the target extension before completing the transfer.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmAtXferPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmAtXferRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/muteaudio": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Muteaudio",
        "description": "Mutes or unmutes one audio direction of the given call.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmMuteAudioGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmUniqueId"
          },
          {
            "$ref": "#/components/parameters/CrmMuteDirection"
          },
          {
            "$ref": "#/components/parameters/CrmMuteState"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Muteaudio",
        "description": "Mutes or unmutes one audio direction of the given call.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmMuteAudioPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmMuteAudioRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/playdtmf": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Playdtmf",
        "description": "Sends `digit` as DTMF tones to the call, one digit at a time. If any digit fails to send, the operation aborts mid-way and returns an error naming that digit.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmPlayDtmfGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmUniqueId"
          },
          {
            "$ref": "#/components/parameters/CrmDtmfDirection"
          },
          {
            "$ref": "#/components/parameters/CrmDigit"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Playdtmf",
        "description": "Sends `digit` as DTMF tones to the call, one digit at a time. If any digit fails to send, the operation aborts mid-way and returns an error naming that digit.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmPlayDtmfPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmPlayDtmfRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/queuestats": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Queuestats",
        "description": "Returns live status and statistics for the given queues. When `queue` is omitted, every queue on the PBX is listed. Queue names are given in their short form and are resolved upstream as `{hizmetNumarasi}-queue-{queue}`; if one of them does not exist, the response has `code: \"70\"`. If the AMI connection to the PBX cannot be established, `code: \"90\"` is returned. Unlike every other command, the success body has no `status`/`message` fields — on failure a CrmBaseResponse is returned instead.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmQueueStatsGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmQueueOptional"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim: queue statistics on success, or a CrmBaseResponse on error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CrmQueueStatsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/CrmBaseResponse"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Queuestats",
        "description": "Returns live status and statistics for the given queues. When `queue` is omitted, every queue on the PBX is listed. Queue names are given in their short form and are resolved upstream as `{hizmetNumarasi}-queue-{queue}`; if one of them does not exist, the response has `code: \"70\"`. If the AMI connection to the PBX cannot be established, `code: \"90\"` is returned. Unlike every other command, the success body has no `status`/`message` fields — on failure a CrmBaseResponse is returned instead.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmQueueStatsPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmQueueStatsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim: queue statistics on success, or a CrmBaseResponse on error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CrmQueueStatsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/CrmBaseResponse"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/agentlogin": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Agentlogin",
        "description": "Adds one or more extensions (`exten`) as members of one or more queues (`queue`). Both fields accept a comma-separated list.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmAgentLoginGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmExtenList"
          },
          {
            "$ref": "#/components/parameters/CrmQueueList"
          },
          {
            "$ref": "#/components/parameters/CrmPenalty"
          },
          {
            "$ref": "#/components/parameters/CrmPaused"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Agentlogin",
        "description": "Adds one or more extensions (`exten`) as members of one or more queues (`queue`). Both fields accept a comma-separated list.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmAgentLoginPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmAgentLoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/agentlogoff": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Agentlogoff",
        "description": "Removes one or more extensions (`exten`) as members of one or more queues (`queue`).\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmAgentLogoffGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmExtenList"
          },
          {
            "$ref": "#/components/parameters/CrmQueueList"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Agentlogoff",
        "description": "Removes one or more extensions (`exten`) as members of one or more queues (`queue`).\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmAgentLogoffPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmAgentLogoffRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/agentpause": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Agentpause",
        "description": "Pauses or unpauses an agent on one or more queues. `paused` = `1` pauses the agent, `0` unpauses. Turkish characters in `reason` are ASCII-folded upstream.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmAgentPauseGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmExtenList"
          },
          {
            "$ref": "#/components/parameters/CrmQueueList"
          },
          {
            "$ref": "#/components/parameters/CrmPaused"
          },
          {
            "$ref": "#/components/parameters/CrmReason"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Agentpause",
        "description": "Pauses or unpauses an agent on one or more queues. `paused` = `1` pauses the agent, `0` unpauses. Turkish characters in `reason` are ASCII-folded upstream.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmAgentPausePost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmAgentPauseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/crm/{hizmetNumarasi}/conferencelist": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Conferencelist",
        "description": "Queries whether the named conference room exists/is active over AMI. The participant list itself is not returned in the response, only the query result.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmConferenceListGet",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          },
          {
            "$ref": "#/components/parameters/CrmCrmId"
          },
          {
            "$ref": "#/components/parameters/CrmConferenceName"
          }
        ],
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Conferencelist",
        "description": "Queries whether the named conference room exists/is active over AMI. The participant list itself is not returned in the response, only the query result.\n\nRequires `api_user|crm_access`. Requests can be long-running: netcrm holds the connection until the call is answered or the `ring_timeout` / `wait_response` windows (both in seconds) elapse. The gateway timeout is 120s (`CRM_SERVICE_TIMEOUT`).",
        "operationId": "crmConferenceListPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/CrmHizmetNumarasi"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmConferenceListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CRM service response, returned verbatim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmBaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing `api_user|crm_access`, or the service no does not belong to your organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "CRM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "CRM service unreachable / timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/interactions": {
      "get": {
        "tags": [
          "Interactions"
        ],
        "summary": "List interactions",
        "description": "Lists the organization's interactions (calls, chats, emails, ...), newest first. Filters: interaction_type (single or array), direction, status, contact_id (obfuscated), channel_id (obfuscated), has_tickets, started_at (single date or \"start,end\" range), page, limit. Timeline items are NOT included in the list. Requires `api_user|interaction_view`.",
        "operationId": "listInteractions",
        "parameters": [
          {
            "name": "interaction_type",
            "in": "query",
            "description": "call|chat|email|system|voicemail (repeatable)",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "call",
                "chat",
                "email",
                "system",
                "voicemail"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "true = open, false = closed",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "description": "Obfuscated contact id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "query",
            "description": "Obfuscated channel id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "has_tickets",
            "in": "query",
            "description": "Only interactions linked to a ticket",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "started_at",
            "in": "query",
            "description": "Date or \"start,end\" range",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated interactions",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Interaction"
                      }
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/interactions/{id}": {
      "get": {
        "tags": [
          "Interactions"
        ],
        "summary": "Show an interaction",
        "description": "Returns a single interaction with its contact, channel, participating agents, linked tickets and full timeline items (ordered by occurred_at). Requires `api_user|interaction_view`.",
        "operationId": "getInteraction",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated interaction id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Interaction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Interaction"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/me": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Return the authenticated API client",
        "description": "Returns the identity associated with the supplied API key. Useful for verifying that a key is valid and active.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "Authenticated API client",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ApiClient"
                    },
                    "message": {
                      "type": "string",
                      "example": "Success."
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List projects",
        "description": "Lists the projects of the API key's organization. Supports filters: name, key, is_active, and a generic `search` (name/key). Requires the \"View Project\" permission.",
        "operationId": "listProjects",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Filter by name (partial match)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "query",
            "description": "Filter by key (partial match)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "description": "Filter by active flag",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search across name and key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of projects",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Project"
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Success."
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "description": "Creates a project (plus its default ticket form and statuses). Requires the \"Create Project\" permission.",
        "operationId": "createProject",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "name",
                  "key",
                  "manager_id"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Support",
                    "maxLength": 255
                  },
                  "key": {
                    "type": "string",
                    "example": "SUP",
                    "maxLength": 10
                  },
                  "manager_id": {
                    "description": "Obfuscated account id",
                    "type": "string",
                    "example": "q8Rk2Lm9p"
                  },
                  "logo": {
                    "description": "Logo URL",
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Project"
                    },
                    "message": {
                      "type": "string",
                      "example": "Project created successfully."
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission or project limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/projects/{id}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Show a project",
        "description": "Returns a single project with manager, members, statuses and tags. Requires the \"View Project\" permission.",
        "operationId": "getProject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Project"
                    },
                    "message": {
                      "type": "string",
                      "example": "Success."
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "description": "Updates name, manager and logo (the key is immutable). Requires the \"Update Project\" permission.",
        "operationId": "updateProject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "name",
                  "manager_id"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Support",
                    "maxLength": 255
                  },
                  "manager_id": {
                    "description": "Obfuscated account id",
                    "type": "string",
                    "example": "q8Rk2Lm9p"
                  },
                  "logo": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "description": "Soft-deletes the project. Requires the \"Delete Project\" permission.",
        "operationId": "deleteProject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/projects/{id}/ticket-statistics": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Project ticket statistics",
        "description": "Returns ticket counts grouped by status, priority and tag. Requires the \"Project Statistics\" permission.",
        "operationId": "getProjectTicketStatistics",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Statistics",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 42
                        },
                        "by_status": {
                          "type": "object"
                        },
                        "by_priority": {
                          "type": "object"
                        },
                        "by_tag": {
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "message": {
                      "type": "string",
                      "example": "Success."
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/projects/{id}/members": {
      "put": {
        "tags": [
          "Projects"
        ],
        "summary": "Add project members",
        "description": "Adds users/accounts to the project (without detaching existing members). Requires the \"Project User Management\" permission.",
        "operationId": "addProjectMembers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "members"
                ],
                "properties": {
                  "members": {
                    "type": "array",
                    "items": {
                      "required": [
                        "id",
                        "type"
                      ],
                      "properties": {
                        "id": {
                          "description": "Obfuscated user/account id",
                          "type": "string",
                          "example": "q8Rk2Lm9p"
                        },
                        "type": {
                          "type": "string",
                          "example": "user",
                          "enum": [
                            "user",
                            "account"
                          ]
                        }
                      },
                      "type": "object"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project with members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error / member not in organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Remove a project member",
        "description": "Removes a single user/account from the project. The project manager cannot be removed. Requires the \"Project User Management\" permission.",
        "operationId": "removeProjectMember",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "member_id",
                  "member_type"
                ],
                "properties": {
                  "member_id": {
                    "description": "Obfuscated user/account id",
                    "type": "string",
                    "example": "q8Rk2Lm9p"
                  },
                  "member_type": {
                    "type": "string",
                    "example": "user",
                    "enum": [
                      "user",
                      "account"
                    ]
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project with members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Cannot remove the project manager",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/quick-replies": {
      "get": {
        "tags": [
          "QuickReplies"
        ],
        "summary": "List quick replies",
        "description": "Lists the organization-wide quick replies. Filters: search (title/shortcut/content), channel, is_active, page, limit. Requires `api_user|quick_reply_view`.",
        "operationId": "listQuickReplies",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated quick replies",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuickReply"
                      }
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "QuickReplies"
        ],
        "summary": "Create a quick reply",
        "description": "Creates an organization-wide quick reply. Requires `api_user|quick_reply_create`. `shortcut` must be unique within the organization.",
        "operationId": "createQuickReply",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "title",
                  "content"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "example": "Karşılama mesajı",
                    "maxLength": 150
                  },
                  "shortcut": {
                    "type": "string",
                    "example": "/merhaba",
                    "nullable": true,
                    "maxLength": 50
                  },
                  "content": {
                    "type": "string",
                    "example": "Merhaba, size nasıl yardımcı olabilirim?"
                  },
                  "channel_keys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "example": [
                      "email",
                      "sms"
                    ]
                  },
                  "is_active": {
                    "type": "boolean",
                    "example": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickReply"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error (e.g. shortcut already used)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/quick-replies/{id}": {
      "get": {
        "tags": [
          "QuickReplies"
        ],
        "summary": "Show a quick reply",
        "description": "Returns a single organization-wide quick reply. Requires `api_user|quick_reply_view`.",
        "operationId": "getQuickReply",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated quick-reply id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Quick reply",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickReply"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "QuickReplies"
        ],
        "summary": "Delete a quick reply",
        "description": "Soft-deletes the quick reply. Requires `api_user|quick_reply_delete`.",
        "operationId": "deleteQuickReply",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated quick-reply id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "QuickReplies"
        ],
        "summary": "Update a quick reply",
        "description": "Partial update; at least one field required. Requires `api_user|quick_reply_update`.",
        "operationId": "updateQuickReply",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated quick-reply id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "shortcut": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 50
                  },
                  "content": {
                    "type": "string"
                  },
                  "channel_keys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    }
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickReply"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/projects/{projectId}/statuses": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "List project ticket statuses",
        "description": "Ticket statuses (kanban columns) of a project, ordered. Use a returned status `id` when creating/updating a ticket. Requires `api_user|ticket_status_view`.",
        "operationId": "listProjectStatuses",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Statuses",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketStatus"
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Success."
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/projects/{projectId}/tickets": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "List project tickets",
        "description": "Paginated tickets of a project. Filters: priority, assigned_to, created_at (single date or \"start,end\"), number (contact phone number; last 10 significant digits matched), and a generic `search` (ticket_key). Requires `api_user|ticket_view`.",
        "operationId": "listTickets",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ]
            }
          },
          {
            "name": "assigned_to",
            "in": "query",
            "description": "Obfuscated user id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "description": "Date or \"start,end\" range",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "description": "Contact phone number. Non-digits are stripped and the last 10 significant digits are matched, so \"+90 532 123 45 67\", \"05321234567\" and \"5321234567\" are equivalent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated tickets",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Ticket"
                      }
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Tickets"
        ],
        "summary": "Create a ticket",
        "description": "Creates a ticket in the project (generates ticket_key/number/order). `form_values` custom fields are validated (required enforced). Requires `api_user|ticket_create`.",
        "operationId": "createTicket",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "status_id",
                  "priority"
                ],
                "properties": {
                  "status_id": {
                    "description": "Obfuscated status id (must belong to the project)",
                    "type": "string"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  },
                  "assigned_to": {
                    "description": "Obfuscated user id",
                    "type": "string",
                    "nullable": true
                  },
                  "contact_id": {
                    "description": "Obfuscated contact id",
                    "type": "string",
                    "nullable": true
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "type": "object"
                    }
                  },
                  "form_values": {
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error (status not in project, required custom field, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/projects/{projectId}/tickets/{id}": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Show a ticket",
        "description": "Returns a ticket with status, assignee, contact, tags and custom form values. Requires `api_user|ticket_view`.",
        "operationId": "getTicket",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated ticket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Tickets"
        ],
        "summary": "Delete a ticket",
        "description": "Soft-deletes the ticket. Requires `api_user|ticket_delete`.",
        "operationId": "deleteTicket",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated ticket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Tickets"
        ],
        "summary": "Update a ticket (partial)",
        "description": "Partial update: send only the fields you want to change (at least one is required). `assigned_to` sent as null unassigns; `tags` replaces the tag set; `form_values` upserts only the submitted custom fields (no required enforcement). Requires `api_user|ticket_update`.",
        "operationId": "updateTicket",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Obfuscated project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Obfuscated ticket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "status_id": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  },
                  "assigned_to": {
                    "type": "string",
                    "nullable": true
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "type": "object"
                    }
                  },
                  "form_values": {
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List organization users",
        "description": "Paginated list of the API key's organization users. Filters: name, email, is_active, and a generic `search`. Authenticated by API key.",
        "operationId": "listUsers",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Per page (default 15, max 100)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated users",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrganizationUser"
                      }
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Account": {
        "properties": {
          "id": {
            "description": "Obfuscated account id",
            "type": "string",
            "example": "q8Rk2Lm9p"
          },
          "name": {
            "type": "string",
            "example": "Ada"
          },
          "surname": {
            "type": "string",
            "example": "Lovelace",
            "nullable": true
          },
          "email": {
            "type": "string",
            "example": "ada@example.com"
          },
          "profile_picture": {
            "type": "string",
            "nullable": true
          },
          "last_login_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "type": "object"
      },
      "ApiClient": {
        "properties": {
          "id": {
            "description": "Obfuscated API user id",
            "type": "string",
            "example": "q8Rk2Lm9p"
          },
          "organization_id": {
            "description": "Obfuscated organization id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "name": {
            "type": "string",
            "example": "Billing integration",
            "nullable": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "type": "object"
      },
      "Break": {
        "properties": {
          "id": {
            "description": "Obfuscated break id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "name": {
            "type": "string",
            "example": "Lunch"
          },
          "description": {
            "type": "string",
            "example": "Lunch break",
            "nullable": true
          },
          "color": {
            "description": "7-char hex color",
            "type": "string",
            "example": "#FF5733",
            "nullable": true
          },
          "duration": {
            "description": "Duration in seconds",
            "type": "integer",
            "example": 900
          },
          "status": {
            "type": "boolean",
            "example": true
          },
          "is_system": {
            "description": "System breaks are read-only",
            "type": "boolean",
            "example": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "CallScript": {
        "properties": {
          "id": {
            "description": "Obfuscated call script id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "name": {
            "type": "string",
            "example": "Outbound sales opener"
          },
          "description": {
            "type": "string",
            "example": "Script for first-contact sales calls",
            "nullable": true
          },
          "is_active": {
            "type": "boolean",
            "example": true
          },
          "steps": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string",
                  "example": "q8Rk2Lm9p"
                },
                "order": {
                  "type": "integer",
                  "example": 0
                },
                "label": {
                  "type": "string",
                  "example": "Greeting"
                },
                "text": {
                  "type": "string",
                  "example": "Hello, thank you for taking the call..."
                },
                "quote": {
                  "type": "string",
                  "nullable": true
                }
              },
              "type": "object"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "ContactGroup": {
        "properties": {
          "id": {
            "type": "string",
            "example": "q8Rk2Lm9p"
          },
          "name": {
            "type": "string",
            "example": "VIP"
          }
        },
        "type": "object"
      },
      "Contact": {
        "properties": {
          "id": {
            "description": "Obfuscated contact id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "name": {
            "type": "string",
            "example": "Ada Lovelace"
          },
          "email": {
            "type": "string",
            "example": "ada@example.com",
            "nullable": true
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "+905321234567"
            }
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "is_blacklisted": {
            "type": "boolean",
            "example": false
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactGroup"
            }
          },
          "form_values": {
            "description": "Custom (dynamic-form) field values",
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "CrmAgentLoginRequest": {
        "description": "Adds one or more extensions (`exten`) as members of one or more queues (`queue`). Both fields accept a comma-separated list.",
        "required": [
          "crm_id",
          "exten",
          "queue",
          "penalty",
          "paused"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-3002"
          },
          "exten": {
            "description": "Comma-separated extension list.",
            "type": "string",
            "example": "101,102"
          },
          "queue": {
            "description": "Comma-separated queue name list (short form).",
            "type": "string",
            "example": "sales,support"
          },
          "penalty": {
            "description": "Priority (penalty) value within the queue.",
            "type": "string",
            "example": "0"
          },
          "paused": {
            "description": "Pause state to apply once the member is added.",
            "type": "string",
            "enum": [
              "0",
              "1"
            ]
          }
        },
        "type": "object"
      },
      "CrmAgentLogoffRequest": {
        "description": "Removes one or more extensions (`exten`) as members of one or more queues (`queue`).",
        "required": [
          "crm_id",
          "exten",
          "queue"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-3003"
          },
          "exten": {
            "description": "Comma-separated extension list.",
            "type": "string"
          },
          "queue": {
            "description": "Comma-separated queue name list (short form).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrmAgentPauseRequest": {
        "description": "Pauses or unpauses an agent on one or more queues. `paused` = `1` pauses the agent, `0` unpauses. Turkish characters in `reason` are ASCII-folded upstream.",
        "required": [
          "crm_id",
          "exten",
          "queue",
          "paused",
          "reason"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-3004"
          },
          "exten": {
            "description": "Comma-separated extension list.",
            "type": "string"
          },
          "queue": {
            "description": "Comma-separated queue name list (short form).",
            "type": "string"
          },
          "paused": {
            "description": "1 = pause, 0 = unpause.",
            "type": "string",
            "enum": [
              "0",
              "1"
            ]
          },
          "reason": {
            "description": "Pause reason.",
            "type": "string",
            "example": "lunch"
          }
        },
        "type": "object"
      },
      "CrmAtXferRequest": {
        "description": "Attended-transfers the active call to `exten`, consulting the target extension before completing the transfer.",
        "required": [
          "crm_id",
          "unique_id",
          "exten"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-2003"
          },
          "unique_id": {
            "description": "Unique id of the call to transfer.",
            "type": "string"
          },
          "exten": {
            "description": "Target extension to consult and transfer to.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrmBaseResponse": {
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "crm_id": {
            "description": "Operation id sent in the request.",
            "type": "string"
          },
          "response": {
            "description": "Name of the command that produced this response.",
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "Error"
            ]
          },
          "message": {
            "description": "Human-readable description.",
            "type": "string"
          },
          "code": {
            "description": "Application error code (see schema description).",
            "type": "string",
            "enum": [
              "30",
              "50",
              "70",
              "90"
            ]
          }
        },
        "type": "object"
      },
      "CrmCallResponse": {
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "crm_id": {
            "description": "Operation id sent in the request.",
            "type": "string"
          },
          "response": {
            "description": "Name of the command that produced this response.",
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "Success",
              "Error"
            ]
          },
          "message": {
            "description": "Human-readable description.",
            "type": "string"
          },
          "code": {
            "description": "Application error code (see CrmBaseResponse description).",
            "type": "string",
            "enum": [
              "30",
              "50",
              "70",
              "90"
            ]
          },
          "unique_id": {
            "description": "Unique id of the created call (null on error).",
            "type": "string",
            "nullable": true
          },
          "caller_num": {
            "description": "Calling number.",
            "type": "string"
          },
          "called_num": {
            "description": "Called number.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrmConferenceListRequest": {
        "description": "Queries whether the named conference room exists/is active over AMI. The participant list itself is not returned, only the query result.",
        "required": [
          "crm_id",
          "conferencename"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-4001"
          },
          "conferencename": {
            "description": "Conference room name.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrmDynamicRedirectRequest": {
        "description": "Dials `called` and bridges the call to the target named by `redirect_type` + `redirect_menu`. The full target name is derived upstream: `queue` -> `{hizmetNumarasi}-queue-{redirect_menu}`, `announcement` -> `{hizmetNumarasi}-announcement-{redirect_menu}`, `ivr` -> `{redirect_menu}-{hizmetNumarasi}`. If the target or trunk is not defined on the PBX, the response has `code: \"70\"`. If `brandcode` and `filter` are both sent, an IYS permission check runs first; a number without permission returns `code: \"50\"` (IYS RED) and the call is not placed.",
        "required": [
          "crm_id",
          "called",
          "redirect_menu",
          "redirect_type",
          "ring_timeout",
          "wait_response",
          "trunk"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-1004"
          },
          "called": {
            "description": "Number to call.",
            "type": "string"
          },
          "redirect_menu": {
            "description": "Target menu/queue/IVR name (short form).",
            "type": "string"
          },
          "redirect_type": {
            "description": "Target type; determines how the full upstream target name is derived.",
            "type": "string",
            "enum": [
              "queue",
              "announcement",
              "ivr"
            ]
          },
          "ring_timeout": {
            "description": "Ring duration in seconds.",
            "type": "integer"
          },
          "wait_response": {
            "description": "Answer wait duration in seconds.",
            "type": "integer"
          },
          "trunk": {
            "description": "Trunk name the call goes out on.",
            "type": "string"
          },
          "prefix": {
            "description": "Call prefix. If longer than 5 characters, only its first 4 characters are used.",
            "type": "string",
            "maxLength": 4
          },
          "callerid": {
            "description": "Calling number to present on the call.",
            "type": "string"
          },
          "caller_text": {
            "description": "Text to be read out (TTS) to the caller side.",
            "type": "string"
          },
          "called_text": {
            "description": "Text to be read out (TTS) to the called side.",
            "type": "string"
          },
          "caller_record": {
            "description": "Name of a recorded prompt to play to the caller side.",
            "type": "string"
          },
          "called_record": {
            "description": "Name of a recorded prompt to play to the called side.",
            "type": "string"
          },
          "brandcode": {
            "description": "IYS brand code (must be sent together with `filter`).",
            "type": "string"
          },
          "filter": {
            "description": "IYS recipient-type filter (must be sent together with `brandcode`).",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CrmHangupRequest": {
        "description": "Hangs up the call identified by `unique_id`. netcrm first tries the last channel of the call, then falls back to the first channel if that fails.",
        "required": [
          "crm_id",
          "unique_id"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-2001"
          },
          "unique_id": {
            "description": "Unique id of the call to hang up.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrmLinkupRequest": {
        "description": "Bridges two free-form numbers (`caller` and `called`) over a trunk. Unlike `originate`, either side may be an outside number.",
        "required": [
          "crm_id",
          "caller",
          "called",
          "ring_timeout",
          "wait_response",
          "originate_order",
          "trunk"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-1002"
          },
          "caller": {
            "description": "Calling party number.",
            "type": "string"
          },
          "called": {
            "description": "Called party number.",
            "type": "string"
          },
          "ring_timeout": {
            "description": "Ring duration in seconds.",
            "type": "integer"
          },
          "wait_response": {
            "description": "Answer wait duration in seconds.",
            "type": "integer"
          },
          "originate_order": {
            "description": "`if` = the first party is dialed first, `of` = the second party is dialed first.",
            "type": "string",
            "enum": [
              "if",
              "of"
            ]
          },
          "trunk": {
            "description": "Trunk name the call goes out on.",
            "type": "string"
          },
          "call_time": {
            "description": "Maximum talk duration in seconds.",
            "type": "integer",
            "default": 5400
          },
          "caller_text": {
            "description": "Text to be read out (TTS) to the caller side.",
            "type": "string"
          },
          "called_text": {
            "description": "Text to be read out (TTS) to the called side.",
            "type": "string"
          },
          "caller_record": {
            "description": "Name of a recorded prompt to play to the caller side.",
            "type": "string"
          },
          "called_record": {
            "description": "Name of a recorded prompt to play to the called side.",
            "type": "string"
          },
          "warning_file": {
            "description": "Warning audio file to play shortly before the call ends.",
            "type": "string"
          },
          "warning_remaining_second": {
            "description": "How many seconds before the call ends the warning is played.",
            "type": "integer",
            "default": 0
          }
        },
        "type": "object"
      },
      "CrmLocalRequest": {
        "description": "Dials two internal extensions of the same PBX against each other (no trunk involved).",
        "required": [
          "crm_id",
          "caller",
          "called",
          "ring_timeout",
          "wait_response"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-1003"
          },
          "caller": {
            "description": "Calling extension.",
            "type": "string"
          },
          "called": {
            "description": "Called extension.",
            "type": "string"
          },
          "ring_timeout": {
            "description": "Ring duration in seconds.",
            "type": "integer"
          },
          "wait_response": {
            "description": "Answer wait duration in seconds.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CrmMuteAudioRequest": {
        "description": "Mutes or unmutes one audio direction of the given call.",
        "required": [
          "crm_id",
          "unique_id",
          "direction",
          "state"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-2004"
          },
          "unique_id": {
            "description": "Unique id of the call.",
            "type": "string"
          },
          "direction": {
            "description": "Audio direction to mute/unmute.",
            "type": "string",
            "enum": [
              "in",
              "out",
              "all"
            ]
          },
          "state": {
            "description": "`on` mutes the audio, `off` unmutes it.",
            "type": "string",
            "enum": [
              "on",
              "off"
            ]
          }
        },
        "type": "object"
      },
      "CrmOriginateRequest": {
        "description": "Independently dials an internal extension and a customer number and bridges them once both answer.",
        "required": [
          "crm_id",
          "customer_num",
          "internal_num",
          "ring_timeout",
          "wait_response",
          "originate_order",
          "trunk"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-1001"
          },
          "customer_num": {
            "description": "Customer number to call.",
            "type": "string",
            "example": "5000000000"
          },
          "internal_num": {
            "description": "Internal extension that originates the call.",
            "type": "string",
            "example": "101"
          },
          "ring_timeout": {
            "description": "Ring duration in seconds.",
            "type": "integer",
            "example": 30
          },
          "wait_response": {
            "description": "Answer wait duration in seconds.",
            "type": "integer",
            "example": 30
          },
          "originate_order": {
            "description": "`if` = the internal extension is dialed first, `of` = the outside number is dialed first.",
            "type": "string",
            "enum": [
              "if",
              "of"
            ]
          },
          "trunk": {
            "description": "Trunk name the call goes out on.",
            "type": "string"
          },
          "call_time": {
            "description": "Maximum talk duration in seconds.",
            "type": "integer",
            "default": 5400
          },
          "hide_callerid": {
            "description": "1 hides the calling number.",
            "type": "integer",
            "default": 0,
            "enum": [
              0,
              1
            ]
          },
          "caller_text": {
            "description": "Text to be read out (TTS) to the caller side.",
            "type": "string"
          },
          "called_text": {
            "description": "Text to be read out (TTS) to the called side.",
            "type": "string"
          },
          "caller_record": {
            "description": "Name of a recorded prompt to play to the caller side.",
            "type": "string"
          },
          "called_record": {
            "description": "Name of a recorded prompt to play to the called side.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrmPlayDtmfRequest": {
        "description": "Sends `digit` as DTMF tones, one digit at a time. If any digit fails to send, the operation aborts mid-way and returns an error naming that digit.",
        "required": [
          "crm_id",
          "unique_id",
          "direction",
          "digit"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-2005"
          },
          "unique_id": {
            "description": "Unique id of the call.",
            "type": "string"
          },
          "direction": {
            "description": "`in` = towards the caller side, `out` = towards the called side.",
            "type": "string",
            "enum": [
              "in",
              "out"
            ]
          },
          "digit": {
            "description": "DTMF digits to send.",
            "type": "string",
            "example": "1234#"
          }
        },
        "type": "object"
      },
      "CrmQueue": {
        "properties": {
          "queuename": {
            "description": "Full upstream queue name (`{hizmetNumarasi}-queue-{queue}`).",
            "type": "string"
          },
          "callers": {
            "description": "Calls waiting in the queue - key is the call, value is its wait time in seconds.",
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmQueueAgent"
            }
          },
          "calls": {
            "description": "Number of calls currently waiting.",
            "type": "integer"
          },
          "holdtime": {
            "description": "Average hold time in seconds.",
            "type": "integer"
          },
          "talktime": {
            "description": "Average talk time in seconds.",
            "type": "integer"
          },
          "completed": {
            "description": "Number of completed calls.",
            "type": "integer"
          },
          "abondaned": {
            "description": "Number of abandoned calls.",
            "type": "integer"
          },
          "max": {
            "description": "Queue's maximum capacity.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CrmQueueAgent": {
        "properties": {
          "agent": {
            "description": "Agent's channel/extension.",
            "type": "string"
          },
          "status": {
            "description": "Agent's current status: `empty` = free, `onhook` = busy/on a call, `ringing` = phone is ringing, `onhold` = on hold, `unregister` = not registered, `invalid` = invalid.",
            "type": "string",
            "enum": [
              "empty",
              "onhook",
              "ringing",
              "onhold",
              "unregister",
              "invalid"
            ]
          },
          "membership": {
            "description": "Queue membership type (dynamic / static / realtime).",
            "type": "string"
          },
          "paused": {
            "description": "Whether paused (`true` / `false`).",
            "type": "string"
          },
          "reason": {
            "description": "Pause reason.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrmQueueStatsRequest": {
        "description": "Returns live status and statistics for the given queues. When `queue` is omitted, every queue on the PBX is listed. Queue names are given in their short form and are resolved upstream as `{hizmetNumarasi}-queue-{queue}`; if one of them does not exist, the response has `code: \"70\"`. If the AMI connection to the PBX cannot be established, `code: \"90\"` is returned.",
        "required": [
          "crm_id"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-3001"
          },
          "queue": {
            "description": "Comma-separated queue name list (short form). When omitted, all queues are listed.",
            "type": "string",
            "example": "sales,support"
          }
        },
        "type": "object"
      },
      "CrmQueueStatsResponse": {
        "required": [
          "pbx_num",
          "queues"
        ],
        "properties": {
          "crm_id": {
            "description": "Operation id sent in the request.",
            "type": "string"
          },
          "pbx_num": {
            "description": "PBX number.",
            "type": "string"
          },
          "queues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmQueue"
            }
          }
        },
        "type": "object"
      },
      "CrmXferRequest": {
        "description": "Blind-transfers the active call to `exten` without consulting the other party first.",
        "required": [
          "crm_id",
          "unique_id",
          "exten"
        ],
        "properties": {
          "crm_id": {
            "description": "Client-supplied operation id; echoed back verbatim.",
            "type": "string",
            "example": "req-2002"
          },
          "unique_id": {
            "description": "Unique id of the call to transfer.",
            "type": "string"
          },
          "exten": {
            "description": "Target extension to transfer to.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorResponse": {
        "properties": {
          "status": {
            "description": "Standard error envelope produced by ExceptionHandlerService.",
            "type": "boolean",
            "example": false
          },
          "message": {
            "type": "string",
            "example": "Unauthenticated."
          },
          "errors": {
            "type": "object"
          }
        },
        "type": "object"
      },
      "Interaction": {
        "properties": {
          "id": {
            "description": "Obfuscated interaction id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "interaction_type": {
            "type": "string",
            "example": "call",
            "enum": [
              "call",
              "chat",
              "email",
              "system",
              "voicemail"
            ]
          },
          "direction": {
            "type": "string",
            "example": "inbound",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "status": {
            "description": "true = open, false = closed",
            "type": "boolean",
            "example": true
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "ended_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "contact": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string",
                "nullable": true
              },
              "phone_numbers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "is_blacklisted": {
                "type": "boolean"
              }
            },
            "type": "object",
            "nullable": true
          },
          "channel": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "key": {
                "type": "string"
              },
              "icon": {
                "type": "string",
                "nullable": true
              }
            },
            "type": "object",
            "nullable": true
          },
          "users": {
            "description": "Participating agents",
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "role": {
                  "type": "string",
                  "nullable": true
                },
                "joined_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "left_at": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                }
              },
              "type": "object"
            }
          },
          "tickets": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "ticket_key": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          "items": {
            "description": "Timeline entries (detail endpoint only)",
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "item_type": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "content": {
                  "type": "string",
                  "nullable": true
                },
                "actor_type": {
                  "type": "string",
                  "nullable": true
                },
                "external_id": {
                  "type": "string",
                  "nullable": true
                },
                "metadata": {
                  "type": "object",
                  "nullable": true
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "type": "object"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "OrganizationUser": {
        "properties": {
          "id": {
            "description": "Obfuscated user id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "name": {
            "type": "string",
            "example": "Alan Turing"
          },
          "email": {
            "type": "string",
            "example": "alan@example.com"
          },
          "phone_number": {
            "type": "string",
            "nullable": true
          },
          "profile_picture": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "boolean",
            "example": true
          },
          "organization_id": {
            "type": "string",
            "example": "YZA6yBJB5"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "ProjectMember": {
        "properties": {
          "id": {
            "description": "Obfuscated member id",
            "type": "string",
            "example": "q8Rk2Lm9p"
          },
          "type": {
            "type": "string",
            "example": "user",
            "enum": [
              "user",
              "account"
            ]
          },
          "name": {
            "type": "string",
            "example": "Ada Lovelace"
          },
          "email": {
            "type": "string",
            "example": "ada@example.com",
            "nullable": true
          },
          "profile_picture": {
            "type": "string",
            "nullable": true
          }
        },
        "type": "object"
      },
      "Project": {
        "properties": {
          "id": {
            "description": "Obfuscated project id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "name": {
            "type": "string",
            "example": "Support"
          },
          "key": {
            "type": "string",
            "example": "SUP"
          },
          "logo": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "boolean",
            "example": true
          },
          "organization_id": {
            "type": "string",
            "example": "YZA6yBJB5"
          },
          "manager": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProjectMember"
              }
            ],
            "nullable": true
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectMember"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "QuickReply": {
        "properties": {
          "id": {
            "description": "Obfuscated quick-reply id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "title": {
            "type": "string",
            "example": "Karşılama mesajı"
          },
          "shortcut": {
            "description": "Shortcut, unique per organization",
            "type": "string",
            "example": "/merhaba",
            "nullable": true
          },
          "content": {
            "type": "string",
            "example": "Merhaba, size nasıl yardımcı olabilirim?"
          },
          "channel_keys": {
            "description": "Channels this reply applies to; empty means all",
            "type": "array",
            "items": {
              "type": "string",
              "example": "email"
            }
          },
          "is_active": {
            "type": "boolean",
            "example": true
          },
          "usage_count": {
            "description": "How many times the reply has been used",
            "type": "integer",
            "example": 0
          },
          "last_used_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "Ticket": {
        "properties": {
          "id": {
            "description": "Obfuscated ticket id",
            "type": "string",
            "example": "a1Bc3Df5g"
          },
          "ticket_key": {
            "type": "string",
            "example": "SUP-42"
          },
          "ticket_number": {
            "type": "integer",
            "example": 42
          },
          "priority": {
            "type": "string",
            "example": "medium",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "order": {
            "type": "number",
            "format": "float",
            "example": 1000
          },
          "project_id": {
            "type": "string",
            "example": "q8Rk2Lm9p"
          },
          "status": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "color": {
                "type": "string"
              }
            },
            "type": "object",
            "nullable": true
          },
          "assigned": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "type": "object",
            "nullable": true
          },
          "contact": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "type": "object",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "color": {
                  "type": "string",
                  "nullable": true
                }
              },
              "type": "object"
            }
          },
          "form_values": {
            "description": "Custom (dynamic-form) field values",
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "TicketStatus": {
        "properties": {
          "id": {
            "description": "Obfuscated status id",
            "type": "string",
            "example": "q8Rk2Lm9p"
          },
          "name": {
            "type": "string",
            "example": "Open"
          },
          "color": {
            "type": "string",
            "example": "#808390",
            "nullable": true
          },
          "order": {
            "type": "integer",
            "example": 1
          },
          "is_default": {
            "type": "boolean",
            "example": true
          }
        },
        "type": "object"
      }
    },
    "parameters": {
      "CrmHizmetNumarasi": {
        "name": "hizmetNumarasi",
        "in": "path",
        "description": "Your own organization's service no, verified by the `crm.service_no` middleware. Passing another organization's service no returns 403. Digits only.",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[0-9]{6,25}$",
          "example": "120326001"
        }
      },
      "CrmCrmId": {
        "name": "crm_id",
        "in": "query",
        "description": "Client-supplied operation id; echoed back verbatim in the response, used to match a request to its response.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "req-1001"
        }
      },
      "CrmCustomerNum": {
        "name": "customer_num",
        "in": "query",
        "description": "Customer number to call.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "5000000000"
        }
      },
      "CrmInternalNum": {
        "name": "internal_num",
        "in": "query",
        "description": "Internal extension that originates the call.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "101"
        }
      },
      "CrmRingTimeout": {
        "name": "ring_timeout",
        "in": "query",
        "description": "Ring duration in seconds.",
        "required": true,
        "schema": {
          "type": "integer",
          "example": 30
        }
      },
      "CrmWaitResponse": {
        "name": "wait_response",
        "in": "query",
        "description": "Answer wait duration in seconds.",
        "required": true,
        "schema": {
          "type": "integer",
          "example": 30
        }
      },
      "CrmOriginateOrder": {
        "name": "originate_order",
        "in": "query",
        "description": "`if` = the internal/first party is dialed first, `of` = the outside/second party is dialed first.",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "if",
            "of"
          ]
        }
      },
      "CrmTrunk": {
        "name": "trunk",
        "in": "query",
        "description": "Trunk name the call goes out on.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "CrmCallTime": {
        "name": "call_time",
        "in": "query",
        "description": "Maximum talk duration in seconds.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 5400
        }
      },
      "CrmHideCallerId": {
        "name": "hide_callerid",
        "in": "query",
        "description": "1 hides the calling number.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 0,
          "enum": [
            0,
            1
          ]
        }
      },
      "CrmCallerText": {
        "name": "caller_text",
        "in": "query",
        "description": "Text to be read out (TTS) to the caller side.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CrmCalledText": {
        "name": "called_text",
        "in": "query",
        "description": "Text to be read out (TTS) to the called side.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CrmCallerRecord": {
        "name": "caller_record",
        "in": "query",
        "description": "Name of a recorded prompt to play to the caller side.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CrmCalledRecord": {
        "name": "called_record",
        "in": "query",
        "description": "Name of a recorded prompt to play to the called side.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CrmCaller": {
        "name": "caller",
        "in": "query",
        "description": "Calling party number.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "CrmCalled": {
        "name": "called",
        "in": "query",
        "description": "Called party number.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "CrmWarningFile": {
        "name": "warning_file",
        "in": "query",
        "description": "Warning audio file to play shortly before the call ends.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CrmWarningRemainingSecond": {
        "name": "warning_remaining_second",
        "in": "query",
        "description": "How many seconds before the call ends the warning is played.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 0
        }
      },
      "CrmRedirectMenu": {
        "name": "redirect_menu",
        "in": "query",
        "description": "Target menu/queue/IVR name (short form; see `redirect_type` for how the full upstream name is derived).",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "CrmRedirectType": {
        "name": "redirect_type",
        "in": "query",
        "description": "Target type. The full target name netcrm resolves against depends on it: `queue` -> `{hizmetNumarasi}-queue-{redirect_menu}`, `announcement` -> `{hizmetNumarasi}-announcement-{redirect_menu}`, `ivr` -> `{redirect_menu}-{hizmetNumarasi}`. If the resolved target or trunk does not exist on the PBX, the response has `code: \"70\"`.",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "queue",
            "announcement",
            "ivr"
          ]
        }
      },
      "CrmPrefix": {
        "name": "prefix",
        "in": "query",
        "description": "Call prefix. If longer than 5 characters, only its first 4 characters are used.",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 4
        }
      },
      "CrmCallerId": {
        "name": "callerid",
        "in": "query",
        "description": "Calling number to present on the call.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CrmBrandCode": {
        "name": "brandcode",
        "in": "query",
        "description": "IYS brand code. Sent together with `filter`, this triggers an IYS (İleti Yönetim Sistemi) permission check before dialing; a number without permission yields `code: \"50\"` and the call is not placed.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CrmFilter": {
        "name": "filter",
        "in": "query",
        "description": "IYS recipient-type filter. Must be sent together with `brandcode` for the IYS check to run.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CrmUniqueId": {
        "name": "unique_id",
        "in": "query",
        "description": "Unique id of the call to act on.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "1712345678.123"
        }
      },
      "CrmExten": {
        "name": "exten",
        "in": "query",
        "description": "Target extension.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "102"
        }
      },
      "CrmMuteDirection": {
        "name": "direction",
        "in": "query",
        "description": "Audio direction to mute/unmute.",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "in",
            "out",
            "all"
          ]
        }
      },
      "CrmMuteState": {
        "name": "state",
        "in": "query",
        "description": "`on` mutes the audio, `off` unmutes it.",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "on",
            "off"
          ]
        }
      },
      "CrmDtmfDirection": {
        "name": "direction",
        "in": "query",
        "description": "`in` = towards the caller side, `out` = towards the called side.",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "in",
            "out"
          ]
        }
      },
      "CrmDigit": {
        "name": "digit",
        "in": "query",
        "description": "DTMF digits to send, one at a time. If sending any digit fails, the operation aborts mid-way and returns an error for that digit.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "1234#"
        }
      },
      "CrmQueueOptional": {
        "name": "queue",
        "in": "query",
        "description": "Comma-separated queue name list (short form; resolved upstream as `{hizmetNumarasi}-queue-{queue}`). When omitted, all of the PBX's queues are listed.",
        "required": false,
        "schema": {
          "type": "string",
          "example": "sales,support"
        }
      },
      "CrmExtenList": {
        "name": "exten",
        "in": "query",
        "description": "Comma-separated extension list.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "101,102"
        }
      },
      "CrmQueueList": {
        "name": "queue",
        "in": "query",
        "description": "Comma-separated queue name list (short form; resolved upstream as `{hizmetNumarasi}-queue-{queue}`).",
        "required": true,
        "schema": {
          "type": "string",
          "example": "sales,support"
        }
      },
      "CrmPenalty": {
        "name": "penalty",
        "in": "query",
        "description": "Priority (penalty) value within the queue.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "0"
        }
      },
      "CrmPaused": {
        "name": "paused",
        "in": "query",
        "description": "`1` = paused, `0` = not paused.",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "0",
            "1"
          ]
        }
      },
      "CrmReason": {
        "name": "reason",
        "in": "query",
        "description": "Pause reason. Turkish characters are ASCII-folded upstream.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "lunch"
        }
      },
      "CrmConferenceName": {
        "name": "conferencename",
        "in": "query",
        "description": "Conference room name.",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "description": "API key issued from the portal, sent as 'Authorization: Bearer {api_key}'.",
        "bearerFormat": "API Key",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Accounts",
      "description": "Accounts"
    },
    {
      "name": "Breaks",
      "description": "Breaks"
    },
    {
      "name": "Call Scripts",
      "description": "Call Scripts"
    },
    {
      "name": "Contacts",
      "description": "Contacts"
    },
    {
      "name": "CRM",
      "description": "CRM"
    },
    {
      "name": "Interactions",
      "description": "Interactions"
    },
    {
      "name": "Auth",
      "description": "Auth"
    },
    {
      "name": "Projects",
      "description": "Projects"
    },
    {
      "name": "QuickReplies",
      "description": "QuickReplies"
    },
    {
      "name": "Tickets",
      "description": "Tickets"
    },
    {
      "name": "Users",
      "description": "Users"
    }
  ]
}