---
title: "Update an Email activity"
method: PUT
path: "/activity/email/{id}/"
tags: ["activities.emails"]
---

# Update an Email activity

`PUT /activity/email/{id}/`

This can be used to modify a draft or send it once the draft is complete.

When changing a draft's status to `scheduled` or `outbox`, the `sender` field is required if not already set on the email.

## Path parameters

- `id` string, required

## Request body

- UpdateEmailActivity
  - `activity_at` string, date-time, nullable
  - `attachments` object[], nullable
    - `content_id` string, nullable
    - `content_type` string, nullable
    - `filename` string, required
    - `inline_only` boolean
    - `size` integer, required
    - `url` string, uri, required
  - `bcc` string[], nullable
  - `body_html` string, nullable
  - `body_text` string, nullable
  - `cc` string[], nullable
  - `contact_id` string, nullable
  - `email_account_id` string, nullable
  - `followup_date` string, date-time, nullable
  - `followup_sequence_add_cc_bcc` boolean, nullable
  - `followup_sequence_delay` integer, nullable
  - `followup_sequence_id` string, nullable
  - `in_reply_to_id` string, nullable
  - `opens` object[], nullable
    - `opened_at` string, date-time, required
  - `sender` string, email, nullable
  - `status` 'inbox' | 'draft' | 'scheduled' | 'outbox' | 'sent' | 'error'
  - `subject` string, nullable
  - `template_id` string, nullable
  - `to` string[], nullable
  - `user_id` string, nullable

## Response `200`

Successful response

- EmailActivity
  - `_type` string, required
  - `activity_at` string, date-time, nullable, required
  - `agent_action_reason` string, nullable
  - `agent_config_id` string, nullable
  - `attachments` Attachment[], nullable
    - `content_type` string, nullable, required
    - `filename` string, nullable, required
    - `size` integer, nullable, required
    - `thumbnail_url` string, nullable
    - `url` string, required
  - `bcc` string[], required
  - `body_html` string, nullable, required
  - `body_preview` string, nullable
  - `body_text` string, nullable, required
  - `bulk_email_action_id` string, nullable, required
  - `cc` string[], required
  - `contact_id` string, nullable, required
  - `created_by` string, nullable, required
  - `created_by_name` string, nullable
  - `date_created` string, date-time, required
  - `date_scheduled` string, date-time, nullable, required
  - `date_sent` string, date-time, nullable, required
  - `date_updated` string, date-time, required
  - `direction` 'incoming' | 'outgoing', required — Direction of communication. Outgoing means the communication flowing from the user to the lead/contact. Inbound means the opposite.
  - `email_account_id` string, nullable
  - `envelope` object, nullable
  - `followup_sequence_add_cc_bcc` boolean, required
  - `followup_sequence_delay` integer, nullable, required
  - `followup_sequence_id` string, nullable
  - `has_reply` boolean, required
  - `id` string, required
  - `in_reply_to_id` string, nullable, required
  - `lead_id` string, nullable, required
  - `message_ids` string[], required
  - `need_smtp_credentials` boolean, required
  - `opens` EmailOpen[], nullable
    - `ip_address` string, nullable, required
    - `opened_at` string, date-time, required
    - `opened_by` string, nullable, required
    - `user_agent` string, nullable, required
  - `opens_summary` string, nullable, required
  - `organization_id` string, required
  - `references` string[], required
  - `send_as_id` string, nullable, required
  - `send_attempts` object[], nullable
  - `sender` string, nullable, required
  - `sequence_id` string, nullable
  - `sequence_name` string, nullable
  - `sequence_subscription_id` string, nullable
  - `status` 'inbox' | 'draft' | 'scheduled' | 'outbox' | 'sent' | 'error', required — Status of a message, such as Email or SMS.
  - `subject` string, nullable, required
  - `template_id` string, nullable, required
  - `template_name` string, nullable
  - `thread_id` string, nullable, required
  - `to` string[], required
  - `updated_by` string, nullable, required
  - `updated_by_name` string, nullable
  - `user_id` string, nullable, required
  - `user_name` string, nullable
  - `users` string[], required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found

---

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