NEW

Save agent identity credentials persistently for reuse. Encrypted at rest with AES-GCM, only decryptable by the owning user. Requires Pro or Business plan.

POST/api/vault
API Key

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

FieldTypeRequiredDescription
emailstringYesEmail address for this credential.
passwordstringYesPassword to encrypt and store.
personastringNoJSON-encoded persona data from the original identity.
siteNamestringYesName of the site or service (e.g. 'GitHub').
siteUrlstringNoURL of the site or service.
categorystringNoCategory: social, shopping, dev-tools, testing, gaming, finance, news, entertainment, work, or other.
notesstringNoFree-text notes about this credential.
sourceIdentityIdstringNoAgent identity ID this credential was created from.
Example Requestjson
{
  "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

FieldTypeDescription
idstringVault entry ID
emailstringStored email address
siteNamestringSite name
siteUrlstring | nullSite URL
categorystring | nullEntry category
notesstring | nullNotes
sourceIdentityIdstring | nullLinked agent identity ID
pinnedbooleanWhether the entry is pinned
createdAtstringISO-8601 creation timestamp
updatedAtstringISO-8601 last update timestamp
Example Responsejson
{
  "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

StatusMessage
400Validation 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" }] }
403Agent vault requires a Pro or Business plan
429Vault 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"}'
POST/api/vault/from-identity/:identityId
API Key

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

NameTypeRequiredDescription
identityIdstringYesThe agent identity ID to save (e.g. ai_Kp9xMn2qLr4vTt7bYw3cZ).

Request Body

FieldTypeRequiredDescription
siteNamestringYesName of the site or service you signed up for.
siteUrlstringNoURL of the site or service.
categorystringNoCategory: social, shopping, dev-tools, testing, gaming, finance, news, entertainment, work, or other.
notesstringNoFree-text notes about this credential.
Example Requestjson
{
  "siteName": "Gunspec",
  "siteUrl": "https://gunspec.io",
  "category": "dev-tools",
  "notes": "Test account created via automation"
}

Response 201

FieldTypeDescription
idstringVault entry ID
emailstringEmail address from the identity
siteNamestringSite name
siteUrlstring | nullSite URL
categorystring | nullEntry category
notesstring | nullNotes
sourceIdentityIdstringThe agent identity ID this was saved from
pinnedbooleanWhether the entry is pinned
createdAtstringISO-8601 creation timestamp
updatedAtstringISO-8601 last update timestamp
Example Responsejson
{
  "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

StatusMessage
400Validation error with field-level details (e.g. invalid siteUrl format, missing siteName, invalid category)
403Agent vault requires a Pro or Business plan
404Agent identity not found. It may have expired or been deleted.
429Vault 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"}'
GET/api/vault
API Key

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

NameTypeRequiredDescription
searchstringNoSearch by site name, email, or notes.
categorystringNoFilter by category (social, shopping, dev-tools, etc.).

Response 200

FieldTypeDescription
entriesarrayArray of vault entries (without passwords)
limitnumberMaximum entries allowed for your plan
Example Responsejson
{
  "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"
GET/api/vault/:id
API Key

Get a single vault entry with the decrypted password and persona data. Only the owning user can decrypt the password.

Path Parameters

NameTypeRequiredDescription
idstringYesVault entry ID

Response 200

FieldTypeDescription
idstringVault entry ID
emailstringStored email address
passwordstringDecrypted password
personaobject | nullDecrypted persona data (if stored)
siteNamestringSite name
siteUrlstring | nullSite URL
categorystring | nullEntry category
notesstring | nullNotes
sourceIdentityIdstring | nullLinked agent identity ID
createdAtstringISO-8601 creation timestamp
Example Responsejson
{
  "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

StatusMessage
404Vault entry not found

Code Examples

curl https://destroy.network/api/vault/{id} \
  -H "Authorization: Bearer sk_live_your_api_key"
PATCH/api/vault/:id
API Key

Update metadata for a vault entry. Site name, URL, category, notes, and pinned status can be updated. Email and password are immutable.

Path Parameters

NameTypeRequiredDescription
idstringYesVault entry ID

Request Body

FieldTypeRequiredDescription
siteNamestringNoUpdated site name.
siteUrlstringNoUpdated site URL.
categorystringNoUpdated category.
notesstringNoUpdated notes.
pinnedbooleanNoPin entry to the top of the list.
Example Requestjson
{
  "siteName": "GitHub Enterprise",
  "notes": "Migrated to enterprise account",
  "pinned": true
}

Response 200

Example Responsejson
{ "updated": true }

Errors

StatusMessage
400Validation error (e.g. invalid siteUrl, invalid category, no fields provided)
404Vault 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"}'
DELETE/api/vault/:id
API Key

Permanently delete a vault entry. The encrypted password is destroyed and cannot be recovered.

Path Parameters

NameTypeRequiredDescription
idstringYesVault entry ID

Response 200

Example Responsejson
{ "deleted": true }

Errors

StatusMessage
404Vault entry not found

Code Examples

curl -X DELETE https://destroy.network/api/vault/{id} \
  -H "Authorization: Bearer sk_live_your_api_key"
POST/api/vault/bulk-delete
API Key

Delete multiple vault entries at once. Pass an array of entry IDs (max 100).

Request Body

FieldTypeRequiredDescription
idsstring[]YesArray of vault entry IDs to delete (1-100).
Example Requestjson
{
  "ids": ["ve_Xm4kRt7pNq2wYh9cVb3dZ", "ve_Ab5nLw8qKr3mPy6tJx1cZ"]
}

Response 200

FieldTypeDescription
deletednumberNumber of entries deleted
Example Responsejson
{ "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"]}'
POST/api/vault/bulk-update
API Key

Update the category for multiple vault entries at once. Pass null to remove the category.

Request Body

FieldTypeRequiredDescription
idsstring[]YesArray of vault entry IDs to update (1-100).
categorystring | nullYesNew category for all entries, or null to clear.
Example Requestjson
{
  "ids": ["ve_Xm4kRt7pNq2wYh9cVb3dZ", "ve_Ab5nLw8qKr3mPy6tJx1cZ"],
  "category": "work"
}

Response 200

FieldTypeDescription
updatednumberNumber of entries updated
Example Responsejson
{ "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"}'