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

# Adds a timesheet activity type to a timesheet

`POST /timesheets/activities/types`

## Request body

- StoreTimesheetActivityTypeRequest
  - `type_id` integer — Timesheet activity type (activity activity)
  - `timesheet_id` integer — Timesheet on which the activity (activity) should be recorded on
  - `assignment_id` integer — Optional: The appointment id on which the timesheet activity should be booked on.
  - `start` string, date-time — 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
  - `name` string — Timesheet activity type name
  - `custom_icon_id` integer — Optional a custom icon for this type. Get the id from '/icons' endpoints
  - `group` 'WORKING' | 'BREAK' | 'NONE' — Use a fitting group for the correct calcuation in the time account / project times evaluation.
  - `color` string — Color for the timesheet activity type
  - `default` boolean — Is this the default type for group WORKING or BREAK? Can be only set to true if the type has one of these groups.

## 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.dev/craftboxx/apis/craftboxx-api-documentation.md) · [All operations](https://skmtc.dev/craftboxx/apis/craftboxx-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/craftboxx/craftboxx-api-documentation/revisions/490934cc6f91/schema)
