---
title: "Adds timesheet activity to a timesheet"
method: POST
path: "/timesheets/activities"
tags: ["Timesheet activities"]
---

# Adds timesheet activity to a timesheet

`POST /timesheets/activities`

## Request body

- StoreTimesheetActivityRequest
  - `type_id` integer, required — Timesheet activity type
  - `timesheet_id` integer, required — Timesheet on which the activity should be recorded on, sending '0' will create a new timesheet for the logged in user.
  - `assignment_id` integer — Optional: The appointment id on which the timesheet activity should be recorded on.
  - `start` string, date-time, required — Timesheet activity start date
  - `end` string, date-time, nullable — Timesheet activity end date
  - `adjust_blocking` boolean — Sometimes activities before or after would block this new activity. Set this parameter to true, to shorten or delete the blocking activities.
  - `start_lat` number, float, nullable — GPS latitude captured at activity start
  - `start_lng` number, float, nullable — GPS longitude captured at activity start
  - `end_lat` number, float, nullable — GPS latitude captured at activity end
  - `end_lng` number, float, nullable — GPS longitude captured at activity end
  - `end_open_activities` boolean — Close possible activities with end = null by the logged in user as well.

## Response `201`

The resource was successfully created.

## Other responses

- `401` — The request lacks valid authentication credentials.
- `403` — The token is valid but lacks the permission for this action.
- `422` — The request was well-formed but contains semantic errors (validation failed).
- `500` — An unexpected error occurred on the server (e.g. a requested relation does not exist).

---

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