Agent Vault
Save agent identity credentials persistently for reuse. Encrypted at rest with AES-GCM, only decryptable by the owning user. Requires Pro or Business plan.
/api/vaultCreate Vault Entry
Save credentials to the vault. The password is encrypted with AES-GCM using a key derived from the user's ID, so only the owning user can decrypt it. Optionally link to the source agent identity.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address for this credential. |
password | string | Yes | Password to encrypt and store. |
persona | string | No | JSON-encoded persona data from the original identity. |
siteName | string | Yes | Name of the site or service (e.g. 'GitHub'). |
siteUrl | string | No | URL of the site or service. |
category | string | No | Category: social, shopping, dev-tools, testing, gaming, finance, news, entertainment, work, or other. |
notes | string | No | Free-text notes about this credential. |
sourceIdentityId | string | No | Agent identity ID this credential was created from. |
{
"email": "agentx7k4@748392.best",
"password": "Kx9#mL2pQr4!vB7w",
"siteName": "GitHub",
"siteUrl": "https://github.com",
"category": "dev-tools",
"notes": "Test account for CI pipeline",
"sourceIdentityId": "ai_Kp9xMn2qLr4vTt7bYw3cZ"
}Response 201
| Field | Type | Description |
|---|---|---|
id | string | Vault entry ID |
email | string | Stored email address |
siteName | string | Site name |
siteUrl | string | null | Site URL |
category | string | null | Entry category |
notes | string | null | Notes |
sourceIdentityId | string | null | Linked agent identity ID |
pinned | boolean | Whether the entry is pinned |
createdAt | string | ISO-8601 creation timestamp |
updatedAt | string | ISO-8601 last update timestamp |
{
"id": "ve_Xm4kRt7pNq2wYh9cVb3dZ",
"email": "agentx7k4@748392.best",
"siteName": "GitHub",
"siteUrl": "https://github.com",
"category": "dev-tools",
"notes": "Test account for CI pipeline",
"sourceIdentityId": "ai_Kp9xMn2qLr4vTt7bYw3cZ",
"pinned": false,
"createdAt": "2025-02-01T12:00:00.000Z",
"updatedAt": "2025-02-01T12:00:00.000Z"
}Errors
| Status | Message |
|---|---|
| 400 | Validation error with field-level details. Example: { "error": "VALIDATION_ERROR", "message": "Invalid field \"siteUrl\": siteUrl must be a valid URL", "fields": [{ "field": "siteUrl", "message": "siteUrl must be a valid URL (e.g. https://example.com)", "code": "invalid_string" }] } |
| 403 | Agent vault requires a Pro or Business plan |
| 429 | Vault entry limit exceeded |
Code Examples
curl -X POST https://destroy.network/api/vault \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"email": "agentx7k4@748392.best", "password": "Kx9#mL2pQr4!vB7w", "siteName": "GitHub", "category": "dev-tools"}'/api/vault/from-identity/:identityIdSave Identity to Vault
Save an active agent identity's credentials directly to the vault. The identity's email, password, and persona are automatically pulled, re-encrypted with vault-specific keys, and stored. This is the API equivalent of dna vault save <identity-id>.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
identityId | string | Yes | The agent identity ID to save (e.g. ai_Kp9xMn2qLr4vTt7bYw3cZ). |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
siteName | string | Yes | Name of the site or service you signed up for. |
siteUrl | string | No | URL of the site or service. |
category | string | No | Category: social, shopping, dev-tools, testing, gaming, finance, news, entertainment, work, or other. |
notes | string | No | Free-text notes about this credential. |
{
"siteName": "Gunspec",
"siteUrl": "https://gunspec.io",
"category": "dev-tools",
"notes": "Test account created via automation"
}Response 201
| Field | Type | Description |
|---|---|---|
id | string | Vault entry ID |
email | string | Email address from the identity |
siteName | string | Site name |
siteUrl | string | null | Site URL |
category | string | null | Entry category |
notes | string | null | Notes |
sourceIdentityId | string | The agent identity ID this was saved from |
pinned | boolean | Whether the entry is pinned |
createdAt | string | ISO-8601 creation timestamp |
updatedAt | string | ISO-8601 last update timestamp |
{
"id": "ve_Xm4kRt7pNq2wYh9cVb3dZ",
"email": "q8mehzh_@748392.best",
"siteName": "Gunspec",
"siteUrl": "https://gunspec.io",
"category": "dev-tools",
"notes": "Test account created via automation",
"sourceIdentityId": "ai_Kp9xMn2qLr4vTt7bYw3cZ",
"pinned": false,
"createdAt": "2025-02-01T12:00:00.000Z",
"updatedAt": "2025-02-01T12:00:00.000Z"
}Errors
| Status | Message |
|---|---|
| 400 | Validation error with field-level details (e.g. invalid siteUrl format, missing siteName, invalid category) |
| 403 | Agent vault requires a Pro or Business plan |
| 404 | Agent identity not found. It may have expired or been deleted. |
| 429 | Vault entry limit exceeded |
Code Examples
# Save an active agent identity to the vault
curl -X POST https://destroy.network/api/vault/from-identity/ai_Kp9xMn2qLr4vTt7bYw3cZ \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"siteName": "Gunspec", "category": "dev-tools"}'/api/vaultList Vault Entries
List all vault entries for the authenticated user. Passwords are not included in list results. Use the get endpoint to retrieve decrypted passwords. Supports filtering by search query and category.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
search | string | No | Search by site name, email, or notes. |
category | string | No | Filter by category (social, shopping, dev-tools, etc.). |
Response 200
| Field | Type | Description |
|---|---|---|
entries | array | Array of vault entries (without passwords) |
limit | number | Maximum entries allowed for your plan |
{
"entries": [
{
"id": "ve_Xm4kRt7pNq2wYh9cVb3dZ",
"email": "agentx7k4@748392.best",
"siteName": "GitHub",
"siteUrl": "https://github.com",
"category": "dev-tools",
"notes": "Test account for CI pipeline",
"sourceIdentityId": "ai_Kp9xMn2qLr4vTt7bYw3cZ",
"pinned": true,
"createdAt": "2025-02-01T12:00:00.000Z",
"updatedAt": "2025-02-01T12:00:00.000Z"
}
],
"limit": 50
}Code Examples
curl https://destroy.network/api/vault \
-H "Authorization: Bearer sk_live_your_api_key"
# Filter by category
curl "https://destroy.network/api/vault?category=dev-tools" \
-H "Authorization: Bearer sk_live_your_api_key"
# Search
curl "https://destroy.network/api/vault?search=github" \
-H "Authorization: Bearer sk_live_your_api_key"/api/vault/:idGet Vault Entry
Get a single vault entry with the decrypted password and persona data. Only the owning user can decrypt the password.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Vault entry ID |
Response 200
| Field | Type | Description |
|---|---|---|
id | string | Vault entry ID |
email | string | Stored email address |
password | string | Decrypted password |
persona | object | null | Decrypted persona data (if stored) |
siteName | string | Site name |
siteUrl | string | null | Site URL |
category | string | null | Entry category |
notes | string | null | Notes |
sourceIdentityId | string | null | Linked agent identity ID |
createdAt | string | ISO-8601 creation timestamp |
{
"id": "ve_Xm4kRt7pNq2wYh9cVb3dZ",
"email": "agentx7k4@748392.best",
"password": "Kx9#mL2pQr4!vB7w",
"persona": null,
"siteName": "GitHub",
"siteUrl": "https://github.com",
"category": "dev-tools",
"notes": "Test account for CI pipeline",
"sourceIdentityId": "ai_Kp9xMn2qLr4vTt7bYw3cZ",
"createdAt": "2025-02-01T12:00:00.000Z"
}Errors
| Status | Message |
|---|---|
| 404 | Vault entry not found |
Code Examples
curl https://destroy.network/api/vault/{id} \
-H "Authorization: Bearer sk_live_your_api_key"/api/vault/:idUpdate Vault Entry
Update metadata for a vault entry. Site name, URL, category, notes, and pinned status can be updated. Email and password are immutable.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Vault entry ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
siteName | string | No | Updated site name. |
siteUrl | string | No | Updated site URL. |
category | string | No | Updated category. |
notes | string | No | Updated notes. |
pinned | boolean | No | Pin entry to the top of the list. |
{
"siteName": "GitHub Enterprise",
"notes": "Migrated to enterprise account",
"pinned": true
}Response 200
{ "updated": true }Errors
| Status | Message |
|---|---|
| 400 | Validation error (e.g. invalid siteUrl, invalid category, no fields provided) |
| 404 | Vault entry not found |
Code Examples
curl -X PATCH https://destroy.network/api/vault/{id} \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"notes": "Updated notes"}'/api/vault/:idDelete Vault Entry
Permanently delete a vault entry. The encrypted password is destroyed and cannot be recovered.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Vault entry ID |
Response 200
{ "deleted": true }Errors
| Status | Message |
|---|---|
| 404 | Vault entry not found |
Code Examples
curl -X DELETE https://destroy.network/api/vault/{id} \
-H "Authorization: Bearer sk_live_your_api_key"/api/vault/bulk-deleteBulk Delete Vault Entries
Delete multiple vault entries at once. Pass an array of entry IDs (max 100).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Array of vault entry IDs to delete (1-100). |
{
"ids": ["ve_Xm4kRt7pNq2wYh9cVb3dZ", "ve_Ab5nLw8qKr3mPy6tJx1cZ"]
}Response 200
| Field | Type | Description |
|---|---|---|
deleted | number | Number of entries deleted |
{ "deleted": 2 }Code Examples
curl -X POST https://destroy.network/api/vault/bulk-delete \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"ids": ["ve_Xm4kRt7pNq2wYh9cVb3dZ", "ve_Ab5nLw8qKr3mPy6tJx1cZ"]}'/api/vault/bulk-updateBulk Update Vault Entries
Update the category for multiple vault entries at once. Pass null to remove the category.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Array of vault entry IDs to update (1-100). |
category | string | null | Yes | New category for all entries, or null to clear. |
{
"ids": ["ve_Xm4kRt7pNq2wYh9cVb3dZ", "ve_Ab5nLw8qKr3mPy6tJx1cZ"],
"category": "work"
}Response 200
| Field | Type | Description |
|---|---|---|
updated | number | Number of entries updated |
{ "updated": 2 }Code Examples
curl -X POST https://destroy.network/api/vault/bulk-update \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"ids": ["ve_Xm4kRt7pNq2wYh9cVb3dZ"], "category": "work"}'