NightmailDocs
Docs

Tell Nightmail what got in your way

post/v1/feedback

Tell Nightmail what got in your way while doing a task: what happened and what would have made it easier, with the request ID of a call that went wrong if you have one. Only message is needed; any other field (such as severity or kind, which an earlier version asked for) is ignored. It is filed as a support ticket for the Nightmail team, who read every one, with this credential's workspace and the key, sign-in or token that sent it. If it asks something, support answers by email to a person (whoever is behind this credential; for an API key, the workspace's owner): the answer never comes back through this call or tool, so don't wait or poll; carry on with the task. Any credential that can read may send it (API keys, including ones limited to sender domains, agent tokens and MCP sign-ins), for its own workspace: at most 20 reports an hour from one credential and 50 from one workspace (429 FEEDBACK_RATE_LIMITED, with Retry-After). Anything in message or context that looks like a key, token or password is removed before it is stored; redacted says how many. Send one report per distinct problem.

Needs Configuration: read.

Example

import { createClient } from '@nightmail/sdk/client';
import { sendFeedback } from '@nightmail/sdk';

const client = createClient({
  baseUrl: 'https://nightmail.dev',
  auth: scheme => scheme.scheme === 'bearer'
    ? process.env.NIGHTMAIL_API_KEY
    : undefined,
});

const result = await sendFeedback({
  client,
  body: {
    "message": "example"
  },
  throwOnError: true,
});

console.log(result.data);
curl --request POST \
  --url 'https://nightmail.dev/v1/feedback' \
  --header "Authorization: Bearer $NIGHTMAIL_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "message": "example"
}'

Request body

FeedbackRequest
messagerequiredstring

What happened and what would have made it easier. Plain text. Anything that looks like a key, token or password is removed before it is stored.

requestIdstring

The request ID of a call that went wrong: its x-request-id header, or error.requestId.

operationstring

The operation or MCP tool involved, such as sendEmail.

contextstring

What you were trying to do, in a sentence or two.

Responses

201Success
FeedbackReceipt
ticketIdrequiredstring

The support ticket it was filed as.

answerrequiredobject

Whether support answers it, and to whom: always by email to a person, never through this tool.

answer.torequiredstring or null

Who an answer is emailed to: the person behind this credential, their address masked (r•••@e•••.com), or for an API key "an owner of this workspace". Null: no answer will be sent.

answer.reasonrequiredstring or null

Why none will be: nobody in the workspace can get support email, or today’s answers are used up.

answer.nextrequiredstring

What happens now, in one sentence. Nothing more ever comes back through this call or tool.

redactedrequiredinteger

How many values that looked like keys, tokens or passwords were removed from message and context.

createdAtrequiredstring
400, 401, 403, 404, 409, 413, 422, 429, 500, 503Request failed; use error.code and requestId to diagnose.
ApiError
errorrequiredobject
error.coderequiredstring
error.messagerequiredstring
error.requestIdrequiredstring
error.fieldstring
error.retryablerequiredboolean
error.resetAtstring

Next capacity change for a Hosted rolling send limit.

error.detailsobject[]

Every problem found, when there is more than one part, such as rule diagnostics with rule, line, column, message and hint, or a measurement, such as CONTENT_TOO_LARGE_TO_SCREEN with screenedBytes and limitBytes (and index in a batch).

error.requiredobject

On a 403 permission refusal: what the request needs that this credential lacks. The Nightmail-Required-Permission header says the same.