openapi: 3.0.3
info:
  title: HubSpot CRM API
  version: v3
  x-slurry-persona: true
  description: >-
    Community simulation based on HubSpot's public API documentation. Not affiliated with or endorsed by HubSpot.
    Covers the CRM v3 object endpoints for contacts, companies, deals and tickets (list with cursor paging,
    create, read, update, archive and search), CRM owners, pipelines and deal associations, written from the
    public HubSpot developer documentation. Records carry their CRM properties in a "properties" map with
    string values; lists page with paging.next.after.
  license:
    name: CC-BY-4.0
    url: https://creativecommons.org/licenses/by/4.0/
  contact:
    name: Slurry
    url: https://slurry.io
externalDocs:
  description: HubSpot CRM API documentation (public)
  url: https://developers.hubspot.com/docs/api/crm/understanding-the-crm
servers:
  - url: https://api.hubapi.com
security:
  - bearerAuth: []
paths:
  /crm/v3/objects/contacts:
    get:
      operationId: listContacts
      tags: [Contacts]
      summary: List contacts, one page at a time
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Properties"
        - $ref: "#/components/parameters/Associations"
        - $ref: "#/components/parameters/Archived"
      responses:
        "200":
          description: A page of contacts
          content:
            application/json:
              schema: { $ref: "#/components/schemas/ContactPage" }
        "401":
          description: Unauthorised
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    post:
      operationId: createContact
      tags: [Contacts]
      summary: Create a contact with properties and optional associations
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/ContactCreate" }
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Contact" }
        "400":
          description: Validation error
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/contacts/{contactId}:
    parameters:
      - name: contactId
        in: path
        required: true
        schema: { type: string }
    get:
      operationId: getContact
      tags: [Contacts]
      summary: Read a contact by id
      parameters:
        - $ref: "#/components/parameters/Properties"
        - $ref: "#/components/parameters/Associations"
        - $ref: "#/components/parameters/IdProperty"
      responses:
        "200":
          description: The contact
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Contact" }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    patch:
      operationId: updateContact
      tags: [Contacts]
      summary: Update a contact's properties
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/ContactUpdate" }
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Contact" }
        "400":
          description: Validation error
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    delete:
      operationId: archiveContact
      tags: [Contacts]
      summary: Archive (move to the recycling bin) a contact
      responses:
        "204": { description: Archived }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/contacts/search:
    post:
      operationId: searchContacts
      tags: [Contacts]
      summary: Search contacts with filter groups, sorts and a query string
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/SearchRequest" }
      responses:
        "200":
          description: Search results
          content:
            application/json:
              schema: { $ref: "#/components/schemas/ContactSearchPage" }
        "400":
          description: Invalid filter
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/companies:
    get:
      operationId: listCompanies
      tags: [Companies]
      summary: List companies, one page at a time
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Properties"
        - $ref: "#/components/parameters/Associations"
        - $ref: "#/components/parameters/Archived"
      responses:
        "200":
          description: A page of companies
          content:
            application/json:
              schema: { $ref: "#/components/schemas/CompanyPage" }
        "401":
          description: Unauthorised
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    post:
      operationId: createCompany
      tags: [Companies]
      summary: Create a company with properties and optional associations
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/CompanyCreate" }
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Company" }
        "400":
          description: Validation error
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/companies/{companyId}:
    parameters:
      - name: companyId
        in: path
        required: true
        schema: { type: string }
    get:
      operationId: getCompany
      tags: [Companies]
      summary: Read a company by id
      parameters:
        - $ref: "#/components/parameters/Properties"
        - $ref: "#/components/parameters/Associations"
        - $ref: "#/components/parameters/IdProperty"
      responses:
        "200":
          description: The company
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Company" }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    patch:
      operationId: updateCompany
      tags: [Companies]
      summary: Update a company's properties
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/CompanyUpdate" }
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Company" }
        "400":
          description: Validation error
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    delete:
      operationId: archiveCompany
      tags: [Companies]
      summary: Archive (move to the recycling bin) a company
      responses:
        "204": { description: Archived }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/companies/search:
    post:
      operationId: searchCompanies
      tags: [Companies]
      summary: Search companies with filter groups, sorts and a query string
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/SearchRequest" }
      responses:
        "200":
          description: Search results
          content:
            application/json:
              schema: { $ref: "#/components/schemas/CompanySearchPage" }
        "400":
          description: Invalid filter
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/deals:
    get:
      operationId: listDeals
      tags: [Deals]
      summary: List deals, one page at a time
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Properties"
        - $ref: "#/components/parameters/Associations"
        - $ref: "#/components/parameters/Archived"
      responses:
        "200":
          description: A page of deals
          content:
            application/json:
              schema: { $ref: "#/components/schemas/DealPage" }
        "401":
          description: Unauthorised
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    post:
      operationId: createDeal
      tags: [Deals]
      summary: Create a deal with properties and optional associations
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/DealCreate" }
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Deal" }
        "400":
          description: Validation error
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/deals/{dealId}:
    parameters:
      - name: dealId
        in: path
        required: true
        schema: { type: string }
    get:
      operationId: getDeal
      tags: [Deals]
      summary: Read a deal by id
      parameters:
        - $ref: "#/components/parameters/Properties"
        - $ref: "#/components/parameters/Associations"
        - $ref: "#/components/parameters/IdProperty"
      responses:
        "200":
          description: The deal
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Deal" }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    patch:
      operationId: updateDeal
      tags: [Deals]
      summary: Update a deal's properties
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/DealUpdate" }
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Deal" }
        "400":
          description: Validation error
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    delete:
      operationId: archiveDeal
      tags: [Deals]
      summary: Archive (move to the recycling bin) a deal
      responses:
        "204": { description: Archived }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/deals/search:
    post:
      operationId: searchDeals
      tags: [Deals]
      summary: Search deals with filter groups, sorts and a query string
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/SearchRequest" }
      responses:
        "200":
          description: Search results
          content:
            application/json:
              schema: { $ref: "#/components/schemas/DealSearchPage" }
        "400":
          description: Invalid filter
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/tickets:
    get:
      operationId: listTickets
      tags: [Tickets]
      summary: List tickets, one page at a time
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Properties"
        - $ref: "#/components/parameters/Associations"
        - $ref: "#/components/parameters/Archived"
      responses:
        "200":
          description: A page of tickets
          content:
            application/json:
              schema: { $ref: "#/components/schemas/TicketPage" }
        "401":
          description: Unauthorised
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    post:
      operationId: createTicket
      tags: [Tickets]
      summary: Create a ticket with properties and optional associations
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/TicketCreate" }
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Ticket" }
        "400":
          description: Validation error
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/tickets/{ticketId}:
    parameters:
      - name: ticketId
        in: path
        required: true
        schema: { type: string }
    get:
      operationId: getTicket
      tags: [Tickets]
      summary: Read a ticket by id
      parameters:
        - $ref: "#/components/parameters/Properties"
        - $ref: "#/components/parameters/Associations"
        - $ref: "#/components/parameters/IdProperty"
      responses:
        "200":
          description: The ticket
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Ticket" }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    patch:
      operationId: updateTicket
      tags: [Tickets]
      summary: Update a ticket's properties
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/TicketUpdate" }
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Ticket" }
        "400":
          description: Validation error
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
    delete:
      operationId: archiveTicket
      tags: [Tickets]
      summary: Archive (move to the recycling bin) a ticket
      responses:
        "204": { description: Archived }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/objects/tickets/search:
    post:
      operationId: searchTickets
      tags: [Tickets]
      summary: Search tickets with filter groups, sorts and a query string
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: "#/components/schemas/SearchRequest" }
      responses:
        "200":
          description: Search results
          content:
            application/json:
              schema: { $ref: "#/components/schemas/TicketSearchPage" }
        "400":
          description: Invalid filter
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/owners:
    get:
      operationId: listOwners
      tags: [Owners]
      summary: List the users who can own CRM records
      parameters:
        - name: email
          in: query
          schema: { type: string }
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Archived"
      responses:
        "200":
          description: A page of owners
          content:
            application/json:
              schema: { $ref: "#/components/schemas/OwnerPage" }
  /crm/v3/owners/{ownerId}:
    get:
      operationId: getOwner
      tags: [Owners]
      summary: Read an owner by id
      parameters:
        - name: ownerId
          in: path
          required: true
          schema: { type: string }
      responses:
        "200":
          description: The owner
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Owner" }
        "404":
          description: Not found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Error" }
  /crm/v3/pipelines/{objectType}:
    get:
      operationId: getPipelines
      tags: [Pipelines]
      summary: List the pipelines and stages for deals or tickets
      parameters:
        - name: objectType
          in: path
          required: true
          schema: { type: string, enum: [deals, tickets] }
      responses:
        "200":
          description: Pipelines
          content:
            application/json:
              schema: { $ref: "#/components/schemas/PipelineList" }
              example:
                results:
                  - id: default
                    label: Sales Pipeline
                    displayOrder: 0
                    archived: false
                    stages:
                      - { id: appointmentscheduled, label: Appointment Scheduled, displayOrder: 0, metadata: { isClosed: "false", probability: "0.2" } }
                      - { id: qualifiedtobuy, label: Qualified To Buy, displayOrder: 1, metadata: { isClosed: "false", probability: "0.4" } }
                      - { id: presentationscheduled, label: Presentation Scheduled, displayOrder: 2, metadata: { isClosed: "false", probability: "0.6" } }
                      - { id: decisionmakerboughtin, label: Decision Maker Bought-In, displayOrder: 3, metadata: { isClosed: "false", probability: "0.8" } }
                      - { id: contractsent, label: Contract Sent, displayOrder: 4, metadata: { isClosed: "false", probability: "0.9" } }
                      - { id: closedwon, label: Closed Won, displayOrder: 5, metadata: { isClosed: "true", probability: "1.0" } }
                      - { id: closedlost, label: Closed Lost, displayOrder: 6, metadata: { isClosed: "true", probability: "0.0" } }
  /crm/v3/objects/deals/{dealId}/associations/{toObjectType}:
    get:
      operationId: listDealAssociations
      tags: [Deals]
      summary: List the records of another type associated with a deal
      parameters:
        - name: dealId
          in: path
          required: true
          schema: { type: string }
        - name: toObjectType
          in: path
          required: true
          schema: { type: string, enum: [contacts, companies, tickets] }
      responses:
        "200":
          description: Associations
          content:
            application/json:
              schema: { $ref: "#/components/schemas/AssociationPage" }
              example:
                results:
                  - { id: "51", type: deal_to_contact }
                  - { id: "1201", type: deal_to_contact }
  /crm/v3/objects/deals/{dealId}/associations/{toObjectType}/{toObjectId}/{associationType}:
    put:
      operationId: associateDeal
      tags: [Deals]
      summary: Associate a deal with another record using a default association type
      parameters:
        - name: dealId
          in: path
          required: true
          schema: { type: string }
        - name: toObjectType
          in: path
          required: true
          schema: { type: string }
        - name: toObjectId
          in: path
          required: true
          schema: { type: string }
        - name: associationType
          in: path
          required: true
          schema: { type: string, example: deal_to_contact }
      responses:
        "200":
          description: The deal with its associations
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Deal" }
              example:
                id: "9876543210"
                properties: { dealname: Northwind renewal FY27, dealstage: contractsent, pipeline: default }
                associations: { contacts: { results: [{ id: "51", type: deal_to_contact }] } }
                archived: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Private app access token or OAuth access token.
  parameters:
    Limit:
      name: limit
      in: query
      description: Maximum results per page (max 100)
      schema: { type: integer, default: 10, maximum: 100 }
    After:
      name: after
      in: query
      description: Paging cursor token from paging.next.after
      schema: { type: string }
    Properties:
      name: properties
      in: query
      description: Comma-separated properties to return
      schema: { type: string }
    Associations:
      name: associations
      in: query
      description: Comma-separated object types to return associated ids for
      schema: { type: string }
    Archived:
      name: archived
      in: query
      schema: { type: boolean, default: false }
    IdProperty:
      name: idProperty
      in: query
      description: A unique property to look the record up by instead of its id (e.g. email)
      schema: { type: string }
  schemas:
    Error:
      type: object
      required: [status, message, correlationId, category]
      properties:
        status: { type: string, example: error }
        message: { type: string }
        correlationId: { type: string, format: uuid }
        category: { type: string, enum: [VALIDATION_ERROR, OBJECT_NOT_FOUND, CONFLICT, RATE_LIMITS, INVALID_AUTHENTICATION, MISSING_SCOPES, OBJECT_ALREADY_EXISTS] }
        subCategory: { type: string }
        errors:
          type: array
          items:
            type: object
            properties:
              message: { type: string }
              code: { type: string, enum: [INVALID_OPTION, REQUIRED_PROPERTY, INVALID_EMAIL, PROPERTY_DOESNT_EXIST, INVALID_INTEGER, INVALID_DATE] }
              context: { type: object, additionalProperties: { type: array, items: { type: string } } }
    Paging:
      type: object
      properties:
        next:
          type: object
          properties:
            after: { type: string, example: NTI1Cg%3D%3D }
            link: { type: string, example: "?after=NTI1Cg%3D%3D" }
    AssociationRef:
      type: object
      properties:
        id: { type: string }
        type: { type: string, example: contact_to_company }
    AssociationPage:
      type: object
      properties:
        results: { type: array, items: { $ref: "#/components/schemas/AssociationRef" } }
        paging: { $ref: "#/components/schemas/Paging" }
    Associations:
      type: object
      description: Present when the associations query parameter is used, keyed by object type
      properties:
        contacts: { $ref: "#/components/schemas/AssociationPage" }
        companies: { $ref: "#/components/schemas/AssociationPage" }
        deals: { $ref: "#/components/schemas/AssociationPage" }
        tickets: { $ref: "#/components/schemas/AssociationPage" }
    AssociationInput:
      type: array
      items:
        type: object
        properties:
          to: { type: object, properties: { id: { type: string } } }
          types:
            type: array
            items:
              type: object
              properties:
                associationCategory: { type: string, enum: [HUBSPOT_DEFINED, USER_DEFINED, INTEGRATOR_DEFINED] }
                associationTypeId: { type: integer, example: 279 }
    SearchRequest:
      type: object
      properties:
        query: { type: string }
        filterGroups:
          type: array
          items:
            type: object
            properties:
              filters:
                type: array
                items:
                  type: object
                  properties:
                    propertyName: { type: string }
                    operator: { type: string, enum: [EQ, NEQ, LT, LTE, GT, GTE, BETWEEN, IN, NOT_IN, HAS_PROPERTY, NOT_HAS_PROPERTY, CONTAINS_TOKEN, NOT_CONTAINS_TOKEN] }
                    value: { type: string }
        sorts: { type: array, items: { type: string } }
        properties: { type: array, items: { type: string } }
        limit: { type: integer, maximum: 200 }
        after: { type: string }
    ContactProperties:
      type: object
      properties:
        email: { type: string, format: email }
        firstname: { type: string }
        lastname: { type: string }
        phone: { type: string }
        company: { type: string }
        jobtitle: { type: string }
        city: { type: string }
        country: { type: string }
        lifecyclestage: { type: string, enum: [subscriber, lead, marketingqualifiedlead, salesqualifiedlead, opportunity, customer, evangelist, other] }
        hs_lead_status: { type: string, enum: [NEW, OPEN, IN_PROGRESS, OPEN_DEAL, UNQUALIFIED, ATTEMPTED_TO_CONTACT, CONNECTED, BAD_TIMING] }
        hubspot_owner_id: { type: string }
        createdate: { type: string, format: date-time }
        lastmodifieddate: { type: string, format: date-time }
        hs_object_id: { type: string }
    Contact:
      type: object
      properties:
        id: { type: string, example: "51" }
        properties: { $ref: "#/components/schemas/ContactProperties" }
        createdAt: { type: string, format: date-time }
        updatedAt: { type: string, format: date-time }
        archived: { type: boolean }
        associations: { $ref: "#/components/schemas/Associations" }
    ContactCreate:
      type: object
      required: [properties]
      properties:
        properties: { $ref: "#/components/schemas/ContactProperties" }
        associations: { $ref: "#/components/schemas/AssociationInput" }
    ContactUpdate:
      type: object
      properties:
        properties: { $ref: "#/components/schemas/ContactProperties" }
    ContactPage:
      type: object
      properties:
        results: { type: array, items: { $ref: "#/components/schemas/Contact" } }
        paging: { $ref: "#/components/schemas/Paging" }
    ContactSearchPage:
      type: object
      properties:
        total: { type: integer }
        results: { type: array, items: { $ref: "#/components/schemas/Contact" } }
        paging: { $ref: "#/components/schemas/Paging" }
    CompanyProperties:
      type: object
      properties:
        name: { type: string }
        domain: { type: string }
        industry: { type: string, enum: [COMPUTER_SOFTWARE, INFORMATION_TECHNOLOGY_AND_SERVICES, FINANCIAL_SERVICES, MARKETING_AND_ADVERTISING, HOSPITAL_HEALTH_CARE, RETAIL, LOGISTICS_AND_SUPPLY_CHAIN, CONSTRUCTION, MANAGEMENT_CONSULTING, HIGHER_EDUCATION, RENEWABLES_ENVIRONMENT, FOOD_BEVERAGES] }
        phone: { type: string }
        city: { type: string }
        state: { type: string }
        country: { type: string }
        numberofemployees: { type: string }
        annualrevenue: { type: string }
        lifecyclestage: { type: string, enum: [subscriber, lead, marketingqualifiedlead, salesqualifiedlead, opportunity, customer, evangelist, other] }
        type: { type: string, enum: [PROSPECT, PARTNER, RESELLER, VENDOR, OTHER] }
        hubspot_owner_id: { type: string }
        createdate: { type: string, format: date-time }
        hs_lastmodifieddate: { type: string, format: date-time }
        hs_object_id: { type: string }
    Company:
      type: object
      properties:
        id: { type: string, example: "18446744" }
        properties: { $ref: "#/components/schemas/CompanyProperties" }
        createdAt: { type: string, format: date-time }
        updatedAt: { type: string, format: date-time }
        archived: { type: boolean }
        associations: { $ref: "#/components/schemas/Associations" }
    CompanyCreate:
      type: object
      required: [properties]
      properties:
        properties: { $ref: "#/components/schemas/CompanyProperties" }
        associations: { $ref: "#/components/schemas/AssociationInput" }
    CompanyUpdate:
      type: object
      properties:
        properties: { $ref: "#/components/schemas/CompanyProperties" }
    CompanyPage:
      type: object
      properties:
        results: { type: array, items: { $ref: "#/components/schemas/Company" } }
        paging: { $ref: "#/components/schemas/Paging" }
    CompanySearchPage:
      type: object
      properties:
        total: { type: integer }
        results: { type: array, items: { $ref: "#/components/schemas/Company" } }
        paging: { $ref: "#/components/schemas/Paging" }
    DealProperties:
      type: object
      properties:
        dealname: { type: string }
        amount: { type: string, example: "12500.00" }
        dealstage: { type: string, enum: [appointmentscheduled, qualifiedtobuy, presentationscheduled, decisionmakerboughtin, contractsent, closedwon, closedlost] }
        pipeline: { type: string, enum: [default] }
        closedate: { type: string, format: date-time }
        dealtype: { type: string, enum: [newbusiness, existingbusiness] }
        hs_priority: { type: string, enum: [low, medium, high] }
        deal_currency_code: { type: string, enum: [GBP, USD, EUR] }
        hubspot_owner_id: { type: string }
        createdate: { type: string, format: date-time }
        hs_lastmodifieddate: { type: string, format: date-time }
        hs_object_id: { type: string }
    Deal:
      type: object
      properties:
        id: { type: string, example: "9876543210" }
        properties: { $ref: "#/components/schemas/DealProperties" }
        createdAt: { type: string, format: date-time }
        updatedAt: { type: string, format: date-time }
        archived: { type: boolean }
        associations: { $ref: "#/components/schemas/Associations" }
    DealCreate:
      type: object
      required: [properties]
      properties:
        properties: { $ref: "#/components/schemas/DealProperties" }
        associations: { $ref: "#/components/schemas/AssociationInput" }
    DealUpdate:
      type: object
      properties:
        properties: { $ref: "#/components/schemas/DealProperties" }
    DealPage:
      type: object
      properties:
        results: { type: array, items: { $ref: "#/components/schemas/Deal" } }
        paging: { $ref: "#/components/schemas/Paging" }
    DealSearchPage:
      type: object
      properties:
        total: { type: integer }
        results: { type: array, items: { $ref: "#/components/schemas/Deal" } }
        paging: { $ref: "#/components/schemas/Paging" }
    TicketProperties:
      type: object
      properties:
        subject: { type: string }
        content: { type: string }
        hs_pipeline: { type: string, enum: ["0"] }
        hs_pipeline_stage: { type: string, enum: ["1", "2", "3", "4"], description: "Default support pipeline: 1 New, 2 Waiting on contact, 3 Waiting on us, 4 Closed" }
        hs_ticket_priority: { type: string, enum: [LOW, MEDIUM, HIGH, URGENT] }
        hs_ticket_category: { type: string, enum: [PRODUCT_ISSUE, BILLING_ISSUE, FEATURE_REQUEST, GENERAL_INQUIRY] }
        source_type: { type: string, enum: [EMAIL, CHAT, PHONE, FORM] }
        hubspot_owner_id: { type: string }
        createdate: { type: string, format: date-time }
        hs_lastmodifieddate: { type: string, format: date-time }
        hs_object_id: { type: string }
    Ticket:
      type: object
      properties:
        id: { type: string, example: "3303911450" }
        properties: { $ref: "#/components/schemas/TicketProperties" }
        createdAt: { type: string, format: date-time }
        updatedAt: { type: string, format: date-time }
        archived: { type: boolean }
        associations: { $ref: "#/components/schemas/Associations" }
    TicketCreate:
      type: object
      required: [properties]
      properties:
        properties: { $ref: "#/components/schemas/TicketProperties" }
        associations: { $ref: "#/components/schemas/AssociationInput" }
    TicketUpdate:
      type: object
      properties:
        properties: { $ref: "#/components/schemas/TicketProperties" }
    TicketPage:
      type: object
      properties:
        results: { type: array, items: { $ref: "#/components/schemas/Ticket" } }
        paging: { $ref: "#/components/schemas/Paging" }
    TicketSearchPage:
      type: object
      properties:
        total: { type: integer }
        results: { type: array, items: { $ref: "#/components/schemas/Ticket" } }
        paging: { $ref: "#/components/schemas/Paging" }
    Owner:
      type: object
      properties:
        id: { type: string, example: "41629779" }
        email: { type: string, format: email }
        firstName: { type: string }
        lastName: { type: string }
        userId: { type: integer }
        type: { type: string, enum: [PERSON, QUEUE] }
        createdAt: { type: string, format: date-time }
        updatedAt: { type: string, format: date-time }
        archived: { type: boolean }
        teams:
          type: array
          items:
            type: object
            properties:
              id: { type: string }
              name: { type: string }
              primary: { type: boolean }
    OwnerPage:
      type: object
      properties:
        results: { type: array, items: { $ref: "#/components/schemas/Owner" } }
        paging: { $ref: "#/components/schemas/Paging" }
    PipelineStage:
      type: object
      properties:
        id: { type: string }
        label: { type: string }
        displayOrder: { type: integer }
        metadata: { type: object, additionalProperties: { type: string } }
    Pipeline:
      type: object
      properties:
        id: { type: string }
        label: { type: string }
        displayOrder: { type: integer }
        archived: { type: boolean }
        stages: { type: array, items: { $ref: "#/components/schemas/PipelineStage" } }
    PipelineList:
      type: object
      properties:
        results: { type: array, items: { $ref: "#/components/schemas/Pipeline" } }
