---
title: "Assign Contact Owner"
method: POST
path: "/contacts/assign-owner"
tags: ["Contacts"]
---

# Assign Contact Owner

`POST /contacts/assign-owner`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/contacts/assign-owner`
- Auth: HTTP bearer

Set the owner on EVERY contact matching a selection.

The selection is resolved server-side, so the number of contacts affected
is not bounded by anything in the request. A null `owner_id` UNASSIGNS
them all.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- AssignOwnerMatchingRequest: Set the owner on every record matching a selection. A null `owner_id` UNASSIGNS the matching records rather than leaving them alone, so an omitted owner is a destructive instruction, not a no-op.
  - `owner_id` string, nullable: Owner to assign. Null clears the owner on every match.
  - `list_id` integer, nullable: Restrict the selection to this list.
  - `filterModel` object: Per-column filters.
  - `segmentFilter` SegmentFilterGroup: An AND/OR group of leaves and nested groups, at most three groups deep. Mirrors `SegmentFilterGroup` in `contacts.domain.value_objects.ag_grid_models`. `op` is closed because the app REFUSES an unrecognised connector rather than defaulting to AND - defaulting would silently return a different result set, and on a destructive route that is a different set of records acted on. FIXED DEPTH, NOT RECURSIVE. The app's model is self-referencing; the published one deliberately is not, because a schema that reaches itself through `$ref` sends the docs renderer into unbounded recursion. Three group levels (this one, `SegmentFilterSubgroup`, `SegmentFilterInnerGroup`) cover every filter the app's own builder produces; the app's larger depth and leaf budget still applies and surfaces as a 422.
    - `op` 'AND' | 'OR' | 'and' | 'or', required: Connector for this group. Case-insensitive.
    - `children` union[]: Nested groups and/or leaf conditions.
      - union
        - SegmentFilterSubgroup: The second group level: leaves and/or innermost groups.
          - `op` 'AND' | 'OR' | 'and' | 'or', required: Connector for this group. Case-insensitive.
          - `children` union[]: Innermost groups and/or leaf conditions.
            - union
              - …
        - SegmentFilterLeaf: One field-level condition inside an advanced-filter tree. Mirrors `contacts.domain.value_objects.ag_grid_models.SegmentFilterLeaf`. `op` is CLOSED here: the app compiles its UI vocabulary down to this canonical set before sending, and an unrecognised operator reaching the SQL builder is a 500 rather than a refusal naming the valid operators.
          - `field` string, required: Column to test, e.g. `CONTACT_JOB_TITLE`.
          - `op` 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'contains' | 'icontains' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'between' | 'is_null' | 'is_not_null', required: Comparison to apply.
          - `value` unknown
          - `valueTo` unknown

## Response `200`

Successful Response

- ApiResponseCrmRecordPayload
  - `data` CrmRecordPayload, required: An open envelope for one record, one dashboard or one job receipt. Open because most of these reads are COMPUTED shapes - an engagement summary, a next-best-step, an intelligence status - that grow with the product, and dropping a field from an advisory read makes it say "nothing to report" rather than "we did not tell you".
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
