{
 "openapi": "3.1.0",
 "info": {
  "title": "Gyro Public API",
  "version": "2.30.0",
  "summary": "Manage Gyro cloud servers, SSH keys and billing programmatically.",
  "x-summary-tr": "Gyro bulut sunucularınızı, SSH anahtarlarınızı ve faturalarınızı programla yönetin.",
  "contact": {
   "name": "Gyro Hosting",
   "url": "https://www.gyrohosting.com"
  },
  "license": {
   "name": "Proprietary",
   "identifier": "LicenseRef-Gyro-API-Terms"
  }
 },
 "servers": [
  {
   "url": "https://www.gyrohosting.com/api/v1/client",
   "description": "Production"
  }
 ],
 "paths": {
  "/cloud/projects/{id}": {
   "patch": {
    "tags": [
     "Projects"
    ],
    "operationId": "updateProject",
    "summary": "Rename / recolour a project",
    "x-summary-tr": "Projeyi yeniden adlandır / renklendir",
    "x-scope": "services_write",
    "description": "Send any of name, description, color, icon. The default project cannot be changed (409 `default_project`). Writes: 60 per minute per key (429 `rate_limited`). Sub-account keys cannot create, rename or delete projects (403 `subkey_forbidden`).",
    "x-description-tr": "name, description, color, icon alanlarından istediğinizi gönderin. Varsayılan proje değiştirilemez (409 `default_project`). Yazma: anahtar başına dakikada 60 (429 `rate_limited`). Alt hesap anahtarları proje oluşturamaz, yeniden adlandıramaz, silemez (403 `subkey_forbidden`).",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ProjectUpdate"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Updated",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/Project"
          }
         }
        }
       }
      }
     },
     "409": {
      "description": "name_taken / default_project"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "429": {
      "$ref": "#/components/responses/RateLimited"
     }
    },
    "x-cli": {
     "command": "project rename"
    }
   },
   "parameters": [
    {
     "name": "id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "integer",
      "minimum": 0
     },
     "description": "Project id (0 = default project)"
    }
   ]
  }
 },
 "components": {
  "responses": {
   "RateLimited": {
    "description": "Too many requests (`rate_limited`); see the `Retry-After` and `X-RateLimit-*` headers",
    "headers": {
     "Retry-After": {
      "description": "Seconds to wait",
      "schema": {
       "type": "integer"
      }
     }
    },
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "NotFound": {
    "description": "Not found — also returned for objects owned by someone else",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Forbidden": {
    "description": "Key lacks the scope, IP not allowed, or feature disabled",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Unauthorized": {
    "description": "Missing, invalid or revoked key",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "object",
      "required": [
       "code",
       "message"
      ],
      "properties": {
       "code": {
        "type": "string",
        "example": "server_not_found"
       },
       "message": {
        "type": "string"
       },
       "details": {
        "type": "object",
        "additionalProperties": true,
        "description": "Extra data. Limit refusals add the LimitHint fields (`limit_exceeded: true`, `limit_key`, `limit`, `current`, `how_to_increase`, `support_ticket`, `hint`): account limits are raised with a support ticket. Validation errors (length, format) never carry the limit hint.",
        "x-description-tr": "Ek veri. Sınır retlerinde LimitHint alanları gelir: hesap sınırları destek talebiyle artırılır. Doğrulama hataları (uzunluk, biçim) sınır ipucu taşımaz."
       }
      }
     }
    }
   },
   "Project": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "description": "0 = default project"
     },
     "name": {
      "type": "string",
      "maxLength": 40
     },
     "description": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 255
     },
     "color": {
      "type": "string",
      "enum": [
       "gray",
       "blue",
       "green",
       "red",
       "orange",
       "yellow",
       "purple",
       "pink",
       "teal",
       "indigo"
      ]
     },
     "icon": {
      "type": "string",
      "description": "Bootstrap Icons name (without the bi- prefix)"
     },
     "is_default": {
      "type": "boolean"
     },
     "service_count": {
      "type": "integer",
      "description": "Live services (active, suspended, in process, waiting) visible to this key"
     },
     "service_total": {
      "type": "integer",
      "description": "All services incl. cancelled ones visible to this key"
     },
     "service_ids": {
      "type": "array",
      "items": {
       "type": "integer"
      },
      "description": "Only on GET /cloud/projects/{id} and create/update responses"
     },
     "created_at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "updated_at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     }
    },
    "example": {
     "id": 6,
     "name": "Gyro Test",
     "description": "Mobile app backend",
     "color": "purple",
     "icon": "controller",
     "is_default": false,
     "service_count": 12,
     "service_total": 13,
     "created_at": "2026-11-13T02:00:00+03:00",
     "updated_at": "2026-11-13T02:00:00+03:00"
    }
   },
   "ProjectUpdate": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40,
      "description": "Letter or digit first; then letters, digits, space and . _ - / + # & ( ). Unique per account (case-insensitive). Reserved: Genel, General, Default."
     },
     "description": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 255
     },
     "color": {
      "type": "string",
      "enum": [
       "gray",
       "blue",
       "green",
       "red",
       "orange",
       "yellow",
       "purple",
       "pink",
       "teal",
       "indigo"
      ],
      "default": "blue"
     },
     "icon": {
      "type": "string",
      "enum": [
       "folder",
       "briefcase",
       "building",
       "cart3",
       "cloud",
       "code-slash",
       "controller",
       "globe2",
       "heart",
       "house",
       "kanban",
       "lightning",
       "people",
       "rocket-takeoff",
       "shield-lock",
       "shop",
       "star",
       "tools",
       "truck",
       "box-seam",
       "mortarboard",
       "camera"
      ],
      "default": "folder"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}