---
title: "Share with a person"
description: "Gives one person access by email, and optionally emails them."
canonical_url: https://docs.markdrop.in/api/access/share-with-a-person
last_updated: 2026-10-30
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Share with a person

`POST https://api.markdrop.in/api/v1/documents/{slug}/access/people`

Gives one person access by email, and optionally emails them. If the email fails, the access stays: the response says whether it was sent.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 60 per hour per IP address.
- **Guide:** [Share with people](https://docs.markdrop.in/sharing/share-with-people)

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.

## Request body

`application/json`, required.

- `email` (string (email), required): The person's email address. They don't need an account yet.
- `role` ("viewer" | "editor"): `viewer` can open it; `editor` can also change it. Default `"viewer"`.
- `notify` (boolean): Email them a link. Default `true`.
- `message` (string): A note included in the email. Up to 500 characters.

## Responses

- `201`: Created.
  - `email` (string)
  - `role` ("viewer" | "editor")
  - `created_at` (string (date-time)): ISO 8601, for example `2026-11-30T12:00:00Z`.
  - `granted_by_email` (string | null)
  - `notified` (boolean): Default `false`.
  - `active` (boolean): Default `true`.
  - `effective_role` ("viewer" | "editor" | null)
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X POST https://api.markdrop.in/api/v1/documents/k3x9q2m/access/people \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"sam@example.com","role":"viewer","notify":true}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/documents/k3x9q2m/access/people", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "email": "sam@example.com",
    "role": "viewer",
    "notify": true
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/documents/k3x9q2m/access/people",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={
        "email": "sam@example.com",
        "role": "viewer",
        "notify": True,
    },
)
r.raise_for_status()
print(r.json())
```
