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 Skill Default Version

client.Skills.Update(ctx, skillID, body) (*Skill, error)
POST
/skills/{skill_id}

Update the default version pointer for a skill.

Update Skill Default Version

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"),
  )
  skill, err := client.Skills.Update(
    context.TODO(),
    "skill_123",
    openai.SkillUpdateParams{
      DefaultVersion: "default_version",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", skill.ID)
}
200 — Example
{
  "id": "id",
  "created_at": 0,
  "default_version": "default_version",
  "description": "description",
  "latest_version": "latest_version",
  "name": "name",
  "object": "skill"
}
Parameters
skillID string
body SkillUpdateParams
Returns
type Skill struct{…}
ID string

Unique identifier for the skill.

CreatedAt int64

Unix timestamp (seconds) for when the skill was created.

formatunixtime
DefaultVersion string

Default version for the skill.

Description string

Description of the skill.

LatestVersion string

Latest version for the skill.

Name string

Name of the skill.

Object Skill

The object type, which is skill.

Returns Examples
200 — Example
{
  "id": "id",
  "created_at": 0,
  "default_version": "default_version",
  "description": "description",
  "latest_version": "latest_version",
  "name": "name",
  "object": "skill"
}