openapi: 3.0.0 info: title: 10Web API V1 Account Domain 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: Domain description: Operations for domain management paths: /v1/hosting/websites/{website_id}/domain-name: get: summary: Get domain names for a website tags: - Domain parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' responses: '200': description: List of domain names content: application/json: schema: $ref: '#/components/schemas/WebsiteDomainNameListResponse' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' post: summary: Add a domain name to a website tags: - Domain parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddDomainNameRequest' responses: '200': description: Domain name added successfully content: application/json: schema: $ref: '#/components/schemas/AddDomainNameResponse' '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}/domain-name/{domain_name_id}/default: post: summary: Set default domain name for a website tags: - Domain parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/DomainNameId' - $ref: '#/components/parameters/Authorization' responses: '200': description: Default domain name set successfully content: application/json: schema: $ref: '#/components/schemas/SetDefaultDomainNameResponse' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' /v1/hosting/websites/{website_id}/domain-name/{domain_name_id}/delete: delete: summary: Delete a domain name from a website tags: - Domain parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/DomainNameId' - $ref: '#/components/parameters/Authorization' responses: '200': description: Domain name deleted successfully content: application/json: schema: $ref: '#/components/schemas/StatusResponse' '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: DomainNameId: name: domain_name_id in: path required: true schema: type: integer 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: AddDomainNameResponse: type: object properties: status: type: string enum: - ok - error data: type: object properties: domain_name: type: string description: The added domain name id: type: integer description: The ID of the added domain name message: type: string description: A success message nameservers: type: string description: JSON string containing an array of nameserver addresses status: type: string enum: - ok - error description: Status of the operation example: status: ok data: domain_name: https://testdomain.com id: 16461 message: Domain name successfully saved nameservers: '["NS1", "NS2", "NS3", "NS4"]' status: ok WebsiteDomainNameItem: type: object properties: admin_url: type: string description: URL for the admin panel created_at: type: string format: date-time description: Creation date and time default: type: integer enum: - 0 - 1 description: Whether this is the default domain (1) or not (0) website_id: type: integer description: ID of the website to which the domain name belongs id: type: integer description: Unique identifier for the domain name name: type: string description: The domain name scheme: type: string enum: - http - https description: The URL scheme used site_url: type: string description: Full URL of the site updated_at: type: string format: date-time description: Last update date and time SetDefaultDomainNameResponse: type: object properties: domain_name: type: string description: The domain name set as default message: type: string description: A success message status: type: string enum: - ok - error description: Status of the operation example: domain_name: https://testdomain.com message: Domain name successfully set as default status: ok AddDomainNameRequest: type: object required: - domain_name properties: domain_name: type: string description: Domain name to add (valid domain name format) StatusResponse: type: object properties: status: type: string enum: - ok - error example: status: ok WebsiteDomainNameListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/WebsiteDomainNameItem' example: data: - admin_url: https://regular-herring.10web.club/wp-admin created_at: '2024-09-23 07:08:47' default: 1 website_id: 15354 id: 16194 name: regular-herring.10web.club scheme: https site_url: https://regular-herring.10web.club updated_at: '2024-09-23 07:08:47' - admin_url: https://testdomain.com/wp-admin/ created_at: '2024-10-10 11:17:04' default: 0 website_id: 15354 id: 16461 name: testdomain.com scheme: http site_url: https://testdomain.com updated_at: '2024-10-10 11:17:04'