{ "openapi" : "3.0.1", "info" : { "title" : "Domains", "version" : "v3", "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" }, "x-hubspot-api-use-case" : "Retrieve all currently connected domains to see which sites are live in a given account.", "x-hubspot-related-documentation" : [ { "name" : "Domains Guide", "url" : "https://developers.hubspot.com/docs/guides/api/cms/domains" } ], "x-hubspot-introduction" : "Use the domain management API to return information about the domains connected to a HubSpot account. You can return data for all currently connected domains, or for a single domain by ID." }, "servers" : [ { "url" : "https://api.hubapi.com" } ], "tags" : [ { "name" : "Basic" } ], "paths" : { "/cms/v3/domains" : { "get" : { "tags" : [ "Basic" ], "operationId" : "get-/cms/v3/domains_/cms/v3/domains", "parameters" : [ { "name" : "after", "in" : "query", "description" : "The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "example" : null } }, { "name" : "archived", "in" : "query", "description" : "Whether to return only results that have been archived.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "example" : null } }, { "name" : "createdAfter", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time", "example" : null } }, { "name" : "createdAt", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time", "example" : null } }, { "name" : "createdBefore", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The maximum number of results to display per page.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "example" : null } }, { "name" : "sort", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } } }, { "name" : "updatedAfter", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time", "example" : null } }, { "name" : "updatedAt", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time", "example" : null } }, { "name" : "updatedBefore", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponseWithTotalDomain" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "content-custom-domain-read", "content-custom-domain-write", "service-knowledge-custom-domain-read", "service-knowledge-custom-domain-write" ] } ] } }, "/cms/v3/domains/{domainId}" : { "get" : { "tags" : [ "Basic" ], "summary" : "Get a single domain", "description" : "Returns a single domains with the id specified.", "operationId" : "get-/cms/v3/domains/{domainId}_getById", "parameters" : [ { "name" : "domainId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Domain" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "content-custom-domain-read", "content-custom-domain-write", "service-knowledge-custom-domain-read", "service-knowledge-custom-domain-write" ] } ] } } }, "components" : { "schemas" : { "CollectionResponseWithTotalDomain" : { "required" : [ "results", "total" ], "type" : "object", "properties" : { "paging" : { "$ref" : "#/components/schemas/Paging" }, "results" : { "type" : "array", "description" : "The results of the query.", "example" : null, "items" : { "$ref" : "#/components/schemas/Domain" } }, "total" : { "type" : "integer", "description" : "The number of available results.", "format" : "int32", "example" : null } }, "example" : null }, "Domain" : { "required" : [ "domain", "id", "isResolving", "isUsedForBlogPost", "isUsedForEmail", "isUsedForKnowledge", "isUsedForLandingPage", "isUsedForSitePage" ], "type" : "object", "properties" : { "correctCname" : { "type" : "string", "description" : "The expected CNAME record for the domain.", "example" : null }, "created" : { "type" : "string", "description" : "The date and time when the domain was created.", "format" : "date-time", "example" : null }, "domain" : { "type" : "string", "description" : "The actual domain or sub-domain. e.g. www.hubspot.com", "example" : null }, "id" : { "type" : "string", "description" : "The unique ID of this domain.", "example" : null }, "isResolving" : { "type" : "boolean", "description" : "Whether the DNS for this domain is optimally configured for use with HubSpot.", "example" : null }, "isSslEnabled" : { "type" : "boolean", "description" : "Indicates whether SSL is enabled for the domain.", "example" : null }, "isSslOnly" : { "type" : "boolean", "description" : "Indicates whether the domain is accessible only via SSL.", "example" : null }, "isUsedForBlogPost" : { "type" : "boolean", "description" : "Whether the domain is used for CMS blog posts.", "example" : null }, "isUsedForEmail" : { "type" : "boolean", "description" : "Whether the domain is used for CMS email web pages.", "example" : null }, "isUsedForKnowledge" : { "type" : "boolean", "description" : "Whether the domain is used for CMS knowledge pages.", "example" : null }, "isUsedForLandingPage" : { "type" : "boolean", "description" : "Whether the domain is used for CMS landing pages.", "example" : null }, "isUsedForSitePage" : { "type" : "boolean", "description" : "Whether the domain is used for CMS site pages.", "example" : null }, "manuallyMarkedAsResolving" : { "type" : "boolean", "description" : "Indicates whether the domain has been manually marked as resolving.", "example" : null }, "primaryBlogPost" : { "type" : "boolean", "description" : "Indicates whether the domain is the primary domain for blog posts.", "example" : null }, "primaryEmail" : { "type" : "boolean", "description" : "Indicates whether the domain is the primary domain for email pages.", "example" : null }, "primaryKnowledge" : { "type" : "boolean", "description" : "Indicates whether the domain is the primary domain for knowledge pages.", "example" : null }, "primaryLandingPage" : { "type" : "boolean", "description" : "Indicates whether the domain is the primary domain for landing pages.", "example" : null }, "primarySitePage" : { "type" : "boolean", "description" : "Indicates whether the domain is the primary domain for site pages.", "example" : null }, "secondaryToDomain" : { "type" : "string", "description" : "Specifies the domain to which this domain is secondary.", "example" : null }, "updated" : { "type" : "string", "description" : "The date and time when the domain was last updated.", "format" : "date-time", "example" : null } }, "example" : null }, "Error" : { "required" : [ "category", "correlationId", "message" ], "type" : "object", "properties" : { "category" : { "type" : "string", "description" : "The error category", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Context about the error condition", "example" : "{invalidPropertyName=[propertyValue], missingScopes=[scope1, scope2]}" }, "correlationId" : { "type" : "string", "description" : "A unique identifier for the request. Include this value with any error reports or support tickets", "format" : "uuid", "example" : "aeb5f871-7f07-4993-9211-075dc63e7cbf" }, "errors" : { "type" : "array", "description" : "further information about the error", "example" : null, "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A map of link names to associated URIs containing documentation about the error or recommended remediation steps", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : "An error occurred" }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error", "example" : null } }, "example" : { "message" : "Invalid input (details will vary based on the error)", "correlationId" : "aeb5f871-7f07-4993-9211-075dc63e7cbf", "category" : "VALIDATION_ERROR", "links" : { "knowledge-base" : "https://www.hubspot.com/products/service/knowledge-base" } } }, "ErrorDetail" : { "required" : [ "message" ], "type" : "object", "properties" : { "code" : { "type" : "string", "description" : "The status code associated with the error detail", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Context about the error condition", "example" : "{missingScopes=[scope1, scope2]}" }, "in" : { "type" : "string", "description" : "The name of the field or parameter in which the error was found.", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : null }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error", "example" : null } }, "example" : null }, "NextPage" : { "required" : [ "after" ], "type" : "object", "properties" : { "after" : { "type" : "string", "description" : "The cursor value indicating where to begin fetching the next page of results in a paginated collection", "example" : null }, "link" : { "type" : "string", "description" : "An optional URL for directly accessing the next page of results.", "example" : null } }, "description" : "Specifies the paging information needed to retrieve the next set of results in a paginated API response", "example" : null }, "Paging" : { "type" : "object", "properties" : { "next" : { "$ref" : "#/components/schemas/NextPage" }, "prev" : { "$ref" : "#/components/schemas/PreviousPage" } }, "example" : null }, "PreviousPage" : { "required" : [ "before" ], "type" : "object", "properties" : { "before" : { "type" : "string", "description" : "A paging cursor token for retrieving previous pages.", "example" : null }, "link" : { "type" : "string", "description" : "A URL that can be used to retrieve the previous pages' results.", "example" : null } }, "description" : "specifies the paging information needed to retrieve the previous set of results in a paginated API response", "example" : null } }, "responses" : { "Error" : { "description" : "An error occurred.", "content" : { "*/*" : { "schema" : { "$ref" : "#/components/schemas/Error" }, "example" : null } } } }, "securitySchemes" : { "developer_hapikey" : { "type" : "apiKey", "name" : "hapikey", "in" : "query" }, "hapikey" : { "type" : "apiKey", "name" : "hapikey", "in" : "query" }, "oauth2" : { "type" : "oauth2", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://app.hubspot.com/oauth/authorize", "tokenUrl" : "https://api.hubapi.com/oauth/v1/token", "scopes" : { "content-custom-domain-read" : "", "content-custom-domain-write" : "", "service-knowledge-custom-domain-read" : "", "service-knowledge-custom-domain-write" : "" } } } }, "private_apps" : { "type" : "apiKey", "name" : "private-app", "in" : "header" }, "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", "in" : "header" } } }, "x-hubspot-available-client-libraries" : [ "Node", "Python", "Ruby", "PHP" ], "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" } }