# MetafieldDefinitionInput - admin-graphql - INPUT_OBJECT Version: 2024-10 ## Description The input fields required to create a metafield definition. ### Access Scopes ## Fields * [access](/docs/api/admin-graphql/2024-10/input-objects/MetafieldAccessInput): MetafieldAccessInput - The access settings that apply to each of the metafields that belong to the metafield definition. * [capabilities](/docs/api/admin-graphql/2024-10/input-objects/MetafieldCapabilityCreateInput): MetafieldCapabilityCreateInput - The capabilities of the metafield definition. * [description](/docs/api/admin-graphql/2024-10/scalars/String): String - The description for the metafield definition. * [key](/docs/api/admin-graphql/2024-10/scalars/String): String! - The unique identifier for the metafield definition within its namespace. Must be 2-64 characters long and only contain alphanumeric, hyphen, and underscore characters. * [name](/docs/api/admin-graphql/2024-10/scalars/String): String! - The human-readable name for the metafield definition. * [namespace](/docs/api/admin-graphql/2024-10/scalars/String): String - The container for a group of metafields that the metafield definition will be associated with. If omitted, the app-reserved namespace will be used. Must be 3-255 characters long and only contain alphanumeric, hyphen, and underscore characters. * [ownerType](/docs/api/admin-graphql/2024-10/enums/MetafieldOwnerType): MetafieldOwnerType! - The resource type that the metafield definition is attached to. * [pin](/docs/api/admin-graphql/2024-10/scalars/Boolean): Boolean - Whether to [pin](https://help.shopify.com/manual/custom-data/metafields/pinning-metafield-definitions) the metafield definition. * [type](/docs/api/admin-graphql/2024-10/scalars/String): String! - The type of data that each of the metafields that belong to the metafield definition will store. Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). * [useAsCollectionCondition](/docs/api/admin-graphql/2024-10/scalars/Boolean): Boolean - Whether the metafield definition can be used as a collection condition. * [validations](/docs/api/admin-graphql/2024-10/input-objects/MetafieldDefinitionValidationInput): MetafieldDefinitionValidationInput - A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for the metafields that belong to the metafield definition. For example, for a metafield definition with the type `date`, you can set a minimum date validation so that each of the metafields that belong to it can only store dates after the specified minimum. * [visibleToStorefrontApi](/docs/api/admin-graphql/2024-10/scalars/Boolean): Boolean - Whether metafields for the metafield definition are visible using the Storefront API. ## Input objects with this input object * [metafieldDefinitionCreate](/docs/api/admin-graphql/2024-10/mutations/metafieldDefinitionCreate) ## Examples