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
Theme

Update a vault

client.Beta.Agents.Vaults.Update(ctx, vaultID, body) (*Vault, error)
POST
/vaults/{vault_id}

Updates the name or metadata of an active vault. Omitted fields remain unchanged. See vaults.

Parameters
vaultID string
minLength0
maxLength1048576
body BetaAgentVaultUpdateParams
Returns
type Vault struct{…}

A collection of credentials for MCP servers and OpenAI-hosted environments.

ID string

The ID of the vault.

minLength0
CreatedAt int64

The Unix timestamp, in seconds, when the vault was created.

formatint64
Metadata map[string, string]

Key-value pairs associated with the vault, such as an application or team identifier.

Name string

The human-readable name of the vault, if set.

minLength0
Object Vault

The object type. Always vault.

Update 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"),
  )
  vault, err := client.Beta.Agents.Vaults.Update(
    context.TODO(),
    "vault_id",
    openai.BetaAgentVaultUpdateParams{
      Name: openai.String("Research vault"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", vault.ID)
}
200 — Example
{
  "id": "id",
  "created_at": 0,
  "metadata": {
    "foo": "string"
  },
  "name": "name",
  "object": "vault"
}
Returns Examples
200 — Example
{
  "id": "id",
  "created_at": 0,
  "metadata": {
    "foo": "string"
  },
  "name": "name",
  "object": "vault"
}