# Ketch (/integrations/ketch)



{/* MANUAL-CONTENT-START:intro */}

Use [Ketch](https://www.ketch.com/) to read or update consent and subscription preferences and submit data-subject rights requests.

Add a Ketch block and provide your organization code, property code, and environment code. The Ketch Web API is a public API — no API key or OAuth credentials are required. Identity is determined by the organization and property codes along with the data subject's identity (e.g., email address).

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Retrieve and update consent preferences, manage subscription topics and controls, and submit data subject rights requests for access, deletion, correction, or processing restriction.

## Actions [#actions]

### Ketch Get Consent [#ketch-get-consent]

Retrieve consent status for a data subject. Returns the current consent preferences for each configured purpose.

#### Input [#input]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `organizationCode` | string | Yes | Ketch organization code |
| `propertyCode` | string | Yes | Digital property code defined in Ketch |
| `environmentCode` | string | Yes | Environment code defined in Ketch (e.g., "production") |
| `jurisdictionCode` | string | No | Jurisdiction code (e.g., "gdpr", "ccpa") |
| `identities` | json | Yes | Identity map (e.g., \{"email": "[user@example.com](mailto:user@example.com)"}) |
| `purposes` | json | No | Optional purposes to filter the consent query |

#### Output [#output]

| Parameter | Type | Description |
| - | - | - |
| `purposes` | object | Map of purpose codes to consent status and legal basis |
| ↳ `allowed` | string | Consent status for the purpose: "granted" or "denied" |
| ↳ `legalBasisCode` | string | Legal basis code (e.g., "consent\_optin", "consent\_optout", "disclosure", "other") |
| `vendors` | object | Map of vendor consent statuses |

### Ketch Set Consent [#ketch-set-consent]

Update consent preferences for a data subject. Sets the consent status for specified purposes with the appropriate legal basis.

#### Input [#input-1]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `organizationCode` | string | Yes | Ketch organization code |
| `propertyCode` | string | Yes | Digital property code defined in Ketch |
| `environmentCode` | string | Yes | Environment code defined in Ketch (e.g., "production") |
| `jurisdictionCode` | string | No | Jurisdiction code (e.g., "gdpr", "ccpa") |
| `identities` | json | Yes | Identity map (e.g., \{"email": "[user@example.com](mailto:user@example.com)"}) |
| `purposes` | json | Yes | Map of purpose codes to consent settings (e.g., \{"analytics": \{"allowed": "granted", "legalBasisCode": "consent\_optin"}}) |
| `collectedAt` | number | No | UNIX timestamp when consent was collected (defaults to current time) |

#### Output [#output-1]

| Parameter | Type | Description |
| - | - | - |
| `purposes` | object | Updated consent status map of purpose codes to consent settings |
| ↳ `allowed` | string | Consent status for the purpose: "granted" or "denied" |
| ↳ `legalBasisCode` | string | Legal basis code (e.g., "consent\_optin", "consent\_optout", "disclosure", "other") |

### Ketch Get Subscriptions [#ketch-get-subscriptions]

Retrieve subscription preferences for a data subject. Returns the current subscription topic and control statuses.

#### Input [#input-2]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `organizationCode` | string | Yes | Ketch organization code |
| `propertyCode` | string | Yes | Digital property code defined in Ketch |
| `environmentCode` | string | Yes | Environment code defined in Ketch (e.g., "production") |
| `identities` | json | Yes | Identity map (e.g., \{"email": "[user@example.com](mailto:user@example.com)"}) |

#### Output [#output-2]

| Parameter | Type | Description |
| - | - | - |
| `topics` | object | Map of topic codes to contact method settings (e.g., \{"newsletter": \{"email": \{"status": "granted"}}}) |
| `controls` | object | Map of control codes to settings (e.g., \{"global\_unsubscribe": \{"status": "denied"}}) |

### Ketch Set Subscriptions [#ketch-set-subscriptions]

Update subscription preferences for a data subject. Sets topic and control statuses for email, SMS, and other contact methods.

#### Input [#input-3]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `organizationCode` | string | Yes | Ketch organization code |
| `propertyCode` | string | Yes | Digital property code defined in Ketch |
| `environmentCode` | string | Yes | Environment code defined in Ketch (e.g., "production") |
| `identities` | json | Yes | Identity map (e.g., \{"email": "[user@example.com](mailto:user@example.com)"}) |
| `topics` | json | No | Map of topic codes to contact method settings (e.g., \{"newsletter": \{"email": \{"status": "granted"}, "sms": \{"status": "denied"}}}) |
| `controls` | json | No | Map of control codes to settings (e.g., \{"global\_unsubscribe": \{"status": "denied"}}) |

#### Output [#output-3]

| Parameter | Type | Description |
| - | - | - |
| `success` | boolean | Whether the subscription preferences were updated |

### Ketch Invoke Right [#ketch-invoke-right]

Submit a data subject rights request (e.g., access, delete, correct, restrict processing). Initiates a privacy rights workflow in Ketch.

#### Input [#input-4]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `organizationCode` | string | Yes | Ketch organization code |
| `propertyCode` | string | Yes | Digital property code defined in Ketch |
| `environmentCode` | string | Yes | Environment code defined in Ketch (e.g., "production") |
| `jurisdictionCode` | string | Yes | Jurisdiction code (e.g., "gdpr", "ccpa") |
| `rightCode` | string | Yes | Privacy right code to invoke (e.g., "access", "delete", "correct", "restrict\_processing") |
| `identities` | json | Yes | Identity map (e.g., \{"email": "[user@example.com](mailto:user@example.com)"}) |
| `userData` | json | No | Optional data subject information (e.g., \{"email": "[user@example.com](mailto:user@example.com)", "firstName": "John", "lastName": "Doe"}) |

#### Output [#output-4]

| Parameter | Type | Description |
| - | - | - |
| `success` | boolean | Whether the rights request was submitted |
| `message` | string | Response message from Ketch |
