Skip to main content
POST
/
v2
/
agents
/
groups
/
remove-agents
Remove Agents from Group
curl --request POST \
  --url https://api.velt.dev/v2/agents/groups/remove-agents \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "groupId": "<string>",
    "agentIds": [
      "<string>"
    ]
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Agents removed from group successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "agentIds": [],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711950000000
      }
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Use this API to remove one or more agents from a group. The operation is idempotent — removing an id that is not a member is a silent success. The agents themselves are not deleted — only their membership in this group is removed. To delete a custom agent (and have it removed from every group), use Delete Agent.

Endpoint

POST https://api.velt.dev/v2/agents/groups/remove-agents

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

1. Remove a single agent

{
  "data": {
    "groupId": "grp_9f3ac2",
    "agentIds": ["abc123def456"]
  }
}

2. Remove multiple agents

{
  "data": {
    "groupId": "grp_9f3ac2",
    "agentIds": ["abc123def456", "spell-check"]
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Agents removed from group successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "agentIds": ["broken-links"],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711950000000
      }
    }
  }
}
FieldTypeDescription
data.groupobjectThe updated group document

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "NOT_FOUND"
  }
}
Errors:
  • NOT_FOUND — group does not exist
  • INVALID_ARGUMENT — empty agentIds array, or any id is empty
{
  "result": {
    "status": "success",
    "message": "Agents removed from group successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "agentIds": [],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711950000000
      }
    }
  }
}