---
title: "Update an entity"
method: PATCH
path: "/entities/{id}"
tags: ["Entities"]
---

# Update an entity

`PATCH /entities/{id}`

## Request

- Base URL: `https://api.soraban.com`
- URL: `https://api.soraban.com/entities/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/soraban/apis/soraban-private-api/docs/entities/:id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates entity details.

`tag_ids` replaces the entity's whole tag set: any existing tag not listed is removed. The ids must already belong to this entity, so create tags first with `POST /entities/{entity_id}/tags`.

## Request body

- object
  - `name` string
  - `external_entity_id` string
  - `street` string
  - `city` string
  - `state` string
  - `zip` string
  - `country` string
  - `user_id` integer: Reassign the entity to another client. Must be a client, not an advisor.
  - `entity_type` string
  - `business_email` string, email
  - `other_email` string, email
  - `inactive` boolean
  - `tag_ids` integer[]: Replaces the entity's tags. Tags not listed here are deleted.

## Response `200`

The updated entity.

- Entity
  - `id` integer
  - `entity_type` string, nullable
  - `name` string, nullable
  - `street` string, nullable
  - `state` string, nullable
  - `city` string, nullable
  - `zip` string, nullable
  - `country` string, nullable
  - `inactive` boolean, nullable
  - `created_at` string, date-time
  - `upload_link` string, nullable
  - `user` Client
    - `id` integer
    - `email` string, nullable
    - `fname` string, nullable
    - `lname` string, nullable
    - `full_name` string, nullable
    - `time_zone` string, nullable
    - `phone_number` string, nullable
    - `preferred_name` string, nullable
    - `created_at` string, date-time
    - `last_activity_at` string, date-time, nullable
    - `preferred_sign_in_method` string, nullable
    - `active` boolean, nullable: False for a client marked inactive.
    - `work_phone_number` string, nullable
    - `work_phone_extension` string, nullable
    - `work_email` string, nullable
    - `external_user_id` string, nullable
    - `entities` ClientEntityMembership[]
      - `entity_id` integer
      - `entity_name` string, nullable
      - `entity_type` string, nullable
      - `external_entity_id` string, nullable
      - `role` string, nullable
      - `firm_role_id` integer, nullable
      - `tags` EntityTag[]: Tags as objects.
        - `id` integer
        - `name` string
    - `assigned_advisor_id` integer, nullable: Only present for firms on the older contact management model.
    - `assigned_advisor` string, nullable: Only present for firms on the older contact management model.
  - `business_email` string, nullable
  - `other_email` string, nullable
  - `owners` Client[]: Every client attached to this entity.
    - `id` integer
    - `email` string, nullable
    - `fname` string, nullable
    - `lname` string, nullable
    - `full_name` string, nullable
    - `time_zone` string, nullable
    - `phone_number` string, nullable
    - `preferred_name` string, nullable
    - `created_at` string, date-time
    - `last_activity_at` string, date-time, nullable
    - `preferred_sign_in_method` string, nullable
    - `active` boolean, nullable: False for a client marked inactive.
    - `work_phone_number` string, nullable
    - `work_phone_extension` string, nullable
    - `work_email` string, nullable
    - `external_user_id` string, nullable
    - `entities` ClientEntityMembership[]
      - `entity_id` integer
      - `entity_name` string, nullable
      - `entity_type` string, nullable
      - `external_entity_id` string, nullable
      - `role` string, nullable
      - `firm_role_id` integer, nullable
      - `tags` EntityTag[]: Tags as objects.
        - `id` integer
        - `name` string
    - `assigned_advisor_id` integer, nullable: Only present for firms on the older contact management model.
    - `assigned_advisor` string, nullable: Only present for firms on the older contact management model.
  - `external_entity_id` string, nullable
  - `deleted_at` string, date-time, nullable
  - `hash_id` string, nullable
  - `firm_role_summary` string: A formatted, human-readable summary of who holds which role on the entity, not structured data. Empty when no roles are assigned. Use `GET /entities/{entity_id}/firm_role_assignments` if you need the underlying ids.
  - `firm_group_id` integer, nullable
  - `firm_group` object, nullable
  - `tags` EntityTag[]: Tags as objects.
    - `id` integer
    - `name` string

## Other responses

- `403`: Missing or invalid API key, or the record does not belong to your firm.
- `422`: The request was understood but rejected. See `error` for the reason.

---

[API](https://skmtc.dev/soraban/apis/soraban-private-api.md) - [All operations](https://skmtc.dev/soraban/apis/soraban-private-api/llms.txt) - [OpenAPI document](https://skmtc.dev/soraban/apis/soraban-private-api/revisions/1c230fa547ad?raw)
