openapi: 3.0.0 info: title: 10Web API V1 Account PHP Management API description: 'The 10Web API provides a comprehensive set of endpoints for managing websites, DNS zones, domains, SSL certificates, backups, and more. This RESTful API allows you to integrate 10Web''s powerful hosting and website management capabilities into your own applications. ' servers: - url: https://api.10web.io tags: - name: PHP Management description: Operations for PHP version management paths: /v1/hosting/websites/{website_id}/php-version/switch: post: summary: Switch PHP version for a website tags: - PHP Management parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' requestBody: required: true content: application/json: schema: type: object required: - php_version properties: php_version: type: string description: Target PHP version to switch to, valid versions need to be checked in the response of the /v1/hosting/supported-php-versions endpoint example: '8.2' responses: '200': description: PHP version switched successfully content: application/json: schema: $ref: '#/components/schemas/StatusResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' /v1/hosting/websites/{website_id}/php/restart: post: summary: Restart PHP for a website tags: - PHP Management parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' responses: '200': description: PHP restarted successfully content: application/json: schema: $ref: '#/components/schemas/StatusResponse' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' /v1/hosting/supported-php-versions: get: summary: Get supported PHP versions tags: - PHP Management parameters: - $ref: '#/components/parameters/Authorization' responses: '200': description: List of supported PHP versions content: application/json: schema: type: object properties: status: type: string enum: - ok - error data: type: array items: type: string description: PHP version string example: status: ok data: - '7.4' - '8.0' - '8.1' - '8.2' - '8.3' - '8.4' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' components: responses: TooManyRequests: description: Too many requests content: application/json: schema: type: object properties: status: type: string enum: - error message: type: string example: Too many requests. Please try again later. Unauthorized: description: Unauthorized access content: application/json: schema: type: object properties: status: type: string enum: - error message: type: string example: Unauthorized access BadRequest: description: Bad request content: application/json: schema: type: object properties: status: type: string enum: - error message: type: string example: Invalid request parameters InternalServerError: description: Something went wrong content: application/json: schema: type: object properties: status: type: string enum: - error message: type: string example: Something went wrong parameters: Authorization: name: x-api-key in: header required: true schema: type: string description: API key for authentication example: API_KEY WebsiteId: name: website_id in: path required: true schema: type: integer schemas: StatusResponse: type: object properties: status: type: string enum: - ok - error example: status: ok