---
title: "POST /vault/share"
method: POST
path: "/vault/share"
---

# POST /vault/share

`POST /vault/share`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/vault/share`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Request body

- object: Input for sharing a credential between agents
  - `credentialId` string, required: ID of the credential to share
  - `sourceAgentId` union, required: Agent that owns the credential
    - string
    - string
  - `targetAgentId` union, required: Agent to share the credential with
    - string
    - string
  - `permission` 'READ' | 'USE' | 'MANAGE': Permission level for the share
  - `expiresAt` string, date-time: Optional expiration time for the share
  - `expiresInSeconds` integer: Relative TTL in seconds — alternative to expiresAt. Max 1 year.

## Response `200`

OK

- object: Credential share record details
  - `id` string, required: Unique share record identifier
  - `credentialId` string, required: Shared credential identifier
  - `orgId` string, required: Organization identifier
  - `sourceAgentId` string, required: Agent that owns the credential
  - `targetAgentId` string, required: Agent that received access
  - `permission` 'READ' | 'USE' | 'MANAGE', required: Permission level
  - `expiresAt` string, date-time, nullable, required: When the share expires
  - `grantedBy` string, required: Who created the share
  - `revokedAt` string, date-time, nullable, required: When the share was revoked, if applicable
  - `createdAt` string, date-time, required: Timestamp when the share was created
  - `updatedAt` string, date-time, required: Timestamp when the share was last updated

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
