> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/sdks-and-cli/notifications/contacts/grant-contact-consent.md).

# Grant Contact Consent

Notifications is Norbix's unified Email + Push + SMS messaging system — one template engine and data-binding context across all three channels, for both transactional sends and high-volume campaigns. Handles the contact consent. `POST /{version}/notifications/contacts/{contactId}/marketing-state/{channel}/consent`

{% hint style="info" %}
Full request/response reference will appear here once this method is added to the API spec.
{% endhint %}

This method is on the **Hub** surface (`norbix.hub.notifications`) — call it from admin tooling or IaC.

{% hint style="info" %}
These examples assume the SDK is installed and your credentials are set as environment variables — each client reads them automatically, so the constructors below take no arguments. See [Install a Norbix SDK](/sdks-and-cli/install.md).
{% endhint %}

{% tabs %}
{% tab title="JavaScript / TypeScript" %}

```ts
import { Norbix } from '@norbix.ai/ts';
const norbix = new Norbix();

const result = await norbix.hub.notifications.grantContactConsent({
  contactId: 'ct_4kX9mQvR2tYw7ZbC1dFgHj',
  channel: 'email',
  lawfulBasis: 'consent',
  evidenceRef: 'ticket-4821',
});
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using Norbix.Sdk;
using Norbix.Sdk.Types.Hub;

using var client = new NorbixClient();

var result = await client.Notifications.GrantContactConsentAsync(new GrantContactConsentRequest
{
    ContactId = "ct_4kX9mQvR2tYw7ZbC1dFgHj",
    Channel = "email",
    LawfulBasis = "consent",
    EvidenceRef = "ticket-4821",
});
```

{% endtab %}

{% tab title="Python" %}

```python
from norbix_python import NorbixHub

norbix = NorbixHub()

result = norbix.notifications.grant_contact_consent(
    contactId="ct_4kX9mQvR2tYw7ZbC1dFgHj",
    channel="email",
    lawfulBasis="consent",
    evidenceRef="ticket-4821",
)
```

{% endtab %}

{% tab title="Go" %}

```go
c, _ := norbix.New(norbix.Options{})
ctx := context.Background()

var result map[string]any
err := c.Hub.Notifications.GrantContactConsent(ctx, "ct_4kX9mQvR2tYw7ZbC1dFgHj", "email", map[string]any{
	"lawfulBasis": "consent",
	"evidenceRef": "ticket-4821",
}, &result)
```

{% endtab %}

{% tab title="Swift" %}

```swift
import NorbixSwift

let client = Norbix()

let result = try await client.hub.notifications.grantContactConsent([
    "contactId": "ct_4kX9mQvR2tYw7ZbC1dFgHj",
    "channel": "email",
    "lawfulBasis": "consent",
    "evidenceRef": "ticket-4821",
])
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
import dev.norbix.sdk.hub.NorbixHub

val hub = NorbixHub()

val result = hub.notifications.grantContactConsent(mapOf(
    "contactId" to "ct_4kX9mQvR2tYw7ZbC1dFgHj",
    "channel" to "email",
    "lawfulBasis" to "consent",
    "evidenceRef" to "ticket-4821",
))
```

{% endtab %}

{% tab title="CLI" %}

```sh
norbix hub notifications contact consent grant --contactId ct_4kX9mQvR2tYw7ZbC1dFgHj --channel email --lawfulBasis consent --evidenceRef ticket-4821
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Dart / Flutter examples for this page are still in the works — we are verifying the exact SDK shapes and will add them shortly. The method itself is available in every Norbix SDK.
{% endhint %}

## In the dashboard

Manage this visually in Norbix Cloud — see [Notifications → Contacts](/norbix-cloud/notifications.md).

## API reference

Full request and response for this endpoint: [Grant Contact Consent](/api-reference/notifications/contacts/grant-contact-consent.md).
