{
  "openapi": "3.0.1",
  "info": {
    "description": "Associations define the relationships between objects in HubSpot. These endpoints allow you to create, read, and remove associations.",
    "title": "Associations",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://api.hubapi.com/"
    }
  ],
  "tags": [
    {
      "name": "Batch"
    },
    {
      "name": "Types"
    }
  ],
  "paths": {
    "/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/archive": {
      "post": {
        "description": "Remove the associations between all pairs of objects identified in the request body.",
        "operationId": "BatchArchive",
        "parameters": [
          {
            "explode": false,
            "in": "path",
            "name": "fromObjectType",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "explode": false,
            "in": "path",
            "name": "toObjectType",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchInputPublicAssociation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "content": {},
            "description": "No content"
          },
          "default": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error occurred."
          }
        },
        "security": [
          {
            "oauth2_legacy": [
              "media_bridge.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.contacts.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.deals.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.deals.read"
            ]
          },
          {
            "private_apps_legacy": [
              "contacts"
            ]
          },
          {
            "private_apps": [
              "crm.objects.contacts.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.companies.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.deals.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.companies.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.deals.write"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.goals.read"
            ]
          },
          {
            "private_apps_legacy": [
              "media_bridge.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.companies.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.companies.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.quotes.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.quotes.write"
            ]
          },
          {
            "oauth2_legacy": [
              "tickets"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.custom.write"
            ]
          },
          {
            "private_apps_legacy": [
              "e-commerce"
            ]
          },
          {
            "private_apps": [
              "crm.objects.line_items.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.contacts.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.contacts.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.line_items.read"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.custom.read"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.custom.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.line_items.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.line_items.write"
            ]
          },
          {
            "oauth2_legacy": [
              "e-commerce"
            ]
          },
          {
            "private_apps_legacy": [
              "tickets"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.goals.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.quotes.read"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.custom.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.quotes.read"
            ]
          }
        ],
        "summary": "Archive a batch of associations",
        "tags": [
          "Batch"
        ]
      }
    },
    "/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create": {
      "post": {
        "description": "Associate all pairs of objects identified in the request body.",
        "operationId": "BatchCreate",
        "parameters": [
          {
            "explode": false,
            "in": "path",
            "name": "fromObjectType",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "explode": false,
            "in": "path",
            "name": "toObjectType",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchInputPublicAssociation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponsePublicAssociation"
                }
              }
            },
            "description": "successful operation"
          },
          "207": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponsePublicAssociationWithErrors"
                }
              }
            },
            "description": "multiple statuses"
          },
          "default": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error occurred."
          }
        },
        "security": [
          {
            "oauth2_legacy": [
              "media_bridge.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.contacts.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.deals.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.deals.read"
            ]
          },
          {
            "private_apps_legacy": [
              "contacts"
            ]
          },
          {
            "private_apps": [
              "crm.objects.contacts.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.companies.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.deals.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.companies.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.deals.write"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.goals.read"
            ]
          },
          {
            "private_apps_legacy": [
              "media_bridge.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.companies.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.companies.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.quotes.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.quotes.write"
            ]
          },
          {
            "oauth2_legacy": [
              "tickets"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.custom.write"
            ]
          },
          {
            "private_apps_legacy": [
              "e-commerce"
            ]
          },
          {
            "private_apps": [
              "crm.objects.line_items.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.contacts.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.contacts.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.line_items.read"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.custom.read"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.custom.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.line_items.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.line_items.write"
            ]
          },
          {
            "oauth2_legacy": [
              "e-commerce"
            ]
          },
          {
            "private_apps_legacy": [
              "tickets"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.goals.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.quotes.read"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.custom.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.quotes.read"
            ]
          }
        ],
        "summary": "Create a batch of associations",
        "tags": [
          "Batch"
        ]
      }
    },
    "/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/read": {
      "post": {
        "description": "Get the IDs of all `{toObjectType}` objects associated with those specified in the request body.",
        "operationId": "BatchRead",
        "parameters": [
          {
            "explode": false,
            "in": "path",
            "name": "fromObjectType",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "explode": false,
            "in": "path",
            "name": "toObjectType",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchInputPublicObjectId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponsePublicAssociationMulti"
                }
              }
            },
            "description": "successful operation"
          },
          "207": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponsePublicAssociationMultiWithErrors"
                }
              }
            },
            "description": "multiple statuses"
          },
          "default": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error occurred."
          }
        },
        "security": [
          {
            "oauth2_legacy": [
              "media_bridge.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.contacts.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.deals.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.deals.read"
            ]
          },
          {
            "private_apps_legacy": [
              "contacts"
            ]
          },
          {
            "private_apps": [
              "crm.objects.contacts.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.companies.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.deals.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.companies.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.deals.write"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.goals.read"
            ]
          },
          {
            "private_apps_legacy": [
              "media_bridge.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.companies.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.companies.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.quotes.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.quotes.write"
            ]
          },
          {
            "oauth2_legacy": [
              "tickets"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.custom.write"
            ]
          },
          {
            "private_apps_legacy": [
              "e-commerce"
            ]
          },
          {
            "private_apps": [
              "crm.objects.line_items.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.contacts.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.contacts.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.line_items.read"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.custom.read"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.custom.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.line_items.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.line_items.write"
            ]
          },
          {
            "oauth2_legacy": [
              "e-commerce"
            ]
          },
          {
            "private_apps_legacy": [
              "tickets"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.goals.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.quotes.read"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.custom.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.quotes.read"
            ]
          }
        ],
        "summary": "Read a batch of associations",
        "tags": [
          "Batch"
        ]
      }
    },
    "/crm/v3/associations/{fromObjectType}/{toObjectType}/types": {
      "get": {
        "description": "List all the valid association types available between two object types",
        "operationId": "GetAll",
        "parameters": [
          {
            "explode": false,
            "in": "path",
            "name": "fromObjectType",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "explode": false,
            "in": "path",
            "name": "toObjectType",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponsePublicAssociationDefinitionNoPaging"
                }
              }
            },
            "description": "successful operation"
          },
          "default": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error occurred."
          }
        },
        "security": [
          {
            "oauth2_legacy": [
              "media_bridge.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.contacts.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.deals.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.deals.read"
            ]
          },
          {
            "private_apps_legacy": [
              "contacts"
            ]
          },
          {
            "private_apps": [
              "crm.objects.contacts.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.companies.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.deals.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.companies.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.deals.write"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.goals.read"
            ]
          },
          {
            "private_apps_legacy": [
              "media_bridge.read"
            ]
          },
          {
            "private_apps": [
              "crm.objects.companies.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.companies.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.quotes.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.quotes.write"
            ]
          },
          {
            "oauth2_legacy": [
              "tickets"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.custom.write"
            ]
          },
          {
            "private_apps_legacy": [
              "e-commerce"
            ]
          },
          {
            "private_apps": [
              "crm.objects.line_items.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.contacts.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.contacts.write"
            ]
          },
          {
            "oauth2": [
              "crm.objects.line_items.read"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.custom.read"
            ]
          },
          {
            "private_apps_legacy": [
              "crm.objects.custom.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.line_items.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.line_items.write"
            ]
          },
          {
            "oauth2_legacy": [
              "e-commerce"
            ]
          },
          {
            "private_apps_legacy": [
              "tickets"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.goals.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.quotes.read"
            ]
          },
          {
            "oauth2_legacy": [
              "crm.objects.custom.write"
            ]
          },
          {
            "private_apps": [
              "crm.objects.quotes.read"
            ]
          }
        ],
        "summary": "List association types",
        "tags": [
          "Types"
        ]
      }
    }
  },
  "components": {
    "responses": {
      "Error": {
        "content": {
          "*/*": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "An error occurred."
      }
    },
    "schemas": {
      "PublicObjectId": {
        "example": {
          "id": "37295"
        },
        "properties": {
          "id": {
            "description": "The unique ID that identifies an object.",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "CollectionResponsePublicAssociationDefinitionNoPaging": {
        "example": {
          "results": [
            {
              "id": "1",
              "name": "contact_to_company"
            },
            {
              "id": "1",
              "name": "contact_to_company"
            }
          ]
        },
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/PublicAssociationDefinition"
            },
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "type": "object"
      },
      "StandardError": {
        "properties": {
          "status": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/ErrorCategory"
          },
          "subCategory": {
            "properties": {},
            "type": "object"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": "array"
          },
          "context": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "object"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "category",
          "context",
          "errors",
          "links",
          "message",
          "status"
        ],
        "type": "object"
      },
      "Paging": {
        "properties": {
          "next": {
            "$ref": "#/components/schemas/NextPage"
          },
          "prev": {
            "$ref": "#/components/schemas/PreviousPage"
          }
        },
        "type": "object"
      },
      "PublicAssociationMulti": {
        "example": {
          "from": {
            "id": "53628"
          },
          "to": [
            {
              "id": "12726",
              "type": "contact_to_company"
            },
            {
              "id": "61352",
              "type": "contact_to_company"
            }
          ]
        },
        "properties": {
          "from": {
            "$ref": "#/components/schemas/PublicObjectId"
          },
          "to": {
            "description": "The IDs of objects that are associated with the object identified by the ID in 'from'.",
            "items": {
              "$ref": "#/components/schemas/AssociatedId"
            },
            "type": "array"
          },
          "paging": {
            "$ref": "#/components/schemas/Paging"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "type": "object"
      },
      "Error": {
        "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"
          }
        },
        "properties": {
          "message": {
            "description": "A human readable message describing the error along with remediation steps where appropriate",
            "example": "An error occurred",
            "type": "string"
          },
          "correlationId": {
            "description": "A unique identifier for the request. Include this value with any error reports or support tickets",
            "example": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
            "format": "uuid",
            "type": "string"
          },
          "category": {
            "description": "The error category",
            "type": "string"
          },
          "subCategory": {
            "description": "A specific category that contains more specific detail about the error",
            "type": "string"
          },
          "errors": {
            "description": "further information about the error",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": "array"
          },
          "context": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": "Context about the error condition",
            "example": {
              "invalidPropertyName": [
                "propertyValue"
              ],
              "missingScopes": [
                "scope1",
                "scope2"
              ]
            },
            "type": "object"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "A map of link names to associated URIs containing documentation about the error or recommended remediation steps",
            "type": "object"
          }
        },
        "required": [
          "category",
          "correlationId",
          "message"
        ],
        "type": "object"
      },
      "PublicAssociation": {
        "example": {
          "from": {
            "id": "53628"
          },
          "to": {
            "id": "12726"
          },
          "type": "contact_to_company"
        },
        "properties": {
          "from": {
            "$ref": "#/components/schemas/PublicObjectId"
          },
          "to": {
            "$ref": "#/components/schemas/PublicObjectId"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "from",
          "to",
          "type"
        ],
        "type": "object"
      },
      "BatchResponsePublicAssociationWithErrors": {
        "properties": {
          "status": {
            "enum": [
              "PENDING",
              "PROCESSING",
              "CANCELED",
              "COMPLETE"
            ],
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PublicAssociation"
            },
            "type": "array"
          },
          "numErrors": {
            "format": "int32",
            "type": "integer"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/StandardError"
            },
            "type": "array"
          },
          "requestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "completedAt",
          "results",
          "startedAt",
          "status"
        ],
        "type": "object"
      },
      "BatchResponsePublicAssociationMultiWithErrors": {
        "properties": {
          "status": {
            "enum": [
              "PENDING",
              "PROCESSING",
              "CANCELED",
              "COMPLETE"
            ],
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PublicAssociationMulti"
            },
            "type": "array"
          },
          "numErrors": {
            "format": "int32",
            "type": "integer"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/StandardError"
            },
            "type": "array"
          },
          "requestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "completedAt",
          "results",
          "startedAt",
          "status"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "properties": {
          "message": {
            "description": "A human readable message describing the error along with remediation steps where appropriate",
            "type": "string"
          },
          "in": {
            "description": "The name of the field or parameter in which the error was found.",
            "type": "string"
          },
          "code": {
            "description": "The status code associated with the error detail",
            "type": "string"
          },
          "subCategory": {
            "description": "A specific category that contains more specific detail about the error",
            "type": "string"
          },
          "context": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": "Context about the error condition",
            "example": {
              "missingScopes": [
                "scope1",
                "scope2"
              ]
            },
            "type": "object"
          }
        },
        "required": [
          "message"
        ],
        "type": "object"
      },
      "BatchInputPublicObjectId": {
        "example": {
          "inputs": [
            {
              "id": "37295"
            },
            {
              "id": "37295"
            }
          ]
        },
        "properties": {
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/PublicObjectId"
            },
            "type": "array"
          }
        },
        "required": [
          "inputs"
        ],
        "type": "object"
      },
      "ErrorCategory": {
        "properties": {
          "name": {
            "type": "string"
          },
          "httpStatus": {
            "enum": [
              "CONTINUE",
              "SWITCHING_PROTOCOLS",
              "PROCESSING",
              "OK",
              "CREATED",
              "ACCEPTED",
              "NON_AUTHORITATIVE_INFORMATION",
              "NO_CONTENT",
              "RESET_CONTENT",
              "PARTIAL_CONTENT",
              "MULTI_STATUS",
              "ALREADY_REPORTED",
              "IM_USED",
              "MULTIPLE_CHOICES",
              "MOVED_PERMANENTLY",
              "FOUND",
              "SEE_OTHER",
              "NOT_MODIFIED",
              "USE_PROXY",
              "TEMPORARY_REDIRECT",
              "PERMANENT_REDIRECT",
              "BAD_REQUEST",
              "UNAUTHORIZED",
              "PAYMENT_REQUIRED",
              "FORBIDDEN",
              "NOT_FOUND",
              "METHOD_NOT_ALLOWED",
              "NOT_ACCEPTABLE",
              "PROXY_AUTHENTICATION_REQUIRED",
              "REQUEST_TIMEOUT",
              "CONFLICT",
              "GONE",
              "LENGTH_REQUIRED",
              "PRECONDITION_FAILED",
              "REQUEST_ENTITY_TOO_LARGE",
              "REQUEST_URI_TOO_LONG",
              "UNSUPPORTED_MEDIA_TYPE",
              "REQUESTED_RANGE_NOT_SATISFIABLE",
              "EXPECTATION_FAILED",
              "IM_A_TEAPOT",
              "MISDIRECTED_REQUEST",
              "UNPROCESSABLE_ENTITY",
              "LOCKED",
              "FAILED_DEPENDENCY",
              "UPGRADE_REQUIRED",
              "PRECONDITION_REQUIRED",
              "TOO_MANY_REQUESTS",
              "REQUEST_HEADERS_FIELDS_TOO_LARGE",
              "INTERNAL_STALE_SERVICE_DISCOVERY",
              "UNAVAILABLE_FOR_LEGAL_REASONS",
              "MIGRATION_IN_PROGRESS",
              "INTERNAL_SERVER_ERROR",
              "NOT_IMPLEMENTED",
              "BAD_GATEWAY",
              "SERVICE_UNAVAILABLE",
              "GATEWAY_TIMEOUT",
              "HTTP_VERSION_NOT_SUPPORTED",
              "VARIANT_ALSO_NEGOTIATES",
              "INSUFFICIENT_STORAGE",
              "LOOP_DETECTED",
              "NOT_EXTENDED",
              "NETWORK_AUTHENTICATION_REQUIRED"
            ],
            "type": "string"
          }
        },
        "required": [
          "httpStatus",
          "name"
        ],
        "type": "object"
      },
      "PublicAssociationDefinition": {
        "example": {
          "id": "1",
          "name": "contact_to_company"
        },
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "PreviousPage": {
        "properties": {
          "before": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        },
        "required": [
          "before"
        ],
        "type": "object"
      },
      "BatchResponsePublicAssociation": {
        "example": {
          "completedAt": "2000-01-23T04:56:07.000Z",
          "requestedAt": "2000-01-23T04:56:07.000Z",
          "startedAt": "2000-01-23T04:56:07.000Z",
          "links": {
            "key": "links"
          },
          "results": [
            {
              "from": {
                "id": "53628"
              },
              "to": {
                "id": "12726"
              },
              "type": "contact_to_company"
            },
            {
              "from": {
                "id": "53628"
              },
              "to": {
                "id": "12726"
              },
              "type": "contact_to_company"
            }
          ],
          "status": "PENDING"
        },
        "properties": {
          "status": {
            "enum": [
              "PENDING",
              "PROCESSING",
              "CANCELED",
              "COMPLETE"
            ],
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PublicAssociation"
            },
            "type": "array"
          },
          "requestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "completedAt",
          "results",
          "startedAt",
          "status"
        ],
        "type": "object"
      },
      "BatchResponsePublicAssociationMulti": {
        "example": {
          "completedAt": "2000-01-23T04:56:07.000Z",
          "requestedAt": "2000-01-23T04:56:07.000Z",
          "startedAt": "2000-01-23T04:56:07.000Z",
          "links": {
            "key": "links"
          },
          "results": [
            {
              "from": {
                "id": "53628"
              },
              "to": [
                {
                  "id": "12726",
                  "type": "contact_to_company"
                },
                {
                  "id": "61352",
                  "type": "contact_to_company"
                }
              ]
            },
            {
              "from": {
                "id": "53628"
              },
              "to": [
                {
                  "id": "12726",
                  "type": "contact_to_company"
                },
                {
                  "id": "61352",
                  "type": "contact_to_company"
                }
              ]
            }
          ],
          "status": "PENDING"
        },
        "properties": {
          "status": {
            "enum": [
              "PENDING",
              "PROCESSING",
              "CANCELED",
              "COMPLETE"
            ],
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PublicAssociationMulti"
            },
            "type": "array"
          },
          "requestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "completedAt",
          "results",
          "startedAt",
          "status"
        ],
        "type": "object"
      },
      "NextPage": {
        "properties": {
          "after": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        },
        "required": [
          "after"
        ],
        "type": "object"
      },
      "AssociatedId": {
        "example": {
          "id": "172859",
          "type": "contact_to_company"
        },
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "type": "object"
      },
      "BatchInputPublicAssociation": {
        "example": {
          "inputs": [
            {
              "from": {
                "id": "53628"
              },
              "to": {
                "id": "12726"
              },
              "type": "contact_to_company"
            },
            {
              "from": {
                "id": "53628"
              },
              "to": {
                "id": "12726"
              },
              "type": "contact_to_company"
            }
          ]
        },
        "properties": {
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/PublicAssociation"
            },
            "type": "array"
          }
        },
        "required": [
          "inputs"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "oauth2_legacy": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.hubspot.com/oauth/authorize",
            "scopes": {
              "e-commerce": "e-commerce",
              "media_bridge.read": "Read media and media events",
              "tickets": "Read and write tickets",
              "crm.objects.goals.read": "Read goals",
              "crm.objects.custom.read": "View custom object records",
              "crm.objects.custom.write": "Change custom object records"
            },
            "tokenUrl": "https://api.hubapi.com/oauth/v1/token"
          }
        },
        "type": "oauth2"
      },
      "oauth2": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.hubspot.com/oauth/authorize",
            "scopes": {
              "crm.objects.contacts.read": " ",
              "crm.objects.contacts.write": " ",
              "crm.objects.companies.write": " ",
              "crm.objects.companies.read": " ",
              "crm.objects.line_items.write": "Line Items",
              "crm.objects.quotes.read": "Quotes",
              "crm.objects.deals.write": " ",
              "crm.objects.line_items.read": "Line Items",
              "crm.objects.deals.read": " ",
              "crm.objects.quotes.write": "Quotes"
            },
            "tokenUrl": "https://api.hubapi.com/oauth/v1/token"
          }
        },
        "type": "oauth2"
      },
      "private_apps_legacy": {
        "in": "header",
        "name": "private-app-legacy",
        "type": "apiKey"
      },
      "private_apps": {
        "in": "header",
        "name": "private-app",
        "type": "apiKey"
      }
    }
  },
  "x-hubspot-available-client-libraries": [
    "PHP",
    "Node",
    "Python",
    "Ruby"
  ]
}