---
title: "Resolve a sync conflict"
description: "ours queues a push of our values to HubSpot."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/hubspot/resolve-a-sync-conflict"
---
# Resolve a sync conflict

> ours queues a push of our values to HubSpot.

<api-operation method="POST" path="/v1/businesses/{biz}/integrations/hubspot/conflicts/{id}/resolve">
<template v-slot:docs="">

`ours` queues a push of our values to HubSpot. `theirs` reads the record from HubSpot and applies its current values for the conflicting fields here. Either way the record syncs normally again.

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Business id (biz_…)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The conflict's id.
    </td>
  </tr>
</tbody>
</table>

## Headers

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Idempotency-Key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Safely retry writes — repeats return the original response. If a write FAILED after it had already taken effect, that failure is what repeats: the key is spent, and a new attempt needs a new key.
    </td>
  </tr>
</tbody>
</table>

## Body

The request body is **required**.

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        keep
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Which value to keep: <code>
        ours
      </code>
      
       or <code>
        theirs
      </code>
      
      . One of <code>
        ours
      </code>
      
      , <code>
        theirs
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The conflict's id (hscf_…).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The conflict's status. One of <code>
        open
      </code>
      
      , <code>
        resolved
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        local_type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The type of our record: <code>
        customer
      </code>
      
       or <code>
        subscription
      </code>
      
      . One of <code>
        customer
      </code>
      
      , <code>
        subscription
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        local_id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Our record's public id.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        remote_type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The type of the HubSpot record. One of <code>
        contact
      </code>
      
      , <code>
        company
      </code>
      
      , <code>
        deal
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        remote_id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The id of the HubSpot record.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        fields
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The fields.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        remote_updated_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the HubSpot record was last changed (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        detected_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the conflict was found (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        resolution
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Which value was kept: <code>
        ours
      </code>
      
       or <code>
        theirs
      </code>
      
      . Null while unresolved. One of <code>
        ours
      </code>
      
      , <code>
        theirs
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        resolved_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the conflict was resolved (ISO-8601 UTC), or null.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      The resolved conflict
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        400
      </code>
    </td>
    
    <td>
      Invalid body, or HubSpot needs reconnecting to take its values
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        404
      </code>
    </td>
    
    <td>
      No such conflict, or HubSpot is not connected
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        409
      </code>
    </td>
    
    <td>
      The conflict was already resolved
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        502
      </code>
    </td>
    
    <td>
      HubSpot refused the request
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl -X POST "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/integrations/hubspot/conflicts/XXXXXXXXXXXX01/resolve" \
  -H "Authorization: Bearer $TMBILLING_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "keep": "ours"
  }'
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "object": "hubspot_conflict",
  "id": "hscf_1a2b3c",
  "status": "open",
  "local_type": "customer",
  "local_id": "cus_XXXXXXXXXXXX01",
  "remote_type": "contact",
  "remote_id": "51234567890",
  "fields": [
    {
      "field": "email",
      "label": "Region",
      "remote_property": "email",
      "ours": "maya@example.com",
      "theirs": "maya@example.com"
    }
  ],
  "remote_updated_at": "2026-03-14T09:30:00Z",
  "detected_at": "2026-03-14T09:30:00Z",
  "resolution": "ours",
  "resolved_at": "2026-03-14T09:30:00Z"
}
```

```json [400 Bad Request]
{
  "error": {
    "type": "invalid_request_error",
    "message": "Invalid body, or HubSpot needs reconnecting to take its values"
  }
}
```

```json [404 Not Found]
{
  "error": {
    "type": "invalid_request_error",
    "message": "No such conflict, or HubSpot is not connected"
  }
}
```

```json [409 Conflict]
{
  "error": {
    "type": "conflict_error",
    "message": "The conflict was already resolved"
  }
}
```

```json [502 Bad Gateway]
{
  "error": {
    "type": "api_error",
    "message": "HubSpot refused the request"
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
