---
title: "Reply to computer email"
description: "Replies to one stored email from the computer's stable inbox address."
canonical: "https://www.cool.computer/docs/api-reference/email/reply-to-computer-email"
---
# Reply to computer email

> Replies to one stored email from the computer's stable inbox address.

```http
POST https://api.cool.computer/api/computers/{id}/emails/{emailID}/reply
```

Replies to one stored email from the computer's stable inbox address. The server resolves the recipient, subject, and thread from the stored message; callers provide only the approved reply content. Send an Idempotency-Key when a network failure might cause a retry.

## Authorization

- A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

## Parameters

- `id` (path, string, at least 1 characters, required): The computer's name, such as agent-atlas, or its id (cmp_…). Every caller may use either, the computer's own runtime token included.
- `emailID` (path, string, at least 1 characters, required): Email identifier returned by the inbox list operation.
- `Idempotency-Key` (header, string, pattern `^[!-~]+$`, 1 to 128 characters): A caller-generated key for safely retrying this side effect. The server retains the key and response for 24 hours. Reusing it with the same request replays the original response, except after a failure that proves nothing happened: that is kept for one minute, and one that sets Retry-After is not kept, so a retry after it runs the request again; reusing it with different input returns 409.

## Request body

Required.

- `application/json` (object)
  - `text` (string): Plain-text reply body. The text and HTML bodies together are at most 128 KiB of UTF-8, without surrounding white space; a larger one is 413 email_body_too_large, whose context.field names the body to shorten.
  - `html` (string): HTML reply body. The text and HTML bodies together are at most 128 KiB of UTF-8, without surrounding white space; a larger one is 413 email_body_too_large, whose context.field names the body to shorten.
  - At least one of: `text` (pattern `\S`); `html` (pattern `\S`)

## Responses

- `201`: Safe delivery metadata for the stored outbound reply.
  - `application/json` (object)
    - `id` (string, required)
    - `status` ("sent", required)
    - `created_at` (string, date-time, required)
- `400`: Bad Request.
- `401`: Unauthorized.
- `402`: Payment Required. `pro_required`: this computer has a VM and the account is not Pro, which fences it; a site without a VM works on Free. Start Pro with cool billing upgrade, or fix a lapsed subscription with cool billing portal, or use the Account page.
- `403`: Forbidden.
- `404`: Not Found. `computer_not_found`: the computer does not exist or is not yours. `email_not_found`: it has no email with that id.
- `409`: The idempotency key is in progress, has an unknown outcome, or was used for a different request.
- `413`: Payload Too Large. `email_body_too_large`: the text and HTML bodies together are larger than 128 KiB; context.field names the larger body, the one to shorten. Nothing was sent.
- `429`: Too Many Requests. `email_send_limit`: the computer sent 1000 emails in the last 24 hours, or the account's computers sent 2000, so nothing was sent; send it again tomorrow. `api_request_rate_exceeded`: wait for Retry-After seconds.
- `500`: Internal Server Error.
- `503`: Service Unavailable. `email_gateway_unreachable`: the mail gateway could not be reached and nothing was sent; send it again, with a new Idempotency-Key.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl -X POST "https://api.cool.computer/api/computers/$PARAM_ID/emails/$PARAM_EMAILID/reply" \
  -H "authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data '{"text":"string"}'
```
