---
title: "Add owners to an identity"
method: POST
path: "/v1/nhi/identities/{identity_id}/owners"
tags: ["NHI Identity Owners"]
---

# Add owners to an identity

`POST /v1/nhi/identities/{identity_id}/owners`

## Request

- Base URL: `https://api.gitguardian.com`
- URL: `https://api.gitguardian.com/v1/nhi/identities/{identity_id}/owners`
- Auth: HTTP bearer

Add owners to a non-human identity, identified by their email address.
Owners that already exist on the identity are kept.

An identity can have at most 5 owners.

The API token must have the Manager access level or above, or be a service account token.

## Path parameters

- `identity_id` integer, required

## Request body

- object
  - `owners` object[], required
    - `email` string, email, required

## Response `201`

Owners were added.

- object
  - `owners` object[], required
    - `id` integer, required: Id of the owner. Use it to remove the owner from the identity.
    - `email` string, email, required
    - `user_id` integer, nullable: Id of the GitGuardian user linked to this owner. It is set only when the email belonged to an active workspace member when the owner was added. It is a user id, not a member id.
    - `state` 'suggested' | 'manually_added', required: - `suggested`: GitGuardian suggests this owner. - `manually_added`: a user or an API call added this owner.
    - `confidence` number, float, required: Confidence of the ownership, between 0 and 1.
    - `rule` string, nullable: Rule that suggested this owner.
    - `evidence` object, nullable: Data that supports the suggestion.

## Other responses

- `400`: Invalid data, or the identity would exceed the maximum number of owners
- `401`: Invalid API key
- `403`: Permission denied
- `404`: Identity not found
- `503`: API under maintenance

## Changes

- **2026-10-14** `a5ca8c876a75`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gitguardian/apis/gitguardian-api/changes/v1/nhi/identities/:identity_id/owners/post.md)

---

[API](https://skmtc.dev/gitguardian/apis/gitguardian-api.md) - [All operations](https://skmtc.dev/gitguardian/apis/gitguardian-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitguardian/apis/gitguardian-api/revisions/5829df7b9045?raw)
