---
title: "Revoke one of my connected apps or CLI logins"
method: POST
path: "/me/grants/{id}/revoke"
tags: ["Organization settings"]
---

# Revoke one of my connected apps or CLI logins

`POST /me/grants/{id}/revoke`

## Request

- Base URL: `https://api.primitive.dev/v1`
- URL: `https://api.primitive.dev/v1/me/grants/{id}/revoke`
- Auth: HTTP bearer

Sign out one of the calling person's own connections, for example a lost laptop. Revoking a CLI login ends it in every organization. Another person's connection is answered 404. Every role may end its own connections. From a dashboard session or the person's Primitive CLI any of them; any other app the person connected may end only its own connection (403 otherwise).

Person only: a dashboard session or the person's own OAuth token (the CLI or an app they connected). API keys, agent connection keys and agents are refused.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- OrgSettingsRevokeMyGrantInput
  - `kind` 'oauth' | 'cli_login', required

## Response `200`

Success

- object
  - `success` true, required
  - `data` OrgSettingsRevokeMyGrantResult, required
    - `id` string, required
    - `kind` string, required
    - `revoked` true, required

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key
- `403`: Authenticated caller lacks permission for the operation
- `404`: Resource not found
- `429`: Rate limit exceeded. The `ratelimit-*` headers describe the limiter that rejected this request, with its own limit and window, not the API budget that successful responses report. A limiter that reports only a wait sends `Retry-After` alone.

---

[API](https://skmtc.dev/primitive/apis/primitive-api.md) - [All operations](https://skmtc.dev/primitive/apis/primitive-api/llms.txt) - [OpenAPI document](https://skmtc.dev/primitive/apis/primitive-api/revisions/bce409c97acb?raw)
