> ## 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 or update a group of contacts

> This endpoint is used to create a group of contacts or update existing ones. Performance is best when batch size is limited to 100 contacts or fewer. Use case for this endpoint: It's particularly useful for periodic syncs from another contacts database to HubSpot. When using this endpoint, please keep in mind that any errors with a single contact in your batch will prevent the entire batch from processing. If this happens, we'll return a 400 response with additional details as to the cause. Note: Changes made through this endpoint are processed asynchronously, so can take several minutes for changes to be applied to contact records. Note: The batch size should not exceed 1000 contacts per request.

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.contacts.read', 'content', 'crm.objects.contacts.write']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v1/crm-contacts-v1.json POST /contacts/v1/contact/batch/
openapi: 3.0.0
info:
  title: CRM Contacts API v1
  version: 1.0.0
  description: Use the contact lists API to create and manage contact lists.
  x-hubspot-introduction: Use the contact lists API to create and manage contact lists.
  x-hubspot-api-use-case: >-
    Retrieve a contact list by ID to bring that contact data into your external
    system.
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /contacts/v1/contact/batch/:
    post:
      summary: Create or update a group of contacts
      description: >-
        This endpoint is used to create a group of contacts or update existing
        ones. Performance is best when batch size is limited to 100 contacts or
        fewer. Use case for this endpoint: It's particularly useful for periodic
        syncs from another contacts database to HubSpot. When using this
        endpoint, please keep in mind that any errors with a single contact in
        your batch will prevent the entire batch from processing. If this
        happens, we'll return a 400 response with additional details as to the
        cause. Note: Changes made through this endpoint are processed
        asynchronously, so can take several minutes for changes to be applied to
        contact records. Note: The batch size should not exceed 1000 contacts
        per request.
      operationId: postcontactsv1contactbatch
      parameters:
        - name: auditId
          in: query
          required: false
          description: >-
            A string that allows you to represent these change sources however
            you'd like.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: List of contacts to create or update.
              items:
                type: object
                properties:
                  vid:
                    type: string
                    description: Contact ID for updating existing contact.
                  email:
                    type: string
                    description: Email address for identifying contact.
                  properties:
                    type: array
                    items:
                      type: object
                      properties:
                        property:
                          type: string
                        value:
                          type: string
      responses:
        '202':
          description: >-
            Successful response - This endpoint is used to create a group of
            contacts or update existing ones
          content:
            application/json:
              schema:
                type: object
              examples:
                example1:
                  summary: Merge Contacts - Example 1
                  value: >-
                    [ { "vid": "259429", "properties": [ { "property":
                    "firstname", "value": "Harper" }, { "property": "lastname",
                    "value": "Wolfberg" }, { "property": "website", "value": "
                    }, { "property": "company", "value": "HubSpot" }, {
                    "property": "phone", "value": "555-122-2323" }, {
                    "property": "address", "value": "25 First Street" }, {
                    "property": "city", "value": "Cambridge" }, { "property":
                    "state", "value": "MA" }, { "property": "zip", "value":
                    "02139" } ] }, { "email": "testingapis@hubspot.com",
                    "properties": [ { "property": "firstname", "value": "Codey"
                    }, { "property": "lastname", "value": "Huang" }, {
                    "property": "website", "value": " }, { "property":
                    "company", "value": "HubSpot" }, { "property": "phone",
                    "value": "555-122-2323" }, { "property": "address", "value":
                    "25 First Street" }, { "property": "city", "value":
                    "Cambridge" }, { "property": "state", "value": "MA" }, {
                    "property": "zip", "value": "02139" } ] } ]
      security:
        - oauth2:
            - crm.objects.contacts.write
        - oauth2_legacy: []
        - private_apps:
            - crm.objects.contacts.write
        - private_apps_legacy: []
components: {}

````