---
title: "Generate a Root Cause Analysis for a test session error group"
method: POST
path: "/v1/root-cause-analyses/test-session-error-groups/{testSessionErrorGroupId}"
tags: ["Rocky AI"]
---

# Generate a Root Cause Analysis for a test session error group

`POST /v1/root-cause-analyses/test-session-error-groups/{testSessionErrorGroupId}`

Asynchronously generates a root cause analysis for a specific test session error group. Returns an `id` which you can use to poll the `/root-cause-analyses/{id}` endpoint.

## Path parameters

- `testSessionErrorGroupId` string, required

## Headers

- `x-checkly-account` string — Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general

## Request body

- PostRcaErrorGroup, nullable
  - `userContext` string, nullable — Optional user defined context to provide extra details useful for the user impact and root cause analysis.

## Response `202`

Accepted

- PostRcaTestSessionErrorGroup
  - `id` string, required
  - `status` 'PENDING', required

## Other responses

- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests

---

[API](https://skmtc.net/checklyhq/apis/checkly-public-api.md) · [All operations](https://skmtc.net/checklyhq/apis/checkly-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/checklyhq/checkly-public-api/revisions/9e903da4f3da/schema)
