---
title: "Rewrite one message the agent wrote"
method: PATCH
path: "/outbound-agents/{agent_id}/messages/{message_id}/"
tags: ["outbound-agents"]
---

# Rewrite one message the agent wrote

`PATCH /outbound-agents/{agent_id}/messages/{message_id}/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Replace the words that will send. What the agent wrote is kept beside them, and the change is recorded as feedback the agent learns from. A message that has already gone out cannot be changed.

## Path parameters

- `agent_id` string, uuid, required
- `message_id` string, uuid, required

## Request body

- OutboundMessageEditSchema: A person's replacement words for one written message.
  - `body` string, required: The body that sends.
  - `subject` string, nullable: The subject; null threads the message under the last one.

## Response `200`

Successful Response

- OutboundMessageReadSchema: One message the agent wrote, with everything shown beside it.
  - `agent_version` integer, required
  - `angle` string, nullable, required
  - `body` string, required
  - `confidence` 'high' | 'medium' | 'low', required: The writer's own read on whether its message is ready to send unedited.
  - `confidence_score` integer, nullable, required
  - `confident` boolean, nullable, required
  - `conversation_id` string, uuid, required
  - `created_at` string, date-time, required
  - `credits_charged` integer, required
  - `error` string, nullable, required
  - `facts_used` string[], required
  - `findings` OutboundFindingReadSchema[], required
    - `code` string, required
    - `excerpt` string, nullable, required
    - `message` string, required
    - `severity` string, required
  - `generated_body` string, required
  - `generated_subject` string, nullable, required
  - `id` string, uuid, required
  - `insufficient_data` boolean, required
  - `is_preview` boolean, required
  - `judge_verdict` OutboundJudgeVerdictReadSchema, required: What the independent judge said about a written message.
    - `grounded` boolean, required
    - `language_ok` boolean, required
    - `on_topic` boolean, required
    - `quality_score` integer, required
    - `reasons` string[], required
    - `safe` boolean, required
  - `kind` 'email' | 'linkedin_connection_note' | 'linkedin_message' | 'linkedin_inmail' | 'reply_email' | 'reply_linkedin', required: What one written message is, which decides its rules, its length and its channel.
  - `model_key` string, required
  - `opens_thread` boolean, required
  - `price_tenths` integer, required
  - `profile_read` boolean: Whether the agent read the contact's LinkedIn profile for this message.
  - `quality_score` integer, nullable, required
  - `reach` 'none' | 'mcp' | 'web', required: How far a Use AI run may reach beyond the table's own data. The price lever and the budget lever both key on this. ``NONE`` is one plain completion; ``MCP`` runs the research loop against ONLY the org's attached MCP tools (no web-read fees, no page summaries); ``WEB`` is the full web research loop. A run that has both web and MCP executes (and bills) as ``WEB``.
  - `reasoning` string, nullable, required
  - `sent_at` string, date-time, nullable, required
  - `slot_key` string, nullable, required
  - `status` 'writing' | 'written' | 'unpaid' | 'queued' | 'sent' | 'edited' | 'rejected' | 'superseded' | 'failed', required: Where one written message stands. WRITING is a lease: the model is being asked. WRITTEN, QUEUED (a person is looking at it) and EDITED (a person changed it) are the three sendable states. UNPAID is written but not fully charged, so it is not sendable until the remainder is collected. SENT, REJECTED, SUPERSEDED and FAILED are terminal.
  - `subject` string, nullable, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Outbound agent not found.
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
