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

client.Beta.Agents.Vaults.Delete(ctx, vaultID) (*VaultDeleted, error)
DELETE/vaults/{vault_id}

Deletes a vault and all its credentials. See vaults.

ParametersExpand Collapse
vaultID string
minLength0
maxLength1048576
ReturnsExpand Collapse
type VaultDeleted struct{…}

Confirmation that a vault was deleted.

ID string

The ID of the deleted vault.

minLength0
Deleted bool

Whether the resource was deleted. Always true.

Object VaultDeleted

The object type. Always vault.deleted.

Delete a vault

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  vaultDeleted, err := client.Beta.Agents.Vaults.Delete(context.TODO(), "vault_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", vaultDeleted.ID)
}
{
  "id": "id",
  "deleted": true,
  "object": "vault.deleted"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "vault.deleted"
}