---
title: "Create Log Book Post"
method: POST
path: "/v2/company/{company_id}/log_book_posts"
tags: ["Log Book"]
---

# Create Log Book Post

`POST /v2/company/{company_id}/log_book_posts`

## Request

- Base URL: `https://api.7shifts.com`
- URL: `https://api.7shifts.com/v2/company/{company_id}/log_book_posts`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://app.7shifts.com/oauth2/authorize`
    - Client credentials
    - Password
    - Token URL: `https://app.7shifts.com/oauth2/token`
  - API key in cookie `7session`
- TypeScript: <https://skmtc.dev/7shifts/apis/7shifts-api/docs/v2/company/:company_id/log_book_posts/post.ts> (a function with typed inputs; its response is checked against the schema)

Beta

## Path parameters

- `company_id` integer, required

## Headers

- `x-api-version` string: An API version
- `x-company-guid` string, uuid

## Request body

- object
  - `location_id` integer, required
  - `log_book_category_id` integer, required
  - `date` string, required: The posted date. Format YYYY-MM-DD
  - `message` string, required
  - `attachments` object[], nullable
    - `file_name` string, required
    - `file_content` string, required: base 64 encoded file to be attached to post
  - `attachment_uuid` string, nullable: Optional UUID for attachment reference

## Response `201`

Created

- object
  - `data` object, required
    - `id` integer, required
    - `uuid` string, uuid, required
    - `location_id` integer, required
    - `user_id` integer, required
    - `log_book_category_id` integer, required
    - `date` string, required: The posted date. Format YYYY-MM-DD
    - `message` string, required
    - `attachments` object[], nullable, required
      - `file_name` string, required
      - `full_path` string, required: fully qualified URL for requesting the attachment
      - `file_id` string, required
    - `log_book_comment_count` integer, required
    - `created` string, date-time, required
    - `company_id` integer, required
  - `object` 'log_book_post', required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable Entity
- `500`: Server Error

---

[API](https://skmtc.dev/7shifts/apis/7shifts-api.md) - [All operations](https://skmtc.dev/7shifts/apis/7shifts-api/llms.txt) - [OpenAPI document](https://skmtc.dev/7shifts/apis/7shifts-api/revisions/40e0ef40dfcd?raw)
