# ConsentInput Input for recording a customer consent. Each item is appended to the consent history. ## Input Definition ```graphql input ConsentInput { type: String! accepted: Boolean! text: String metafields: [MetafieldInput] createdAt: String } ``` ## Fields | Field | Type | Required | Description | |-------|------|----------|-------------| | type | String | Yes | Consent type identifier (e.g. privacy_policy, marketing, cookie_policy, or a custom slug). | | accepted | Boolean | Yes | Whether the consent was accepted. Cookie policy submissions are stored as accepted. | | text | String | No | Optional agreed wording. Known types use server-generated wording when omitted. | | metafields | [MetafieldInput] | No | Metafields stored on this consent. cookie_policy requires cookie_policy.mode and cookie_policy.categories. | | createdAt | String | No | Optional original agreement time (ISO 8601). Used so cookie banner time is preserved. | ## Example ```graphql mutation { recordConsent(input: { type: "privacy_policy" accepted: true text: "I agree to the privacy policy" createdAt: "2024-01-15T10:30:00Z" }) { consent { type accepted createdAt } } } ``` ## Related Types - [MetafieldInput](./MetafieldInput.mdx)