---
title: "Give people access to ask about projects (managers only)"
method: POST
path: "/agents/access/grants"
tags: ["AI", "Agents"]
---

# Give people access to ask about projects (managers only)

`POST /agents/access/grants`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/agents/access/grants`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

People outside the workspace are invited as free guests. A person who can already open a project gets no grant for it (`already_had_access`). A grant covers a whole project (`file_ids` null) or only the listed files.

## Request body

- GrantRequest
  - `emails` string[], required
  - `level` 'ask' | 'explore', required
  - `items` GrantItem[], required
    - `project_id` integer, required
    - `file_ids` integer[], nullable

## Response `201`

Document created, URL follows

- GrantResult
  - `grants` integer[], required
  - `invited` string[], required
  - `already_had_access` string[], required

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/5dfd1c296ded?raw)
