> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# updateMetafield

GraphQL MUTATION

Update Metafield.

Reference: https://docs.bigcommerce.com/developer/api-reference/graphql/admin/mutations/metafield/update-metafield

## GraphQL Schema

```graphql
mutation ExampleMutation($input: UpdateMetafieldInput!) {
  metafield {
    updateMetafield(input: $input) {
      metafield {
        id
        description
        key
        namespace
        permissionSet
        resourceId
        value
        ownerClientId
        createdAt
        updatedAt
      }
      errors
    }
  }
}
```

## Variables

```json
{
  "input": {
    "id": "example",
    "data": {
      "namespace": "example",
      "key": "example",
      "value": "example",
      "description": "example",
      "permissionSet": "APP_ONLY"
    }
  }
}
```