> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Share Agent

> Share a specific agent with one or more users via their email addresses.

Grant other users access to a specific Voice Agent.

This endpoint is ideal for collaborative environments where multiple team members need to view, test, or manage the same agent configuration. Instead of requiring internal user IDs, you can simply invite users using their email addresses.

<Info>
  **Authentication Required:** You must include your API key in the `x-api-key` header to authenticate this request. Ensure the API key belongs to a user with permission to share this agent.
</Info>

### Required Parameters & Payload

1. **`agentId` (Path Parameter):** Provide the unique 24-character ID of the agent you are sharing directly in the URL.
2. **Request Body:** You must pass a JSON payload specifying who receives access.
   * **`email_ids`**: An array of strings containing the email addresses of the users you want to invite.
   * **`admin_user_id`**: The ID of the administrator or owner who is authorizing this share action.

### Example Usage

If you want to share an agent with two developers on your team, your request body would look like this:

```json theme={null}
{
  "email_ids": [
    "developer1@yourcompany.com",
    "developer2@yourcompany.com"
  ],
  "admin_user_id": "admin_98765"
}
```


## OpenAPI

````yaml post /agents/{agentId}/share
openapi: 3.0.3
info:
  title: Lyzr Voice LiveKit API
  version: 1.0.0
servers:
  - url: https://voice-livekit.studio.lyzr.ai/v1
security: []
paths:
  /agents/{agentId}/share:
    post:
      summary: Share Agent
      description: Share a specific agent with one or more users via their email addresses.
      parameters:
        - name: agentId
          in: path
          required: true
          description: The unique identifier of the agent to be shared.
          schema:
            type: string
            example: f790923795a23467555c0ad6
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email_ids:
                  type: array
                  description: >-
                    A list of email addresses belonging to the users you want to
                    share the agent with.
                  items:
                    type: string
                    example: colleague@company.com
                admin_user_id:
                  type: string
                  description: The ID of the admin user authorizing the share operation.
                  example: admin_12345
      responses:
        '200':
          description: Share operation completed successfully.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                example:
                  success: true
                  message: Agent shared successfully
        '400':
          description: Invalid request payload.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  example:
                    type: object
                    additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````