# Contact methods: subscribe, suppress, unsubscribe

URL: /code/sdk/contact/verbs-subscribe · Id: `page:code/sdk/contact/verbs-subscribe`

> The Contact Verbs subscribe, suppress, unsubscribe as typed SDK methods, with inputs, result, refusals and an example.

Reference for [Contact](/business/nouns/contact), one group of [Contact methods](/code/sdk/contact).

### Contact.subscribe
Subscribe records a Contact’s chosen topics and frequency from the hosted preference page, with Consent for each topic. [Verb page](/business/nouns/contact/subscribe?interface=sdk).

```ts
interface ContactVerbs {
  subscribe(input: ContactSubscribeInput, options?: SB.CallOptions): SB.Call<Contact>
}
```

Emits [`Contact.subscribed`](/business/events/Contact.subscribed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `contact` | [Contact](/business/nouns/contact) | Yes | The Contact. |
| `topics` | `string[]` | Yes | The topics the Contact chose. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `contact` | [Contact](/business/nouns/contact) | Yes | The Contact, with their topics. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const contact = await $.Contact.subscribe({ contact: 'contact_WsrosCQi6J', topics: ['Example topics'] })
```

### Contact.suppress
Suppress records a Suppression for a Contact’s address, which every Startup honors forever. [Verb page](/business/nouns/contact/suppress?interface=sdk).

```ts
interface ContactVerbs {
  suppress(input: ContactSuppressInput, options?: SB.CallOptions): SB.Call<Contact>
}
```

Emits [`Contact.suppressed`](/business/events/Contact.suppressed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `contact` | [Contact](/business/nouns/contact) | Yes | The Contact who opts out. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `contact` | [Contact](/business/nouns/contact) | Yes | The suppressed Contact. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const contact = await $.Contact.suppress({ contact: 'contact_WsrosCQi6J' })
```

### Contact.unsubscribe
Unsubscribe stops commercial Messages to a Contact in one click, for one topic or all, honored at once. [Verb page](/business/nouns/contact/unsubscribe?interface=sdk).

```ts
interface ContactVerbs {
  unsubscribe(input: ContactUnsubscribeInput, options?: SB.CallOptions): SB.Call<Contact>
}
```

Emits [`Contact.unsubscribed`](/business/events/Contact.unsubscribed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `contact` | [Contact](/business/nouns/contact) | Yes | The Contact. |
| `topic` | `string` | No | One topic; omitted, every commercial topic. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `contact` | [Contact](/business/nouns/contact) | Yes | The Contact, unsubscribed. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const contact = await $.Contact.unsubscribe({ contact: 'contact_WsrosCQi6J' })
```