# Delete cookie

URL: https://docs.hanzo.ai/docs/openapi/team/delete-team-account-cookie

> Signs this browser out of team by expiring the HttpOnly account-token cookie the OAuth callback set.

`DELETE /v1/team/account/cookie`

> [Team →](https://docs.hanzo.ai/docs/openapi/team) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                               |
| ------------- | --------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/team/account/cookie` |
| **Method**    | `DELETE`                                      |
| **Operation** | `delete_team_account_cookie`                  |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`        |

Signs this browser out of team by expiring the HttpOnly
account-token cookie the OAuth callback set. It is the counterpart of the
cookie PUT, it takes nothing — the cookie it clears is named by this service,
never by the caller — and it is unconditional: a caller with no cookie, an
expired one or a forged one all get the same acknowledgement, because clearing
something that is not there is the same outcome as clearing something that is.

It clears ONLY the team session cookie. The IAM access-token cookie the same
callback set is a different credential with a different lifetime and is left
alone, so this is a team sign-out, not a platform one.

## Request

`DELETE /v1/team/account/cookie` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | team.cookieAck  | ok      |
| `default` | problem-details | refused |

`200` body — 1 field.

| Field    | In   | Type    | Always | Description                                            |
| -------- | ---- | ------- | ------ | ------------------------------------------------------ |
| `result` | body | boolean | —      | Result is true when the cookie was written or cleared. |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo team account cookie clear
```

**SDK**

**.ts**

```ts
import { Configuration, TeamApi } from 'hanzoai';

const api = new TeamApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.deleteTeamAccountCookie();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TeamApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TeamApi(client).delete_team_account_cookie()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TeamAPI.DeleteTeamAccountCookie(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, team_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = team_api::delete_team_account_cookie(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TeamApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new TeamApi(client).deleteTeamAccountCookie();
```

**HTTP**

```bash
curl -X DELETE https://api.hanzo.ai/v1/team/account/cookie \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `team`, op `delete_team_account_cookie` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "team",
         "arguments": {
           "op": "delete_team_account_cookie",
           "input": {}
         }
       }
     }'
```

---

[Team API](https://docs.hanzo.ai/docs/openapi/team) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
