---
title: "Post a log entry"
method: POST
path: "/logs"
tags: ["logs"]
---

# Post a log entry

`POST /logs`

Optional endpoint to add a log entry via post instead as message

## Request body

- Log
  - `headers` object, required
    - `serviceName` string, required — The name of the service that spawned this event
    - `createdAt` string, required — The time stamp when the event was spawned
    - `name` string, required — The name of the event
  - `payload` object, required — An arbitrary JSON object containing the event data

## Response `201`

The newly created Log.

- Log
  - `headers` object, required
    - `serviceName` string, required — The name of the service that spawned this event
    - `createdAt` string, required — The time stamp when the event was spawned
    - `name` string, required — The name of the event
  - `payload` object, required — An arbitrary JSON object containing the event data

## Other responses

- `400` — Invalid message format. Message must be in the provided format.
- `401` — Missing authorization header. Login via the IAM to receive a token.

## Changes

- **2019-07-29** `3deea053f75a` — 4 breaking, 15 warning, 1 info
  - added the new required request property `allOf[subschema #1]/headers`
  - removed the required property `allOf[subschema #1]/nameSpace` from the response with the `201` status
  - removed the required property `allOf[subschema #1]/service` from the response with the `201` status
  - removed the required property `allOf[subschema #1]/timeStamp` from the response with the `201` status
  - …16 more

[Change history](https://skmtc.dev/openintegrationhub/apis/audit-log/changes/logs/post.md)

---

[API](https://skmtc.dev/openintegrationhub/apis/audit-log.md) · [All operations](https://skmtc.dev/openintegrationhub/apis/audit-log/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintegrationhub/audit-log/revisions/271129b34402/schema)
