---
title: "Have the agent write one message again"
method: POST
path: "/outbound-agents/{agent_id}/messages/{message_id}/regenerate/"
tags: ["outbound-agents"]
---

# Have the agent write one message again

`POST /outbound-agents/{agent_id}/messages/{message_id}/regenerate/`

## 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}/regenerate/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Throw away the agent's words for one message and have it write them again, optionally with a note on what to change ('shorter', 'mention their new office'). A message in the sequence's cadence is rewritten in the background, at the message's usual price, and appears on the contact's conversation once written. A reply is rewritten straight away as a new draft that waits for approval in the inbox. Refused for a message that has already been sent, one the agent is writing right now, one waiting on a person in the approval queue unless `from_task` says the ask comes from that task (which is then cancelled), and a preview.

## Path parameters

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

## Request body

- OutboundMessageRegenerateSchema: What to change when the agent writes a message again.
  - `from_task` boolean: True when the ask comes from the message's own task in the approval queue. That task reads Writing again while the agent writes the message again, then comes back waiting for a person; without it, a message waiting for approval is refused.
  - `steer_text` string, nullable: A note on what to do differently, such as 'shorter' or 'open on their new funding round'. Leave it out to have the agent simply try again; a reply keeps the note its last draft was written with.

## Response `202`

Successful Response

- OutboundMessageRegenerateReadSchema: What asking the agent to write a message again set in motion.
  - `draft_id` string, uuid, nullable, required: For a reply, the new draft now waiting for approval in the inbox. Null for a cadence message, and null for a reply when the agent found nothing it could usefully say.
  - `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.
  - `message_id` string, uuid, required: The message the agent was asked to write again.

## Other responses

- `401`: Unauthorized
- `403`: Asked with an API key. Writing a message again spends the workspace's credits on somebody's say-so, so it takes a signed-in person.
- `404`: The agent, the message, or the contact or inbox draft it was written for is gone.
- `409`: The message cannot be written again now: it has been sent, the agent is already writing it, a person is reviewing it, or it is a preview.
- `422`: Invalid request made to the API.
- `429`: A reply on a thread that has lost its sequence is drafted in the default voice, and the workspace has no assistant turn left today.
- `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/dc5ac3c84444?raw)
