---
title: "Switch Test Account"
method: POST
path: "/test-accounts/{user_id}/session"
tags: ["test-accounts"]
---

# Switch Test Account

`POST /test-accounts/{user_id}/session`

## Request

- Base URL: `https://api.getathly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getathly.com/test-accounts/{user_id}/session`
- Auth: HTTP bearer

A session for one of the caller's owner's test accounts.

## Path parameters

- `user_id` string, uuid, required

## Response `200`

Successful Response

- TestAccountSession: A session for the test account, for the browser to adopt.
  - `access_token` string, required
  - `refresh_token` string, required
  - `expires_at` integer, required
  - `user_id` string, required
  - `athlete_slug` string, required
  - `email` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getathly/apis/athly-api.md) - [All operations](https://skmtc.dev/getathly/apis/athly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getathly/apis/athly-api/revisions/6adfdc258d75?raw)
