---
title: "Grant or revoke membership access"
method: POST
path: "/api/v1/courses/{id}/enroll"
tags: ["Courses"]
---

# Grant or revoke membership access

`POST /api/v1/courses/{id}/enroll`

## Request

- Base URL: `https://mailinapp.com`
- URL: `https://mailinapp.com/api/v1/courses/{id}/enroll`
- Auth: HTTP bearer

Membership-wide access, keyed off one of the account's courses. `active: false` revokes.

## Path parameters

- `id` string, required

## Request body

- object
  - `email` string, email, required
  - `active` boolean

## Response `200`

Done

- object
  - `subscriberId` string, required
  - `active` boolean, required

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `403`: The Embed API isn't included in the plan
- `404`: Not found, or not this account's
- `429`: Too many requests for this key, or the plan's monthly Embed API quota is used up

---

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