---
title: metafieldAccessGrant - Shop Partners API
description: |-
  Share a Metafield Primitive with a Client or Namespace. Requires the 'share_metafield' client scope and
  requires that the Client making the request has Admin permission on the Resource.
api_version: unstable latest
source_url:
  html: https://shopify.dev/docs/api/shop-partners/latest/mutations/metafieldAccessGrant
  md: https://shopify.dev/docs/api/shop-partners/latest/mutations/metafieldAccessGrant.md
---

# metafield​Access​Grant

mutation

Share a Metafield Primitive with a Client or Namespace. Requires the 'share\_metafield' client scope and requires that the Client making the request has Admin permission on the Resource.

## Arguments

* access

  [Custom​Data​Access​Input!](https://shopify.dev/docs/api/shop-partners/latest/input-objects/CustomDataAccessInput)

  required

  Update the default permission of the resource and/or provide a list of targets to give access to the resource.

* identifier

  [Custom​Data​Key​Pair​Input!](https://shopify.dev/docs/api/shop-partners/latest/input-objects/CustomDataKeyPairInput)

  required

  Key and namespace pair that together form the path to the resource. Key is required, Namespace defaults to the Client's implicit, reserved namespace if not provided.

* key

  [String](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

  Use 'key' to provide a new key for the target when sharing, if desired. Only changes the key for the newly shared resource within the grantee's reserved namespace, not the grantor's.

***

## Metafield​Access​Grant​Payload returns

* user​Errors

  [\[User​Error!\]!](https://shopify.dev/docs/api/shop-partners/latest/objects/UserError)

  non-null

  List of errors that occured while executing the mutation.

***

## Examples

* ### metafieldAccessGrant reference