# Consent methods: withdraw

URL: /code/sdk/consent/verbs · Id: `page:code/sdk/consent/verbs`

> The Consent Verbs withdraw as typed SDK methods, with inputs, result, refusals and an example.

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

### Consent.withdraw
Withdraw ends a Consent at once: processing for its Purpose stops, and the record is kept. [Verb page](/business/nouns/consent/withdraw?interface=sdk).

```ts
interface ConsentVerbs {
  withdraw(input: ConsentWithdrawInput, options?: SB.CallOptions): SB.Call<Consent>
}
```

Emits [`Consent.withdrawn`](/business/events/Consent.withdrawn).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `consent` | [Consent](/business/nouns/consent) | Yes | The Consent to end. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `consent` | [Consent](/business/nouns/consent) | Yes | The withdrawn Consent. |

**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. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

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

const consent = await $.Consent.withdraw({ consent: 'consent_lMkrg7nUGY' })
```