{
  "openapi": "3.0.1",
  "info": {
    "description": "HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request.\n\nIf teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner's primary team.",
    "title": "Crm Owners",
    "version": "v3",
    "x-hubspot-product-tier-requirements": {
      "marketing": "FREE",
      "sales": "FREE",
      "service": "FREE",
      "cms": "STARTER"
    },
    "x-hubspot-documentation-banner": "NONE",
    "x-hubspot-api-use-case": "Retrieve the owner IDs for all users in the account to later assign CRM records across the team.",
    "x-hubspot-related-documentation": [
      {
        "name": "Owners Guide",
        "url": "https://hubspot.dev/guides/api/crm/owners"
      }
    ],
    "x-hubspot-introduction": "Each user in a HubSpot account is assigned an owner ID, which HubSpot uses to map the user to their assigned CRM records, activities, and more. Use the owners API to retrieve owner IDs and other related information for users in the account. To assign an owner to a CRM record, you can use the properties API to set the hubspot_owner_id property."
  },
  "servers": [
    {
      "url": "https://api.hubapi.com"
    }
  ],
  "tags": [
    {
      "description": "",
      "name": "Owners",
      "x-hubspot-tag-name-english-source": "Owners"
    }
  ],
  "paths": {
    "/crm/v3/owners/": {
      "get": {
        "operationId": "GetPage",
        "parameters": [
          {
            "description": "Filter by email address (optional)",
            "explode": true,
            "in": "query",
            "name": "email",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "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.",
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "description": "The maximum number of results to display per page.",
            "explode": true,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "format": "int32",
              "type": "integer"
            },
            "style": "form"
          },
          {
            "description": "Whether to return only results that have been archived.",
            "explode": true,
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponsePublicOwnerForwardPaging"
                }
              }
            },
            "description": "successful operation"
          },
          "default": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error occurred."
          }
        },
        "security": [
          {
            "private_apps_legacy": [
              "contacts"
            ]
          },
          {
            "private_apps": [
              "crm.objects.owners.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.owners.read"
            ]
          }
        ],
        "summary": "Get a page of owners",
        "tags": [
          "Owners"
        ]
      }
    },
    "/crm/v3/owners/{ownerId}": {
      "get": {
        "operationId": "GetByID",
        "parameters": [
          {
            "explode": false,
            "in": "path",
            "name": "ownerId",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            },
            "style": "simple"
          },
          {
            "explode": true,
            "in": "query",
            "name": "idProperty",
            "required": false,
            "schema": {
              "default": "id",
              "enum": [
                "id",
                "userId"
              ],
              "type": "string"
            },
            "style": "form"
          },
          {
            "description": "Whether to return only results that have been archived.",
            "explode": true,
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOwner"
                }
              }
            },
            "description": "successful operation"
          },
          "default": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error occurred."
          }
        },
        "security": [
          {
            "private_apps_legacy": [
              "contacts"
            ]
          },
          {
            "private_apps": [
              "crm.objects.owners.read"
            ]
          },
          {
            "oauth2": [
              "crm.objects.owners.read"
            ]
          }
        ],
        "summary": "Read an owner by given `id` or `userId`",
        "tags": [
          "Owners"
        ]
      }
    }
  },
  "components": {
    "responses": {
      "Error": {
        "content": {
          "*/*": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "An error occurred."
      }
    },
    "schemas": {
      "ErrorDetail": {
        "properties": {
          "subCategory": {
            "description": "A specific category that contains more specific detail about the error",
            "type": "string"
          },
          "code": {
            "description": "The status code associated with the error detail",
            "type": "string"
          },
          "in": {
            "description": "The name of the field or parameter in which the error was found.",
            "type": "string"
          },
          "context": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": "Context about the error condition",
            "example": {
              "missingScopes": [
                "scope1",
                "scope2"
              ]
            },
            "type": "object"
          },
          "message": {
            "description": "A human readable message describing the error along with remediation steps where appropriate",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "type": "object"
      },
      "ForwardPaging": {
        "example": {
          "next": {
            "link": "link",
            "after": "after"
          }
        },
        "properties": {
          "next": {
            "$ref": "#/components/schemas/NextPage"
          }
        },
        "type": "object"
      },
      "PublicOwner": {
        "example": {
          "id": "6166860",
          "email": "jsmith@example.com",
          "firstName": "John",
          "lastName": "Smith",
          "userId": 1296619,
          "createdAt": "2019-10-30T03:30:17.883Z",
          "updatedAt": "2019-12-07T16:50:06.678Z",
          "archived": false,
          "teams": [
            {
              "id": "178588",
              "name": "West Coast Sales",
              "primary": true
            },
            {
              "id": "178590",
              "name": "California Sales",
              "primary": false
            }
          ]
        },
        "properties": {
          "firstName": {
            "example": "John",
            "type": "string"
          },
          "lastName": {
            "example": "Smith",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "archived": {
            "example": false,
            "type": "boolean"
          },
          "teams": {
            "example": [
              {
                "id": "178588",
                "name": "West Coast Sales",
                "primary": true
              },
              {
                "id": "178590",
                "name": "California Sales",
                "primary": false
              }
            ],
            "items": {
              "$ref": "#/components/schemas/PublicTeam"
            },
            "type": "array"
          },
          "id": {
            "example": "6166860",
            "type": "string"
          },
          "userId": {
            "example": 1296619,
            "format": "int32",
            "type": "integer"
          },
          "email": {
            "example": "jsmith@example.com",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "archived",
          "createdAt",
          "id",
          "updatedAt"
        ],
        "type": "object"
      },
      "PublicTeam": {
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "primary": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "primary"
        ],
        "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": {
          "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"
              ],
              "invalidPropertyName": [
                "propertyValue"
              ]
            },
            "type": "object"
          },
          "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"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "A map of link names to associated URIs containing documentation about the error or recommended remediation steps",
            "example": {
              "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
            },
            "type": "object"
          },
          "message": {
            "description": "A human readable message describing the error along with remediation steps where appropriate",
            "example": "Invalid input (details will vary based on the error)",
            "type": "string"
          },
          "category": {
            "description": "The error category",
            "example": "VALIDATION_ERROR",
            "type": "string"
          },
          "errors": {
            "description": "further information about the error",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": "array"
          }
        },
        "required": [
          "category",
          "correlationId",
          "message"
        ],
        "type": "object"
      },
      "CollectionResponsePublicOwnerForwardPaging": {
        "example": {
          "paging": {
            "next": {
              "link": "link",
              "after": "after"
            }
          },
          "results": [
            {
              "id": "6166860",
              "email": "jsmith@example.com",
              "firstName": "John",
              "lastName": "Smith",
              "userId": 1296619,
              "createdAt": "2019-10-30T03:30:17.883Z",
              "updatedAt": "2019-12-07T16:50:06.678Z",
              "archived": false,
              "teams": [
                {
                  "id": "178588",
                  "name": "West Coast Sales",
                  "primary": true
                },
                {
                  "id": "178590",
                  "name": "California Sales",
                  "primary": false
                }
              ]
            },
            {
              "id": "6166860",
              "email": "jsmith@example.com",
              "firstName": "John",
              "lastName": "Smith",
              "userId": 1296619,
              "createdAt": "2019-10-30T03:30:17.883Z",
              "updatedAt": "2019-12-07T16:50:06.678Z",
              "archived": false,
              "teams": [
                {
                  "id": "178588",
                  "name": "West Coast Sales",
                  "primary": true
                },
                {
                  "id": "178590",
                  "name": "California Sales",
                  "primary": false
                }
              ]
            }
          ]
        },
        "properties": {
          "paging": {
            "$ref": "#/components/schemas/ForwardPaging"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PublicOwner"
            },
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "type": "object"
      },
      "NextPage": {
        "example": {
          "link": "link",
          "after": "after"
        },
        "properties": {
          "link": {
            "type": "string"
          },
          "after": {
            "type": "string"
          }
        },
        "required": [
          "after"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.hubspot.com/oauth/authorize",
            "scopes": {
              "crm.objects.owners.read": " "
            },
            "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",
    "Ruby",
    "Python"
  ],
  "x-hubspot-product-tier-requirements": {
    "marketing": "FREE",
    "sales": "FREE",
    "service": "FREE",
    "cms": "STARTER"
  },
  "x-hubspot-documentation-banner": "NONE"
}