# Domains

## GET /portal/domains

> Get domains

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}},"Domain":{"description":"The domain representation","type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string","format":"uri"},"status":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"instance_property_id":{"type":"string"},"instance_company_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"activated_at":{"type":"string","format":"date-time"},"is_active":{"type":"boolean"},"email":{"type":"integer","format":"email"},"company_trade_name":{"type":"string"},"company_id_number":{"type":"string"},"has_scripts":{"type":"boolean"},"has_dsar":{"type":"boolean"},"has_docs":{"type":"boolean"},"has_accessibility":{"type":"boolean"},"display_company":{"type":"boolean"},"display_dpo":{"type":"boolean"},"has_clym_logo":{"type":"boolean"},"widget_version":{"type":"integer"},"instance_id":{"type":"integer"},"system_segment_id":{"type":"integer"},"default_notice_type":{"type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]},"source":{"type":"string","enum":["API","IMPORT","PORTAL","WIDGET_SCAN","WIDGET_REGISTRATION"]},"partner_id":{"type":"string"},"privacy_widget":{"type":"string","description":"Privacy widget script tag to embed on the domain page."},"privacy_center_link":{"type":"string","description":"Footer link to open privacy widget"},"privacy_dnt_link":{"type":"string","description":"Footer link to open data subject requests on privacy widget"},"merchants":{"type":"array","description":"An array of merchant ids associated with this domain","items":{"type":"string"}},"instance":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hostname":{"type":"string"}}},"property":{"$ref":"#/components/schemas/Property"},"subscription":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["NEW","ACTIVE","TRIAL","GRACE","PENDING_CANCEL","PENDING_CHANGE","PENDING_ACTIVE","INACTIVE"]},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"price":{"type":"object","properties":{"id":{"type":"number"},"frequency":{"type":"string","enum":["MONTH","YEAR"]},"currency":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"price_amount":{"type":"number"},"price_list":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string"},"code":{"type":"string"}}},"product":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string"},"name":{"type":"string"}}}}}}}}},"Property":{"type":"object","description":"Contains the domain details.","properties":{"id":{"type":"string"},"name":{"type":"string","format":"uri"},"company":{"$ref":"#/components/schemas/Company"}}},"Company":{"type":"object","description":"Company owning a set of domains.","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"address":{"type":"object","properties":{"country":{"type":"string"},"city":{"type":"string"},"address":{"type":"string"},"postal_code":{"type":"string"},"phone_number":{"type":"string"}}},"owner":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}},"paths":{"/portal/domains":{"get":{"summary":"Get domains","parameters":[{"in":"query","name":"search","schema":{"type":"string"},"description":"Search by hostname, domain ID, or property ID"},{"in":"query","name":"id","schema":{"type":"string"},"description":"Retrieve a specific domain by ID"},{"in":"query","name":"status","schema":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"description":"Filter by domain status"},{"in":"query","name":"is_active","schema":{"type":"boolean"},"description":"Filter by active/inactive domains"},{"in":"query","name":"source","schema":{"type":"string","enum":["API","IMPORT","PORTAL","WIDGET_SCAN","WIDGET_REGISTRATION"]},"description":"Filter by domain creation source"},{"in":"query","name":"has_scripts","schema":{"type":"boolean"},"description":"Filter by script management status"},{"in":"query","name":"has_dsar","schema":{"type":"boolean"},"description":"Filter by Data Subject Request functionality"},{"in":"query","name":"has_docs","schema":{"type":"boolean"},"description":"Filter by legal documents display"},{"in":"query","name":"has_accessibility","schema":{"type":"boolean"},"description":"Filter by accessibility functionality"},{"in":"query","name":"display_company","schema":{"type":"boolean"},"description":"Filter by company information display"},{"in":"query","name":"display_dpo","schema":{"type":"boolean"},"description":"Filter by DPO information display"},{"in":"query","name":"company_trade_name","schema":{"type":"string"},"description":"Search by company trade name"},{"in":"query","name":"company_id_number","schema":{"type":"string"},"description":"Filter by company ID number"},{"in":"query","name":"instance_company_id","schema":{"type":"string"},"description":"Filter by instance company ID"},{"in":"query","name":"instance_property_id","schema":{"type":"string"},"description":"Filter by instance property ID"},{"in":"query","name":"instance_id","schema":{"type":"string"},"description":"Filter by instance ID"},{"in":"query","name":"widget_version","schema":{"type":"integer"},"description":"Filter by widget version"},{"in":"query","name":"product_id","schema":{"type":"array","items":{"type":"string"}},"description":"Filter by product ID(s)","style":"form","explode":true},{"in":"query","name":"price_list_id","schema":{"type":"string"},"description":"Filter by price list ID"},{"in":"query","name":"merchant_id","schema":{"type":"string"},"description":"Filter by merchant ID"},{"in":"query","name":"subscription_status","schema":{"type":"string","enum":["NEW","ACTIVE","TRIAL","GRACE","PENDING_CANCEL","PENDING_CHANGE","PENDING_ACTIVE","INACTIVE"]},"description":"Filter by subscription status"},{"in":"query","name":"is_active_subscription","schema":{"type":"boolean"},"description":"Filter by active subscriptions"},{"in":"query","name":"has_subscription","schema":{"type":"boolean"},"description":"Filter domains with/without subscriptions"},{"in":"query","name":"referral_partner_id","schema":{"type":"string"},"description":"Filter by referral partner ID"},{"in":"query","name":"created_at_start","schema":{"type":"string","format":"date-time"},"description":"Filter domains created after this date"},{"in":"query","name":"created_at_end","schema":{"type":"string","format":"date-time"},"description":"Filter domains created before this date"},{"in":"query","name":"activated_at_start","schema":{"type":"string","format":"date-time"},"description":"Filter domains activated after this date"},{"in":"query","name":"activated_at_end","schema":{"type":"string","format":"date-time"},"description":"Filter domains activated before this date"},{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Results per page"}],"responses":{"200":{"description":"An array with all partner domains","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}}}}}}}}}
```

## Create domain

> Create a new domain in your partner account. Note that some fields are required and some are optional, depending on the onboarding configuration setup for your partner. To find out more, reach out to your partner account manager.

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains":{"post":{"summary":"Create domain","description":"Create a new domain in your partner account. Note that some fields are required and some are optional, depending on the onboarding configuration setup for your partner. To find out more, reach out to your partner account manager.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","format":"uri","description":"The domain to be registered"},"product":{"type":"string","description":"The billing product code for this domain. Available under /products"},"price_list":{"type":"string","description":"The billing price list code for this domain"},"company_name":{"type":"string","description":"The company legal name"},"company_trade_name":{"type":"string","description":"The company trade name if different from the company (legal) name"},"company_id_number":{"type":"string","description":"Internal company ID number"},"company_setup":{"type":"boolean","default":false,"description":"When set to true, a new company will be created and company_name will not be used as company uniqueness"},"account_email":{"type":"string","format":"email","description":"The email account of the domain owner. This email address will be used for all transactional emails (including onboarding emails)."},"account_first_name":{"type":"string","description":"The first name of the individual owning the domain"},"account_last_name":{"type":"string","description":"The last name of the individual owning the domain"},"phone_number":{"type":"string","description":"The phone number of the individual owning the domain"},"vat_number":{"type":"string","description":"Company VAT number"},"registration_number":{"type":"string","description":"Company registration number"},"country":{"type":"string","description":"Company country code in ISO 3166-1 alpha-2"},"state":{"type":"string","description":"Company state code in ISO 3166-1 alpha-2"},"city":{"type":"string","description":"Company city"},"address":{"type":"string","description":"Company address"},"address_2":{"type":"string","description":"Secondary address line"},"postal_code":{"type":"string","description":"Company postal code"},"primary_color":{"type":"string","description":"Domain primary color in hex format"},"has_scripts":{"type":"boolean","default":true,"description":"Optional, when disabled, the widget will not handle any kind of consent/cookie management and will not block any scripts."},"has_dsar":{"type":"boolean","default":true,"description":"Optional, when disabled, the widget will not allow any Data Subject Request creation"},"has_docs":{"type":"boolean","default":true,"description":"Optional, when disabled, the widget will not display any legal documents"},"has_accessibility":{"type":"boolean","default":true,"description":"Optional, when disabled, the widget will not have any accessibility functionality enabled."},"display_dpo":{"type":"boolean","default":true,"description":"Optional, when disabled, the DPO information in the widget will be hidden"},"display_company":{"type":"boolean","default":true,"description":"Optional, when disabled, the Company tab in the widget will be hidden"},"subdomains":{"type":"array","description":"Optional, if specified, additional subdomains to be created to the property","items":{"type":"string","format":"uri"},"maxItems":100},"default_notice_type":{"description":"Optional default widget notification type to be used by the widget","type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]},"send_intro":{"type":"boolean","description":"Determine if the system will send the customized email or not"},"action":{"type":"string","enum":["SCAN","SCAN_INVITE","CREATE_SILENT"]},"merchant_id":{"type":"string","description":"The merchant id to be assigned to this domain","maxLength":204},"referral_partner_id":{"type":"string","description":"The ID of the partner who referred this domain"},"criterias":{"type":"array","description":"Company criteria identifiers","items":{"type":"string"}},"sector_id":{"type":"string","description":"Business sector identifier"},"industry_id":{"type":"string","description":"Industry classification identifier"}},"required":["domain","company_name","account_email"]}}}},"responses":{"200":{"description":"Domain added to the partner account","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string","format":"uri"},"status":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"instance_property_id":{"type":"string"},"instance_company_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"is_active":{"type":"boolean"},"email":{"type":"integer","format":"email"},"company_trade_name":{"type":"string"},"company_id_number":{"type":"string"},"has_scripts":{"type":"boolean"},"has_dsar":{"type":"boolean"},"has_docs":{"type":"boolean"},"has_accessibility":{"type":"boolean"},"display_company":{"type":"boolean"},"display_dpo":{"type":"boolean"},"default_notice_type":{"type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]},"source":{"type":"string","enum":["API","IMPORT","PORTAL","WIDGET_SCAN","WIDGET_REGISTRATION"]},"partner_id":{"type":"string"},"privacy_widget":{"type":"string","description":"Privacy widget script tag to embed on the domain page."},"privacy_center_link":{"type":"string","description":"Footer link to open privacy widget"},"privacy_dnt_link":{"type":"string","description":"Footer link to open data subject requests on privacy widget"}}}}}}}}}}}
```

## Get domain

> Retrieve information about a single domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Domain":{"description":"The domain representation","type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string","format":"uri"},"status":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"instance_property_id":{"type":"string"},"instance_company_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"activated_at":{"type":"string","format":"date-time"},"is_active":{"type":"boolean"},"email":{"type":"integer","format":"email"},"company_trade_name":{"type":"string"},"company_id_number":{"type":"string"},"has_scripts":{"type":"boolean"},"has_dsar":{"type":"boolean"},"has_docs":{"type":"boolean"},"has_accessibility":{"type":"boolean"},"display_company":{"type":"boolean"},"display_dpo":{"type":"boolean"},"has_clym_logo":{"type":"boolean"},"widget_version":{"type":"integer"},"instance_id":{"type":"integer"},"system_segment_id":{"type":"integer"},"default_notice_type":{"type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]},"source":{"type":"string","enum":["API","IMPORT","PORTAL","WIDGET_SCAN","WIDGET_REGISTRATION"]},"partner_id":{"type":"string"},"privacy_widget":{"type":"string","description":"Privacy widget script tag to embed on the domain page."},"privacy_center_link":{"type":"string","description":"Footer link to open privacy widget"},"privacy_dnt_link":{"type":"string","description":"Footer link to open data subject requests on privacy widget"},"merchants":{"type":"array","description":"An array of merchant ids associated with this domain","items":{"type":"string"}},"instance":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hostname":{"type":"string"}}},"property":{"$ref":"#/components/schemas/Property"},"subscription":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["NEW","ACTIVE","TRIAL","GRACE","PENDING_CANCEL","PENDING_CHANGE","PENDING_ACTIVE","INACTIVE"]},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"price":{"type":"object","properties":{"id":{"type":"number"},"frequency":{"type":"string","enum":["MONTH","YEAR"]},"currency":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"price_amount":{"type":"number"},"price_list":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string"},"code":{"type":"string"}}},"product":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string"},"name":{"type":"string"}}}}}}}}},"Property":{"type":"object","description":"Contains the domain details.","properties":{"id":{"type":"string"},"name":{"type":"string","format":"uri"},"company":{"$ref":"#/components/schemas/Company"}}},"Company":{"type":"object","description":"Company owning a set of domains.","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"address":{"type":"object","properties":{"country":{"type":"string"},"city":{"type":"string"},"address":{"type":"string"},"postal_code":{"type":"string"},"phone_number":{"type":"string"}}},"owner":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}},"paths":{"/portal/domains/{domainId}":{"get":{"summary":"Get domain","description":"Retrieve information about a single domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The partner domain information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}}}}}}}
```

## Update domain

> Update information about a domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}":{"put":{"summary":"Update domain","description":"Update information about a domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_name":{"type":"string","description":"The company legal name"},"company_trade_name":{"type":"string","description":"The company trade name if different from the company (legal) name"},"company_id_number":{"type":"string","description":"Internal company ID number"},"country":{"type":"string","description":"Company country code in ISO 3166-1 alpha-2"},"state":{"type":"string","description":"Company state code in ISO 3166-1 alpha-2"},"city":{"type":"string","description":"Company city"},"address":{"type":"string","description":"Company address"},"address_2":{"type":"string","description":"Secondary address line"},"postal_code":{"type":"string","description":"Company postal code"},"primary_color":{"type":"string","description":"Domain primary color"},"has_scripts":{"type":"boolean","description":"Optional, when disabled, the widget will not handle any kind of consent/cookie management and will not block any scripts."},"has_dsar":{"type":"boolean","description":"Optional, when disabled, the widget will not allow any Data Subject Request creation"},"has_docs":{"type":"boolean","description":"Optional, when disabled, the widget will not display any legal documents"},"has_accessibility":{"type":"boolean","description":"Optional, when disabled, the widget will not have any accessibility functionality enabled."},"display_dpo":{"type":"boolean","description":"Optional, when disabled, the DPO information in the widget will be hidden"},"display_company":{"type":"boolean","description":"Optional, when disabled, the Company tab in the widget will be hidden"},"default_notice_type":{"description":"Optional default widget notification type to be used by the widget","type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]}}}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string"}}}}}}}}}}}}}
```

## Delete domain

> Completely delete the domain and all associated functionality from your partner account

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}":{"delete":{"summary":"Delete domain","description":"Completely delete the domain and all associated functionality from your partner account","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain deletion confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}}}}}}}}}
```

## Deactivate domain

> Deactivate an active domain, changing its status to INACTIVE. The domain will be excluded from the list of partner domains.

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/deactivate":{"post":{"summary":"Deactivate domain","description":"Deactivate an active domain, changing its status to INACTIVE. The domain will be excluded from the list of partner domains.","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Activate domain

> Activate a deactivated domain. The domain will be included in the list of partner domains.

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/activate":{"post":{"summary":"Activate domain","description":"Activate a deactivated domain. The domain will be included in the list of partner domains.","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Invite domain

> Send an invitation email to start the onboarding process for the specified domain. The email will be sent to the email address of the account owner and the domain status will change to INVITED. Once we start receiving the first page views, the domain status will change to ACTIVE

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/invite":{"post":{"summary":"Invite domain","description":"Send an invitation email to start the onboarding process for the specified domain. The email will be sent to the email address of the account owner and the domain status will change to INVITED. Once we start receiving the first page views, the domain status will change to ACTIVE","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"send_intro":{"type":"boolean","description":"Determine if the system will send the customized intro email or not."}}}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Get subdomains

> Retrieves all the previously created subdomains of the specified domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Subdomain":{"description":"Subdomain of a domain.","type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"instance_domain_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"domain_id":{"type":"string"},"instance_id":{"type":"string"}}}}},"paths":{"/portal/domains/{domainId}/subdomains":{"get":{"summary":"Get subdomains","description":"Retrieves all the previously created subdomains of the specified domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of the domain's subdomains","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/Subdomain"}}}}}}}}}}}}
```

## Create subdomain

> Adds a new subdomain to the specified domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Subdomain":{"description":"Subdomain of a domain.","type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"instance_domain_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"domain_id":{"type":"string"},"instance_id":{"type":"string"}}}}},"paths":{"/portal/domains/{domainId}/subdomains":{"post":{"summary":"Create subdomain","description":"Adds a new subdomain to the specified domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subdomain":{"type":"string","format":"uri","description":"The full hostname of the subdomain to be added"}},"required":["subdomain"]}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subdomain"}}}}}}}}}
```

## Delete subdomain

> Removes the specified subdomain from the specified domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/subdomains/{subdomain}":{"delete":{"summary":"Delete subdomain","description":"Removes the specified subdomain from the specified domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}},{"name":"subdomain","in":"path","description":"The previously-created subdomain hostname","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}}}}}}}}}
```

## Change product

> Changes the product and price list of the domain's subscription.

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/subscription/product":{"post":{"summary":"Change product","description":"Changes the product and price list of the domain's subscription.","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","description":"The target product code, available in the /products section"},"price_list":{"type":"string","description":"The target price list code, available in the /products section"}},"required":["product"]}}}},"responses":{"200":{"description":"Subscription product change acknowledgement","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"changed":{"type":"boolean"}},"required":["result"]}}}}}}}}}}}
```

## Bulk change product

> Changes the product and price list in bulk, for up to \*100\* domains at once

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Error":{"description":"An error object","type":"object","properties":{"code":{"type":"string","description":"An error code"},"ns":{"type":"string","description":"An error namespace"},"message":{"type":"string","description":"Additional error message information"},"status":{"type":"number"},"data":{"type":"object"}}}}},"paths":{"/portal/domains/bulk/subscription/product":{"post":{"summary":"Bulk change product","description":"Changes the product and price list in bulk, for up to *100* domains at once","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"object","required":["id","product"],"properties":{"id":{"type":"string","description":"The target domain id"},"product":{"type":"string","description":"The target product code, available in the /products section"},"price_list":{"type":"string","description":"The target price list code, available in the /products section"}}}},"required":["domains"]}}}},"responses":{"200":{"description":"Subscription product change acknowledgement","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"changed":{"type":"array","description":"Domains with valid subscription changed","items":{"type":"object","required":["domain_id","changed"],"properties":{"domain_id":{"type":"string"},"changed":{"type":"boolean"}}}},"failed":{"type":"array","description":"Domains that encountered an error","items":{"type":"object","properties":{"domain_id":{"type":"string"},"error":{"$ref":"#/components/schemas/Error"}}}}},"required":["result"]}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clym.io/api-reference/domains.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
