---
title: "Submit Time"
method: POST
path: "/api/time-spent"
tags: ["time-spent"]
---

# Submit Time

`POST /api/time-spent`

Submit time spent to track time in the app.

## Headers

- `x-user-id` string, nullable

## Request body

- SubmitTimeSpentRequest — Request model for submitting time spent records.
  - `records` TimeSpentRecord[], required — Array of time spent records
    - `id` string, required — Record ID (UUID from frontend)
    - `started_at` string, date-time, required — Session start timestamp
    - `ended_at` string, date-time, required — Session end timestamp

## Response `200`

Successful Response

- SubmitTimeSpentResponse — Response model for submitting time spent.
  - `success` boolean, required
  - `message` string, required

## Other responses

- `422` — Validation Error

---

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