---
title: "Disconnect Email Provider"
method: POST
path: "/v4/inbox/disconnect"
tags: ["Email Import"]
---

# Disconnect Email Provider

`POST /v4/inbox/disconnect`

## Request

- Base URL: `https://api.casparser.in`
- URL: `https://api.casparser.in/v4/inbox/disconnect`
- Auth: API key in header `x-api-key`

Revoke email access and invalidate the token.

This calls the provider's token revocation API (e.g., Google's revoke endpoint)
to ensure the user's consent is properly removed.

After calling this, the `inbox_token` becomes unusable.

## Headers

- `x-inbox-token` string, required

## Response `200`

Successfully disconnected

- object
  - `status` string
  - `msg` string

## Other responses

- `401`: Unauthorized. This can happen if the `x-api-key` header is missing.

## Changes

- **2026-09-13** `cf1b57c0f2f7`: 1 warning
  - the optional response header `X-Request-ID` removed for the status `401`
- **2026-07-12** `c74b9ecd5b53`: 1 warning
  - added the new `failed` enum value to the `status` response property for the response status `401`
- **2026-02-14** `ce2296c4b14d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/changes/v4/inbox/disconnect/post.md)

---

[API](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2.md) - [All operations](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/llms.txt) - [OpenAPI document](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/revisions/9d8f1445bad3?raw)
