---
title: "Take a service away from an agent"
method: DELETE
path: "/api/v1/connections/services/{provider}/grants/{id}"
tags: ["Credentials"]
---

# Take a service away from an agent

`DELETE /api/v1/connections/services/{provider}/grants/{id}`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/connections/services/{provider}/grants/{id}`
- Auth: API key in header `api-key`

A grant that covers only this service ends whole (ended: "grant"); one that covers others too loses just this one (ended: "service"); an unscoped grant ends whole. Also denies any approved access request for the same owner, agent and service that was never linked to a grant. capability tells which gateway it was: credential.borrow means the agent may hold a copy it already borrowed, so reconnecting the service is what cuts that off.

## Path parameters

- `provider` string, required
- `id` string, required

## Response `200`

OK.

- object
  - `id` string
  - `status` string
  - `ended` 'grant' | 'service'
  - `capability` string
  - `provider` string

## Other responses

- `401`: Missing or invalid credentials.
- `404`: That access isn't there any more.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
