---
title: "Schedule a message to be sent in a conversation"
method: POST
path: "/conversations/{conversationId}/scheduledmessages"
tags: ["Scheduled Messages"]
---

# Schedule a message to be sent in a conversation

`POST /conversations/{conversationId}/scheduledmessages`

This operation creates a scheduled message to be sent in a conversation at the designated time. If no author is specified, the message will be sent as the organization.

## Path parameters

- `conversationId` string, required

## Headers

- `s-idempotency-key` string

## Request body

- object
  - `message` ScheduledMessageMessagePost, required
    - `author` string — The ID of the organization member (teammate, team, or organization) to send the message as. If not provided, defaults to the organization.
    - `body` ConversationMessageBodyElement[], required
      - `type` 'text' | 'page', required
      - `value` string, required — The value of the message body element
    - `internal` boolean — Whether the message is internal or not
  - `sendAt` string, date-time, required — The date and time the message is scheduled to be sent

## Response `201`

created

- object
  - `scheduledMessage` ScheduledMessage, required
    - `conversationId` string, required — Spruce's conversation ID
    - `createdAt` string, date-time, required — The date and time the scheduled message was created
    - `id` string, required — Spruce's scheduled message ID
    - `isInternalNote` boolean, required — If the conversation item is an internal note - which is visible only to the posting side of the conversation.
    - `message` ScheduledMessageMessage, required
      - `attachments` ConversationItemAttachment[], required — Attachments for the scheduled message
        - `data` union
          - ConversationItemAudioAttachment
            - `mimetype` string, required — The mimetype of the audio attachment.
            - `signedUrl` SignedUrl, required
              - …
            - `transcription` ConversationItemTranscription
              - …
          - ConversationItemDocumentAttachment
            - `mimetype` string, required — The mimetype of the document attachment.
            - `name` string, required — The name associated with the attached document.
            - `signedUrl` SignedUrl, required
              - …
          - ConversationItemEntityProfileAttachment
            - `title` string, required — The title associated with the attached entity profile.
            - `url` string, required — The URL of the entity profile.
          - ConversationItemImageAttachment
            - `mimetype` string, required — The mimetype of the image attachment.
            - `signedUrl` SignedUrl, required
              - …
          - ConversationItemVideoAttachment
            - `mimetype` string, required — The mimetype of the video attachment.
            - `signedUrl` SignedUrl, required
              - …
        - `title` string, required — The title of the attachment.
        - `type` 'audio' | 'carePlan' | 'document' | 'entityProfile' | 'genericUrl' | 'image' | 'paymentRequest' | 'video' | 'visit', required — The type of the attachment.
      - `pagedInternalMemberIds` string[], required — The internal member ids that are paged in the scheduled message.
      - `text` string, required — The text of the conversation item. If the conversation item contains pages, they will be listed in the pages property.
    - `modifiedAt` string, date-time, required — The date and time the scheduled message was modified
    - `object` string, required — String representing the object's type
    - `scheduledToSendAt` string, date-time, required — The date and time the message is scheduled to be sent
    - `sendAsInternalMemberId` string, required — The id of a team or teammate in the organization

## Other responses

- `400` — bad request
- `404` — not found
- `422` — duplicate request
- `500` — unexpected error

---

[API](https://skmtc.net/sprucehealth/apis/spruce-health-api.md) · [All operations](https://skmtc.net/sprucehealth/apis/spruce-health-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sprucehealth/spruce-health-api/revisions/988e298cd9fd/schema)
