---
title: "Reopen a closed test session using suite token authentication"
method: POST
path: "/unit-tests/sessions/{session_id}/reopen"
tags: ["Unit Test API"]
---

# Reopen a closed test session using suite token authentication

`POST /unit-tests/sessions/{session_id}/reopen`

Authentication: Include the suite token in the header: `Authorization: Bearer <suite_token>`

## Path parameters

- `session_id` string, required

## Response `200`

- TestSessionView
  - `url` string — API endpoint to GET this object
  - `html_url` string — Web URL to view this object in Buddy.works
  - `id` integer — Unique identifier of the test session
  - `relative_id` integer — Sequential ID within the suite
  - `create_date` string, date-time — Timestamp when the session was created
  - `start_date` string, date-time — Timestamp when the session started
  - `finish_date` string, date-time — Timestamp when the session finished
  - `created_by` MemberView — User/member reference
    - `url` string — API endpoint to GET this object
    - `html_url` string — Web URL to view this object in Buddy.works
    - `id` integer — The ID of the user
    - `name` string — The name of the user
    - `avatar_url` string — The avatar URL of the user
    - `email` string — The email address of the user
    - `admin` boolean — Whether the user has admin privileges
    - `workspace_owner` boolean — Whether the user is workspace owner
  - `ci_provider` 'NONE' | 'BUDDY' | 'GITHUB_ACTION' | 'CIRCLE_CI' — CI provider that initiated the test session
  - `ci_run_url` string — URL to the external CI/CD run
  - `revision` string — Ending revision/commit hash for the test range
  - `ref_type` 'BRANCH' | 'TAG' | 'PULL_REQUEST' — Type of Git reference
  - `ref_name` string — Name of the Git reference (branch name, tag name, etc.). May be null if ref_type is not provided.
  - `execution_id` string — Execution hash ID. Set when session is a result of BUDDY action execution
  - `action_execution_id` string — Action execution hash ID. Set when session is a result of BUDDY action execution
  - `status` 'IN_PROGRESS' | 'SUCCESSFUL' | 'ERROR' | 'SKIPPED' — Current status of the session
  - `error_message` string — Error message if the session failed. Set when status is ERROR.
  - `duration` integer — Total duration in seconds
  - `tests_count` integer — Total number of tests
  - `failed_count` integer — Number of failed tests
  - `skipped_count` integer — Number of skipped tests
  - `error_count` integer — Number of tests with errors

---

[API](https://skmtc.net/buddy/apis/buddy-api.md) · [All operations](https://skmtc.net/buddy/apis/buddy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/buddy/buddy-api/versions/2426d67c249a/schema)
