> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.jp/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a deal

> The _create a deal_ endpoint is used to create and track deals in HubSpot. It also allows you to connect HubSpot with an external CRM or other sales management software. What's a use case for this endpoint? Your company uses HubSpot along with an external CRM and website hosting platform. Your sales team uses the _create a deal_ endpoint to make sure that certain sales activity in the CRM will automatically create a deal in HubSpot. Additionally, when a contact submits a sales qualification form on your website, this endpoint creates a deal in HubSpot.

#### Associations

You can (but are not required to) create associations between deals and other CRM objects the same way you would create an association between companies and contacts.

#### Properties

You can pass any custom property value to the Deals API as long as you create the property first. While the dealstage property and pipeline property are not required, it is recommended to specify both, especially on accounts with multiple pipelines. If left unspecified, the default pipeline is assumed. You can manage pipelines and dealstages through the CRM Pipelines API.

export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['crm.objects.deals.read', 'crm.objects.deals.write']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v1/crm-deals-v1.json POST /deals/v1/deal/
openapi: 3.0.0
info:
  title: CRM Deals API v1
  version: 1.0.0
  description: >-
    Use the deals API to create and manage CRM records that represent
    transactions with contacts and/or companies. Deals progress through pipeline
    stages to reflect whether the transaction has been completed, is active, or
    has otherwise been lost.
  x-hubspot-introduction: >-
    Use the deals API to create and manage CRM records that represent
    transactions with contacts and/or companies. Deals progress through pipeline
    stages to reflect whether the transaction has been completed, is active, or
    has otherwise been lost.
  x-hubspot-api-use-case: >-
    When a sales rep is negotiating a potential purchase with a prospective
    customer, create a deal record to track the negotiation process. When the
    customer later makes their purchase, you can update the deal to a closed
    stage.
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /deals/v1/deal/:
    post:
      summary: Create a deal
      description: >-
        The _create a deal_ endpoint is used to create and track deals in
        HubSpot. It also allows you to connect HubSpot with an external CRM or
        other sales management software. What's a use case for this endpoint?
        Your company uses HubSpot along with an external CRM and website hosting
        platform. Your sales team uses the _create a deal_ endpoint to make sure
        that certain sales activity in the CRM will automatically create a deal
        in HubSpot. Additionally, when a contact submits a sales qualification
        form on your website, this endpoint creates a deal in HubSpot.


        #### Associations


        You can (but are not required to) create associations between deals and
        other CRM objects the same way you would create an association between
        companies and contacts.


        #### Properties


        You can pass any custom property value to the Deals API as long as you
        create the property first. While the dealstage property and pipeline
        property are not required, it is recommended to specify both, especially
        on accounts with multiple pipelines. If left unspecified, the default
        pipeline is assumed. You can manage pipelines and dealstages through the
        CRM Pipelines API.
      operationId: postdealsv1deal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                properties:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      value:
                        type: string
                associations:
                  type: object
                  properties:
                    associatedCompanyIds:
                      type: array
                      items:
                        type: integer
                    associatedVids:
                      type: array
                      items:
                        type: integer
      responses:
        '200':
          description: Successful response - Deal created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  portalId:
                    type: integer
                  dealId:
                    type: integer
                  isDeleted:
                    type: boolean
                  associations:
                    type: object
                  properties:
                    type: object
      security:
        - oauth2:
            - crm.objects.deals.write
        - oauth2_legacy: []
        - private_apps:
            - crm.objects.deals.write
        - private_apps_legacy: []
components: {}

````