> ## Documentation Index
> Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Agent Group

Use this API to fetch a single agent group by id. Returns the full group document including the complete `agentIds` array.

For a paginated overview of all groups in the workspace (returns `agentCount` instead of `agentIds`), use [List Groups](/api-reference/rest-apis/v2/agents/groups/list).

# Endpoint

`POST https://api.velt.dev/v2/agents/groups/get`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="groupId" type="string" required>
      Trimmed, non-empty. Agent group id.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

#### Get a group

```JSON theme={null}
{
  "data": {
    "groupId": "grp_9f3ac2"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Agent group fetched successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "description": "All brand-quality agents",
        "agentIds": ["abc123def456", "spell-check"],
        "metadata": {
          "apiKey": "ak_xxx",
          "organizationId": "server_org_001",
          "documentId": "server_doc_001"
        },
        "createdAt": 1711900000000,
        "updatedAt": 1711900000000
      }
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "NOT_FOUND"
  }
}
```

**Errors:** `NOT_FOUND` (group does not exist) / `INVALID_ARGUMENT` (missing or empty `groupId`).

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Agent group fetched successfully",
      "data": {
        "group": {
          "id": "grp_9f3ac2",
          "name": "Brand QA",
          "agentIds": [],
          "metadata": { "apiKey": "ak_xxx" },
          "createdAt": 1711900000000,
          "updatedAt": 1711900000000
        }
      }
    }
  }
  ```
</ResponseExample>
