---
title: "Ingest API messages"
method: POST
path: "/messages/{projectId}"
tags: ["Messages"]
---

# Ingest API messages

`POST /messages/{projectId}`

Ingests an array of API messages for a project. Messages are validated and stored for later analysis.

    Scope: messages:write

## Path parameters

- `projectId` string, required — Unique identifier of the project.

## Request body

- WCFMessage[]
  - `threadId` string, required — Unique identifier of the thread. Commonly tied to a user.
  - `type` string, required — Original message's MIME Type.
  - `direction` 'SENT' | 'RECEIVED', required — Indicates whether the message was sent by the agent or received from the user.
  - `content` string, required — The actual content of the message.
  - `agentId` string, required — An identifier for the agent the user is interacting with.
  - `timestamp` string, date-time, required — A timestamp representing when the message was sent or received (ISO 8601).
  - `metadata` object, nullable — Used to flag special information about the message.
    - `error` string — Specify that a message contains a platform specific error. Should be a description of said error. Can only be used for messages whose direction is SENT.
    - `humanAssigneeId` string — Specify that a message was sent as a human handoff. Allows identifying a specific person. Can only be used for messages whose direction is SENT.

## Response `201`

Messages ingested successfully

- object
  - `message` string, required — Status message describing the result of the ingestion.
  - `count` number, required — Number of messages successfully ingested.

## Other responses

- `400` — Invalid request body
- `401` — Invalid or missing API key
- `404` — Project or integration not found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/whitewall-dev/apis/waizer-public-api.md) · [All operations](https://skmtc.dev/whitewall-dev/apis/waizer-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/whitewall-dev/waizer-public-api/revisions/1b646f6b7fa8/schema)
