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

# Get Owner Field Mappings

> Which CRM fields hold the account owner, the CS owner and a connector's owner

Reads which property of one connected CRM holds each owner Clustr reads, and which side may
change it. Three owners:

| Key | Record | Used for |
| - | - | - |
| `company` | A company (an Account in Clustr) | The account owner. Attack competitor alerts name it, read live from your CRM |
| `contact` | A contact (a Connector in Clustr) | The connector's owner |
| `company_cs` | A company | The CS owner. Defense competitor alerts name it, read live from your CRM |

Change them with [Set Owner Field Mappings](https://docs.clustr-ai.com/api-reference/set-owner-field-mappings.md).

Each mapping has:

| Field | Description |
| - | - |
| `field` | The CRM property's API name. `""` means no field is mapped |
| `direction` | Which side may change the owner: `both`, `crm_owns`, `clustr_owns` or `off` (paused) |
| `isDefault` | `true` when nothing is saved and the value shown is the CRM's default |
| `defaultField` | The CRM's standard owner field: `hubspot_owner_id` on HubSpot, `OwnerId` on Salesforce, `""` on Attio |

> [!NOTE]
>
> **The CS owner has no default.** `company_cs` is empty until you map it, on every CRM. Until
> then the account's CS owner is the one set in Clustr. Once mapped, it syncs in the direction
> you choose, the same way the account owner does.

## Errors

| Status | Code | When |
| - | - | - |
| 400 | | `provider` is missing or not one of the three |
| 404 | `CRM_NOT_CONNECTED` | That CRM is not connected for this workspace |

```bash cURL theme={null}
curl "https://api.clustr-ai.com/api/public/crm/owner-field-mappings?provider=hubspot" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python Python theme={null}
import requests

requests.get(
    "https://api.clustr-ai.com/api/public/crm/owner-field-mappings",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"provider": "hubspot"},
)
```

```javascript JavaScript theme={null}
await fetch("https://api.clustr-ai.com/api/public/crm/owner-field-mappings?provider=hubspot", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
```

```json 200 theme={null}
{
  "success": true,
  "data": {
    "provider": "hubspot",
    "company": { "field": "hubspot_owner_id", "direction": "both", "isDefault": true, "defaultField": "hubspot_owner_id" },
    "contact": { "field": "hubspot_owner_id", "direction": "both", "isDefault": true, "defaultField": "hubspot_owner_id" },
    "company_cs": { "field": "customer_success_manager", "direction": "crm_owns", "isDefault": false, "defaultField": "" }
  }
}
```


## OpenAPI

````yaml GET /crm/owner-field-mappings
openapi: 3.1.0
info:
  title: Clustr Public API
  description: >
    Programmatic access to your Clustr network: import connectors, search warm
    intros (opportunities), and manage target accounts.


    ## Authentication

    All endpoints require a Bearer token (API key) in the `Authorization`
    header.


    ```

    Authorization: Bearer <your_api_key>

    ```


    API keys can be created and managed from the [API settings
    page](https://app.clustr-ai.com/api).
  version: '1.0'
  contact:
    name: Clustr Support
    url: https://clustr-ai.com
servers:
  - url: https://api.clustr-ai.com/api/public
    description: Production
security:
  - BearerAuth: []
paths:
  /crm/owner-field-mappings:
    parameters:
      - name: provider
        in: query
        required: true
        description: >-
          The CRM to read or change: `hubspot`, `salesforce` or `attio`. That
          CRM must be connected to your workspace.
        schema:
          type: string
          enum:
            - hubspot
            - salesforce
            - attio
        example: hubspot
    get:
      tags:
        - Owners
      summary: Get Owner Field Mappings
      description: >
        Returns which property of one connected CRM holds each owner Clustr
        reads, and which side

        may change it. There are three owners:


        - `company`: the account owner, on a CRM company. Attack competitor
        alerts name this
          owner, read live from your CRM.
        - `contact`: a connector's owner, on a CRM contact.

        - `company_cs`: the CS owner, on a CRM company. Defense competitor
        alerts name this
          owner, read live from your CRM.

        The CS owner starts empty on every CRM until you map it, and it is
        always read from your

        CRM: its direction is `crm_owns`, or `off` while paused. Once mapped, it
        is read on every

        sync and shown on your synced companies. Change the mappings with Set
        Owner Field

        Mappings.
      operationId: getOwnerFieldMappings
      responses:
        '200':
          description: The owner field mappings for this CRM
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/OwnerFieldMappings'
              example:
                success: true
                data:
                  provider: hubspot
                  company:
                    field: hubspot_owner_id
                    direction: both
                    isDefault: true
                    defaultField: hubspot_owner_id
                  contact:
                    field: hubspot_owner_id
                    direction: both
                    isDefault: true
                    defaultField: hubspot_owner_id
                  company_cs:
                    field: customer_success_manager
                    direction: crm_owns
                    isDefault: false
                    defaultField: ''
        '400':
          description: '`provider` is missing or is not hubspot, salesforce or attio'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
        '404':
          description: >-
            That CRM is not connected to your workspace (code
            `CRM_NOT_CONNECTED`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  message: hubspot is not connected for this tenant
                  code: CRM_NOT_CONNECTED
components:
  schemas:
    OwnerFieldMappings:
      type: object
      required:
        - provider
        - company
        - contact
        - company_cs
      properties:
        provider:
          type: string
          enum:
            - hubspot
            - salesforce
            - attio
          example: hubspot
        company:
          allOf:
            - $ref: '#/components/schemas/OwnerFieldMapping'
          description: >-
            The account owner, on a CRM company. Attack competitor alerts name
            it.
        contact:
          allOf:
            - $ref: '#/components/schemas/OwnerFieldMapping'
          description: A connector's owner, on a CRM contact.
        company_cs:
          allOf:
            - $ref: '#/components/schemas/OwnerFieldMapping'
          description: >-
            The CS owner, on a CRM company, always read from your CRM. Defense
            competitor alerts name it.
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            message:
              type: string
              example: Invalid request body
            code:
              type: string
              example: BAD_REQUEST
    OwnerFieldMapping:
      type: object
      description: One owner's effective mapping.
      properties:
        field:
          type: string
          description: >-
            The CRM property's API name. An empty string means no field is
            mapped.
          example: hubspot_owner_id
        direction:
          type: string
          enum:
            - both
            - crm_owns
            - clustr_owns
            - 'off'
          description: Which side may change the owner; `off` means the mapping is paused.
          example: both
        isDefault:
          type: boolean
          description: >-
            true when no mapping is saved for this owner and the value shown is
            the CRM's default.
          example: true
        defaultField:
          type: string
          description: >-
            The CRM's standard owner field: `hubspot_owner_id` on HubSpot,
            `OwnerId` on Salesforce, and an empty string on Attio and for
            `company_cs`.
          example: hubspot_owner_id
        object:
          type: string
          description: >-
            The custom object the owner is read from, when it is not the company
            itself. Only `company_cs` on HubSpot.
          example: p_communities
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: The API key you created on the API settings page of the Clustr app.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.