Skip to navigation

Reassign Metafields Owner

Metafields can be reassigned to a new owner by updating the ownerClientId field using the Reassign Metafield Owner GraphQL mutation.

While the v3 REST API supports creating, updating, and deleting metafields, to reassign a metafield’s owner you must use the GraphQL API.

The client ID is displayed only once when you create a store-level API account. If it’s lost or forgotten, you’ll need to create a new store-level API account. See the API Accounts Documentation for details.

Ensure the metafield id uses the correct format: bc/store/metafield/{id}

GraphQL Mutation

Example mutation: Reassign Metafields Owner
POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
mutation Metafield($input: ReassignMetafieldsOwnerInput!) {
metafield {
reassignMetafieldsOwner(input: $input) {
metafieldIds
}
}
}
GraphQL variables
{
"input": {
"newClientId": "xyz1234",
"metafieldIds": ["bc/store/metafield/8"]
}
}