# health.hats.revokeAccess

> End every grant the caller has given one grantee. The space host asks the coordinator before issuing each space credential, so the grantee gets no new credential from then on; a credential already issued lasts until it expires. Authenticated as the patient (service auth).

- Kind: procedure
- Authority: hats.health
- Lexicon: 1
- Published by [hats.health](https://lexicon.garden/identity/did:plc:uvvhtareovj2oaregs7vsibv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uvvhtareovj2oaregs7vsibv/health.hats.revokeAccess)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uvvhtareovj2oaregs7vsibv/health.hats.revokeAccess/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uvvhtareovj2oaregs7vsibv/health.hats.revokeAccess/analytics)

## Procedure (`health.hats.revokeAccess`)

Type: procedure · POST

### Input (application/json)

- `grantee` (string · did, required): Whose access to end: a clinician's or institution's DID.

### Output (application/json)

- `revoked` (integer, required): How many space grants ended.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "End every grant the caller has given one grantee. The space host asks the coordinator before issuing each space credential, so the grantee gets no new credential from then on; a credential already issued lasts until it expires. Authenticated as the patient (service auth).",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "grantee": {
              "description": "Whose access to end: a clinician's or institution's DID.",
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "grantee"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "revoked": {
              "description": "How many space grants ended.",
              "type": "integer"
            }
          },
          "required": [
            "revoked"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "health.hats.revokeAccess",
  "lexicon": 1
}
```
