Skip to main content
POST
/
agents
/
{agentId}
/
unshare
Unshare Agent
curl --request POST \
  --url https://voice-livekit.studio.lyzr.ai/v1/agents/{agentId}/unshare \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "email_ids": [
    "former-colleague@company.com"
  ],
  "admin_user_id": "admin_12345"
}
'
{
  "success": true,
  "message": "Agent unshared successfully"
}
Revoke access to a specific Voice Agent for one or more users. This endpoint is the counterpart to the Share Agent endpoint. Use it when team members change projects, leave the organization, or no longer need visibility into an agent’s configuration.
Authentication Required: You must include your API key in the x-api-key header to authenticate this request. Only users with administrative rights over the agent should perform this action.

Required Parameters & Payload

  1. agentId (Path Parameter): The 24-character unique ID of the agent in the URL path.
  2. Request Body: A JSON payload identifying who should lose access and who is authorizing it.
    • email_ids: An array of strings containing the email addresses of the users whose access is being revoked.
    • admin_user_id: The ID of the administrator or owner who is authorizing this unshare action.

Example Usage

To remove access for two specific users, your request body should look like this:
{
  "email_ids": [
    "contractor1@external.com",
    "developer3@yourcompany.com"
  ],
  "admin_user_id": "admin_98765"
}

Authorizations

x-api-key
string
header
required

Path Parameters

agentId
string
required

The unique identifier of the agent.

Example:

"f790923795a23467555c0ad6"

Body

application/json
email_ids
string[]

A list of email addresses belonging to the users whose access should be revoked.

admin_user_id
string

The ID of the admin user authorizing the unshare operation.

Example:

"admin_12345"

Response

Unshare operation completed successfully.

The response is of type object.