---
title: "Add Custom Agent Share"
method: POST
path: "/agent/custom/{custom_agent_id}/share/add"
---

# Add Custom Agent Share

`POST /agent/custom/{custom_agent_id}/share/add`

## Request

- Base URL: `https://api.tellers.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tellers.ai/agent/custom/{custom_agent_id}/share/add`
- Auth: none declared

Share the assistant with a group or with one person by email.

Needs ``can_share`` on the assistant: its author, an ADMIN grant, or a
grant with ``can_share``. Below ADMIN the caller grants at most their own
right, never ``can_share``, and cannot change a grant they could not have
made. An email with no account yet is listed in ``pending_invites`` until
someone signs in with it. Returns the sharing as ``GET
/{custom_agent_id}/share`` does.

## Path parameters

- `custom_agent_id` string, uuid, required

## Headers

- `x-api-key` string, nullable
- `authorization` string, nullable

## Request body

- CustomAgentShareAddRequest: Grant access to one group (``group_id``) or one person (``email``).
  - `group_id` string, uuid, nullable
  - `email` string, nullable
  - `right` 'ADMIN' | 'READ' | 'WRITE' | 'VIEW': A right on an asset, a chat or an assistant, weakest first: VIEW < READ < WRITE < ADMIN. On an asset, VIEW sees the file and everything about it except its comments, which READ adds. Chats and assistants have nothing READ adds, so VIEW opens what READ does there. Group memberships start at READ.
  - `can_share` boolean: Lets the grantee share the assistant onward and make it public, below ADMIN. Publishing still takes ADMIN. Only an ADMIN can grant it. An existing grant is set to this value.

## Response `200`

Successful Response

- AssetShareResponseOptimized: Optimized share config: groups and validated_users with rights, plus flags. ``can_share`` is whether the caller may manage sharing: ADMIN, or a share with ``can_share``.
  - `groups` GroupShareInfo[]
    - `group_id` string, required
    - `group_name` string, required
    - `right` string, required
    - `can_share` boolean, nullable: Whether the group may share onward: ADMIN, or a share with can_share. Null for chats, which cannot be shared onward.
  - `validated_users` ValidatedUserInfo[]
    - `email` string, required
    - `right` string, required
    - `can_share` boolean, nullable: Whether the person may share onward: ADMIN, or a share with can_share. Null for chats, which cannot be shared onward.
  - `pending_invites` ValidatedUserInfo[]: Emails this was shared with before they had an account. Each becomes a validated user once someone signs in with it.
    - `email` string, required
    - `right` string, required
    - `can_share` boolean, nullable: Whether the person may share onward: ADMIN, or a share with can_share. Null for chats, which cannot be shared onward.
  - `is_public_read` boolean
  - `can_share` boolean

## Other responses

- `422`: Validation Error

---

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