---
title: "Edit a draft DM"
method: PATCH
path: "/scheduled-messages/update"
tags: ["scheduledMessages"]
---

# Edit a draft DM

`PATCH /scheduled-messages/update`

Edit the text or scheduled-send time of a draft DM. Only rows in `draft` status are editable — scheduled/sending/sent/failed/cancelled are terminal for text edits. Returns `{updated, ineligible}` so the caller can distinguish missing ids from already-approved rows.

## Request body

- object
  - `messageId` string, required — Scheduled message id to edit
  - `message` string — New DM text
  - `scheduledSendAt` string, nullable — New ISO datetime, or null to clear

## Response `200`

Message updated

- object
  - `success` true, required
  - `updated` object[], required
    - `id` string, required
    - `contactId` string, required
    - `contactName` string, nullable — Contact name (included in list, absent in create)
    - `contactLinkedinUrl` string, nullable — Contact LinkedIn URL (included in list, absent in create)
    - `message` string, required
    - `status` 'draft' | 'scheduled' | 'sending' | 'sent' | 'failed' | 'cancelled', required
    - `scheduledSendAt` string, nullable, required
    - `sentAt` string, nullable, required
    - `campaignSlug` string, nullable, required
    - `errorMessage` string, nullable — Error message if status is 'failed'
    - `createdAt` string, required
    - `contactHeadline` string, nullable
    - `contactCompany` string, nullable
    - `contactLocation` string, nullable
    - `contactDegree` string, nullable — Network distance to this contact.
    - `contactProfilePicture` string, nullable
    - `contactHotScore` integer, nullable
    - `contactSentDmCount` integer, nullable — How many DMs this account has already sent this contact, which is the number that decides whether another is appropriate.
    - `contactQualificationNotes` string, nullable — Why this contact was judged a fit.
    - `contactQualNotes` string, nullable — Duplicate of contactQualificationNotes, kept for older callers. Prefer the long name.
    - `contactLeadBrief` string, nullable
    - `contactLifecycleStage` string, nullable — Per-campaign stage: contact, lead, qualified, or rejected.
    - `messageType` string, nullable — What this row will send. A connection request carries no body, which is why a queue of them is not a queue of drafts.
    - `priority` string, nullable
    - `campaignId` string, nullable
    - `campaignName` string, nullable
    - `updatedAt` string, nullable
    - `requeueCount` integer, nullable — How many times this row has been rescheduled. A high count against a closed window is the shape of a terminal failure.
    - `resurrectionCount` integer, nullable
    - `linkedinCredentialsId` string, nullable — Which connected account will send it.
  - `ineligible` object[], required
    - `id` string, required
    - `currentStatus` string, required
  - `creditsUsed` integer, required — Credits consumed by this call. 0 for free endpoints, cached results, duplicates, and for every query that does not touch LinkedIn.
  - `retryAfter` integer, required — Seconds to wait before another call of the same type. 0 means no wait is needed.
  - `_meta` object — Credit balance carried on every response so a caller never has to ask for it separately. Absent when the caller has no connected account.
    - `credits` object, required
      - `current` number, required — Credits spent this period.
      - `limit` number, nullable, required — Period allowance, or null when unlimited.
      - `remaining` number, nullable, required — Allowance left, or null when unlimited.
      - `percentage` number, required — Share of the allowance spent, 0 to 100.
      - `isUnlimited` boolean, required
      - `accountPlan` string, required — The credential's plan.

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error.
- `401` — Although HTTP specifies "unauthorized", this response means "unauthenticated". Authenticate to continue. NOTE: 401 is also returned with code "linkedin_not_connected" when the caller IS authenticated but has no connected LinkedIn account — connect LinkedIn (not re-authenticate) to continue.
- `403` — The client does not have access rights to the content.
- `404` — The server cannot find the requested resource.
- `409` — The request conflicts with the current state of the server.
- `410` — The requested content has been permanently deleted from the server.
- `422` — The request was well-formed but was unable to be followed due to semantic errors.
- `429` — Rate limit exceeded. Read error.retryAfter for the wait time in seconds.
- `500` — The server encountered a situation it does not know how to handle.
- `502` — LinkedIn returned a server error or the proxy connection failed. Retry after a few seconds.
- `503` — Proxy capacity temporarily exceeded. Retry after a few seconds.

---

[API](https://skmtc.net/berea/apis/bereach-api.md) · [All operations](https://skmtc.net/berea/apis/bereach-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/berea/bereach-api/revisions/a1e86af2406d/schema)
