---
title: "IdentityHound API: The signed-in principal"
description: "Get the signed-in principal, update the signed-in principal, list sign-in identities, send a code to add an email, verify an added email, remove a sign-in identity, list sessions, end a session, end other sessions, merge a guest, or merge another account, with the IdentityHound API."
url: "https://agentpost.tools/docs/identityhound/reference/me"
kind: reference
---

# The signed-in principal

The caller’s own profile, sign-in identities, and sessions. Of these, a delegated token reaches only `GET /me` and sign-out: a delegate acting for a principal never reaches the principal’s account. Elsewhere it acts within its delegation, such as in `POST /access/check` and `GET /access/permissions`.

[Sessions](/docs/identityhound/concepts/sessions.md) explains how long a session lasts and what ends it, and [Principals](/docs/identityhound/concepts/principals.md) what a principal is.

Paths are relative to `https://api.agentpost.tools/v1/identity`, and every request follows the [API basics](/docs/platform/api-basics.md). [Who may call](/docs/identityhound/reference.md#who-may-call) explains each kind of caller.

## Get the signed-in principal

`GET /me`

The signed-in principal.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.get()`

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `principal` | [`Principal`](/docs/identityhound/reference/principals.md#the-principal-object) | Always |  |

### Errors

-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)
-   [`not_found`](/docs/identityhound/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/identity/me \
  -H "Authorization: Bearer agp_st_…"
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { principal } = await client.me.get();
```

```json title="Response"
{
  "principal": {
    "id": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
    "kind": "human",
    "status": "active",
    "displayName": "Ada Lovelace",
    "projectRoles": [],
    "lastActiveAt": "2026-11-13T09:30:00.000Z",
    "metadata": {},
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-13T09:30:00.000Z"
  }
}
```

## Update the signed-in principal

`PATCH /me`

Changes the display name, avatar, metadata, or declared kind.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.patch(patch)`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | `string` or `null` | No | One of `"human"`, `"agent"`, or `"service"`. |
| `displayName` | `string` or `null` | No | A supplied name, 1 to 120 characters. Send null to clear it. |
| `avatarUrl` | `string` or `null` | No |  |
| `metadata` | `object` | No |  |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `principal` | [`Principal`](/docs/identityhound/reference/principals.md#the-principal-object) | Always |  |

### Errors

-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)
-   [`not_found`](/docs/identityhound/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X PATCH https://api.agentpost.tools/v1/identity/me \
  -H "Authorization: Bearer agp_st_…" \
  -H "Content-Type: application/json" \
  -d '{
    "avatarUrl": "https://cdn.example.com/avatars/ada.png"
  }'
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { principal } = await client.me.patch({
  avatarUrl: 'https://cdn.example.com/avatars/ada.png',
});
```

```json title="Response"
{
  "principal": {
    "id": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
    "kind": "human",
    "status": "active",
    "displayName": "Ada Lovelace",
    "projectRoles": [],
    "lastActiveAt": "2026-11-13T09:30:00.000Z",
    "metadata": {},
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-13T09:30:00.000Z",
    "avatarUrl": "https://cdn.example.com/avatars/ada.png"
  }
}
```

## List sign-in identities

`GET /me/identities`

The sign-in identities linked to the caller.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.identities()`

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `identities` | [`Identity`](/docs/identityhound/reference/me.md#the-identity-object) array | Always |  |

### Errors

-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/identity/me/identities \
  -H "Authorization: Bearer agp_st_…"
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { identities } = await client.me.identities();
```

```json title="Response"
{
  "identities": [
    {
      "id": "idn_01JD574H5SQYRFZHDKFXZNEYTQ",
      "principalId": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
      "type": "email",
      "provider": "email",
      "subject": "ada@example.com",
      "verifiedAt": "2026-11-02T14:05:00.000Z",
      "createdAt": "2026-11-02T14:05:00.000Z",
      "lastUsedAt": "2026-11-13T09:30:00.000Z"
    },
    {
      "id": "idn_01JDG344JJGW867DQ6EJ5WGCY2",
      "principalId": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
      "type": "oauth",
      "provider": "twitch",
      "subject": "91234567",
      "verifiedAt": "2026-11-03T08:20:00.000Z",
      "profile": {
        "login": "ada_codes",
        "displayName": "ada_codes"
      },
      "createdAt": "2026-11-03T08:20:00.000Z"
    }
  ]
}
```

## Send a code to add an email

`POST /me/identities/email`

Sends a code to an email address the caller wants to add.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.requestEmailCode(input)`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | `string` | Yes | An email address; up to 254 characters. |

### Response

`202 Accepted`, with [`CodeRequested`](/docs/identityhound/reference/auth.md#the-coderequested-object).

### Errors

-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)
-   [`not_found`](/docs/identityhound/errors.md#not_found) (404)
-   [`sign_in_disabled`](/docs/identityhound/errors.md#sign_in_disabled) (403)
-   [`throttled`](/docs/identityhound/errors.md#throttled) (429)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/identity/me/identities/email \
  -H "Authorization: Bearer agp_st_…" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "ada@work.example.com"
  }'
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { verificationId, resendAfter } = await client.me.requestEmailCode({
  email: 'ada@work.example.com',
});
```

```json title="Response"
{
  "verificationId": "ver_01JD96D8WS9SFFHA6AZCHN0KZH",
  "resendAfter": 30
}
```

## Verify an added email

`POST /me/identities/email/verify`

Checks the code and links the email address as an identity.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.verifyEmailCode(input)`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | `string` | Yes | An email address; up to 254 characters. |
| `code` | `string` | Yes | The 6-digit code from the email. |
| `verificationId` | `string` | Yes | The verificationId the code request returned. |

### Response

`201 Created`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `identity` | [`Identity`](/docs/identityhound/reference/me.md#the-identity-object) | Always |  |

### Errors

-   [`code_expired`](/docs/identityhound/errors.md#code_expired) (400)
-   [`code_invalid`](/docs/identityhound/errors.md#code_invalid) (400)
-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)
-   [`identity_in_use`](/docs/identityhound/errors.md#identity_in_use) (409)
-   [`throttled`](/docs/identityhound/errors.md#throttled) (429)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/identity/me/identities/email/verify \
  -H "Authorization: Bearer agp_st_…" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "ada@work.example.com",
    "code": "123456",
    "verificationId": "ver_01JD96D8WS9SFFHA6AZCHN0KZH"
  }'
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { identity } = await client.me.verifyEmailCode({
  email: 'ada@work.example.com',
  code: '123456',
  verificationId: 'ver_01JD96D8WS9SFFHA6AZCHN0KZH',
});
```

```json title="Response"
{
  "identity": {
    "id": "idn_01JDP3W8Q2X7M4R9T6V1B5N0KC",
    "principalId": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
    "type": "email",
    "provider": "email",
    "subject": "ada@work.example.com",
    "verifiedAt": "2026-11-13T09:30:00.000Z",
    "createdAt": "2026-11-13T09:30:00.000Z",
    "lastUsedAt": "2026-11-13T09:30:00.000Z"
  }
}
```

## Remove a sign-in identity

`DELETE /me/identities/:id`

Unlinks a sign-in identity when the principal has another way to sign in. Sessions started with the removed identity end.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.removeIdentity(id)`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | An identity ID, `idn_…`. The `id` of a [`Identity`](/docs/identityhound/reference/me.md#the-identity-object). |

### Response

`204 No Content`, with no body.

### Errors

-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)
-   [`last_sign_in_method`](/docs/identityhound/errors.md#last_sign_in_method) (409)
-   [`not_found`](/docs/identityhound/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X DELETE https://api.agentpost.tools/v1/identity/me/identities/idn_01JDG344JJGW867DQ6EJ5WGCY2 \
  -H "Authorization: Bearer agp_st_…"
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
await client.me.removeIdentity('idn_01JDG344JJGW867DQ6EJ5WGCY2');
```

```text title="Response"
204 No Content
```

## List sessions

`GET /me/sessions`

The caller’s live sessions.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.sessions()`

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `sessions` | [`Session`](/docs/identityhound/reference/principals.md#the-session-object) array | Always |  |

### Errors

-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/identity/me/sessions \
  -H "Authorization: Bearer agp_st_…"
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { sessions } = await client.me.sessions();
```

```json title="Response"
{
  "sessions": [
    {
      "id": "ses_01JD2EQP0GCGZMSCG7GMDVCFJ6",
      "kind": "direct",
      "principalId": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
      "authMethods": ["email_code"],
      "client": {
        "ip": "203.0.113.24",
        "userAgent": "Mozilla/5.0",
        "platform": "web"
      },
      "createdAt": "2026-11-13T09:30:00.000Z",
      "lastSeenAt": "2026-11-13T09:30:00.000Z",
      "idleExpiresAt": "2026-11-20T09:30:00.000Z",
      "expiresAt": "2026-12-13T09:30:00.000Z",
      "current": true
    },
    {
      "id": "ses_01JD8JJY6V2MPY54HKBGHM1676",
      "kind": "direct",
      "principalId": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
      "authMethods": ["oauth:twitch"],
      "client": {
        "ip": "198.51.100.7",
        "userAgent": "Mozilla/5.0",
        "platform": "ios"
      },
      "createdAt": "2026-11-10T19:02:00.000Z",
      "lastSeenAt": "2026-11-12T21:15:00.000Z",
      "idleExpiresAt": "2026-11-19T21:15:00.000Z",
      "expiresAt": "2026-12-10T19:02:00.000Z"
    }
  ]
}
```

## End a session

`DELETE /me/sessions/:id`

Ends one of the caller’s sessions.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.revokeSession(id)`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A session ID, `ses_…`. The `id` of a [`Session`](/docs/identityhound/reference/principals.md#the-session-object). |

### Response

`204 No Content`, with no body.

### Errors

-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)
-   [`not_found`](/docs/identityhound/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X DELETE https://api.agentpost.tools/v1/identity/me/sessions/ses_01JD8JJY6V2MPY54HKBGHM1676 \
  -H "Authorization: Bearer agp_st_…"
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
await client.me.revokeSession('ses_01JD8JJY6V2MPY54HKBGHM1676');
```

```text title="Response"
204 No Content
```

## End other sessions

`DELETE /me/sessions`

Ends every session but the one the call is made with.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.revokeOtherSessions()`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `revoked` | `number` | Always |  |

### Errors

-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X DELETE https://api.agentpost.tools/v1/identity/me/sessions \
  -H "Authorization: Bearer agp_st_…"
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { revoked } = await client.me.revokeOtherSessions();
```

```json title="Response"
{
  "revoked": 1
}
```

## Merge a guest

`POST /me/merge-guest`

Moves a guest’s grants and resource roles to the signed-in principal, with the guest’s session token as proof, then deletes the guest. A role on a resource both hold in different workspaces answers `merge_blocked`.

-   **Who may call:** A signed-in principal.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.mergeGuest(input)`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `guestSessionToken` | `string` | Yes | 16–512 characters. |

### Response

`200 OK`, with [`MergeGuestResponse`](/docs/identityhound/reference/me.md#the-mergeguestresponse-object).

### Errors

-   [`conflict`](/docs/identityhound/errors.md#conflict) (409)
-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)
-   [`merge_blocked`](/docs/identityhound/errors.md#merge_blocked) (409)
-   [`not_found`](/docs/identityhound/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/identity/me/merge-guest \
  -H "Authorization: Bearer agp_st_…" \
  -H "Content-Type: application/json" \
  -d '{
    "guestSessionToken": "agp_st_guest_session_token"
  }'
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { principal, guestId, moved } = await client.me.mergeGuest({
  guestSessionToken: 'agp_st_guest_session_token',
});
```

```json title="Response"
{
  "principal": {
    "id": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
    "kind": "human",
    "status": "active",
    "displayName": "Ada Lovelace",
    "projectRoles": [],
    "lastActiveAt": "2026-11-13T09:30:00.000Z",
    "metadata": {},
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-13T09:30:00.000Z"
  },
  "guestId": "prn_01JD8B49FTM5GZ9SVD3SRG7TKD",
  "moved": {
    "grants": 1,
    "resourceRoles": 0
  }
}
```

## Merge another account

`POST /me/merge`

Merges another principal’s account into the signed-in principal’s, with the merge ticket that linking one of its sign-in methods returned. Its sign-in identities, connected accounts, grants, resource roles, project roles, and workspace memberships move over; where both are in one workspace, an active membership stays over a suspended one, then an owner one over any other role, and otherwise the signed-in principal’s stays. The other account’s sessions end, and it stays with `mergedInto` set, so its ID still resolves. Needs `accounts.merge: on`.

-   **Who may call:** A signed-in principal.
-   **Access:** Only the signed-in principal the ticket was issued to, while both accounts are active principals.
-   **Credential:** the examples send a signed-in principal’s session token, `agp_st_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.me.merge(input)`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `mergeTicket` | `string` | Yes | The `details.mergeTicket` from the `identity_in_use` error a link returned; 16–512 characters. |

### Response

`200 OK`, with [`MergeAccountResponse`](/docs/identityhound/reference/me.md#the-mergeaccountresponse-object).

### Errors

-   [`conflict`](/docs/identityhound/errors.md#conflict) (409)
-   [`forbidden`](/docs/identityhound/errors.md#forbidden) (403)
-   [`merge_blocked`](/docs/identityhound/errors.md#merge_blocked) (409)
-   [`not_found`](/docs/identityhound/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/identity/me/merge \
  -H "Authorization: Bearer agp_st_…" \
  -H "Content-Type: application/json" \
  -d '{
    "mergeTicket": "agp_mt_merge_ticket_from_the_link"
  }'
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'agp_st_…' });
const { principal, mergedId, moved } = await client.me.merge({
  mergeTicket: 'agp_mt_merge_ticket_from_the_link',
});
```

```json title="Response"
{
  "principal": {
    "id": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
    "kind": "human",
    "status": "active",
    "displayName": "Ada Lovelace",
    "projectRoles": [],
    "lastActiveAt": "2026-11-13T09:30:00.000Z",
    "metadata": {},
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-13T09:30:00.000Z"
  },
  "mergedId": "prn_01JD9V3K7QH2M5X8R4T6W0B1CE",
  "moved": {
    "identities": 1,
    "connections": 1,
    "grants": 1,
    "resourceRoles": 0,
    "projectRoles": 0,
    "workspaces": 1
  }
}
```

## The Identity object

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `id` | `string` | Always | An identity ID, `idn_…`. |
| `principalId` | `string` | Always | A principal ID, `prn_…`. |
| `type` | `"email"` or `"oauth"` | Always |  |
| `provider` | `"email"` or `"twitch"` | Always |  |
| `subject` | `string` | Always |  |
| `verifiedAt` | `string` | Always | An ISO 8601 date and time. |
| `profile` | `object` | When set |  |
| `profile.login` | `string` | When set |  |
| `profile.displayName` | `string` | When set |  |
| `profile.email` | `string` | When set |  |
| `profile.avatarUrl` | `string` | When set |  |
| `createdAt` | `string` | Always | An ISO 8601 date and time. |
| `lastUsedAt` | `string` | When set | An ISO 8601 date and time. |

```json title="The Identity object"
{
  "id": "idn_01JD574H5SQYRFZHDKFXZNEYTQ",
  "principalId": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
  "type": "email",
  "provider": "email",
  "subject": "ada@example.com",
  "verifiedAt": "2026-11-02T14:05:00.000Z",
  "createdAt": "2026-11-02T14:05:00.000Z",
  "lastUsedAt": "2026-11-13T09:30:00.000Z"
}
```

## The MergeGuestResponse object

What a merge answers with: the principal as it stands, the guest’s ID, and what moved over.

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `principal` | [`Principal`](/docs/identityhound/reference/principals.md#the-principal-object) | Always |  |
| `guestId` | `string` | Always | A principal ID, `prn_…`. |
| `moved` | `object` | Always |  |
| `moved.grants` | `number` | Always |  |
| `moved.resourceRoles` | `number` | Always |  |

```json title="The MergeGuestResponse object"
{
  "principal": {
    "id": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
    "kind": "human",
    "status": "active",
    "displayName": "Ada Lovelace",
    "projectRoles": [],
    "lastActiveAt": "2026-11-13T09:30:00.000Z",
    "metadata": {},
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-13T09:30:00.000Z"
  },
  "guestId": "prn_01JD8B49FTM5GZ9SVD3SRG7TKD",
  "moved": {
    "grants": 1,
    "resourceRoles": 0
  }
}
```

## The MergeAccountResponse object

What `POST /me/merge` answers with: the principal as it stands, the merged account’s ID, and how much of each kind moved over.

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `principal` | [`Principal`](/docs/identityhound/reference/principals.md#the-principal-object) | Always |  |
| `mergedId` | `string` | Always | A principal ID, `prn_…`. |
| `moved` | `object` | Always |  |
| `moved.identities` | `number` | Always |  |
| `moved.connections` | `number` | Always |  |
| `moved.grants` | `number` | Always |  |
| `moved.resourceRoles` | `number` | Always |  |
| `moved.projectRoles` | `number` | Always |  |
| `moved.workspaces` | `number` | Always |  |

```json title="The MergeAccountResponse object"
{
  "principal": {
    "id": "prn_01JDG9X6KH1ZEF2ZWP185VMW9D",
    "kind": "human",
    "status": "active",
    "displayName": "Ada Lovelace",
    "projectRoles": [],
    "lastActiveAt": "2026-11-13T09:30:00.000Z",
    "metadata": {},
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-13T09:30:00.000Z"
  },
  "mergedId": "prn_01JD9V3K7QH2M5X8R4T6W0B1CE",
  "moved": {
    "identities": 1,
    "connections": 1,
    "grants": 1,
    "resourceRoles": 0,
    "projectRoles": 0,
    "workspaces": 1
  }
}
```
