Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete a vault

VaultDeleted beta().agents().vaults().delete(VaultDeleteParamsparams = VaultDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/vaults/{vault_id}

Deletes a vault and all its credentials. See vaults.

ParametersExpand Collapse
VaultDeleteParams params
Optional<String> vaultId
minLength0
maxLength1048576
ReturnsExpand Collapse
class VaultDeleted:

Confirmation that a vault was deleted.

String id

The ID of the deleted vault.

minLength0
boolean deleted

Whether the resource was deleted. Always true.

JsonValue; object_ "vault.deleted"constant"vault.deleted"constant

The object type. Always vault.deleted.

Delete a vault

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.beta.agents.vaults.VaultDeleteParams;
import com.openai.models.beta.agents.vaults.VaultDeleted;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        VaultDeleted vaultDeleted = client.beta().agents().vaults().delete("vault_id");
    }
}
{
  "id": "id",
  "deleted": true,
  "object": "vault.deleted"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "vault.deleted"
}