---
title: "Partially update an Identity"
method: PATCH
path: "/api/users/{user_id}/identities/{id}/"
tags: ["users"]
---

# Partially update an Identity

`PATCH /api/users/{user_id}/identities/{id}/`

## Request

- Base URL: `https://docs.blindinsight.io` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.blindinsight.io/api/users/{user_id}/identities/{id}/`
- Auth: one of:
  - API key in cookie `sessionid`
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/docs/api/users/:user_id/identities/:id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update an identity with only the specified fields.

The response will be the updated identity object.

**On the command line:**

```bash
blind users identities partial-update --user-id "<user_id>" --id "<identity_id>" --data identity-update.json
```

## Path parameters

- `id` string, required
- `user_id` string, required

## Request body

- PatchedIdentity: HyperlinkedModelSerializer with `id` as the first field.
  - `id` string
  - `url` string, uri
  - `user` string, uri
  - `device_id` string: The device ID associated with this identity.
  - `primary_public_key` string: The primary PGP key for the identity.
  - `sub_public_key` string: The PGP sub-key for the identity.

## Response `200`

- Identity: HyperlinkedModelSerializer with `id` as the first field.
  - `id` string, required
  - `url` string, uri, required
  - `user` string, uri, required
  - `device_id` string, required: The device ID associated with this identity.
  - `primary_public_key` string, required: The primary PGP key for the identity.
  - `sub_public_key` string, required: The PGP sub-key for the identity.

---

[API](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api.md) - [All operations](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/revisions/0ac902401cea?raw)
