> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seminode.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Response

> A Response actions a Quote — accepting or rejecting it to close the quoting thread.

**Kind:** `2024`

A Response is an event that actions a Quote. Like quotes, response content is end-to-end encrypted ([NIP-44](https://github.com/nostr-protocol/nips/blob/master/44.md)) — only the two parties in the thread can read it.

## Thread Closure

A quoting thread can be closed in two ways: **rejection** (by either party), or **mutual acceptance** (both parties accept). The `"s"` and `"z"` tags track the state of the thread:

* **`s`** — The response status: `"accepted"` or `"rejected"`.
* **`z`** — The thread finalization state: `"pending"` (awaiting the other party) or `"complete"` (thread closed).

| Scenario                             | `s`        | `z`        |
| ------------------------------------ | ---------- | ---------- |
| Rejected                             | `rejected` | `complete` |
| First party accepts                  | `accepted` | `pending`  |
| Second party accepts (final closure) | `accepted` | `complete` |

A second acceptance may only be published in response to a signed event where the other party has already set `["s", "accepted"]`. Once both parties have accepted and the thread is marked `"complete"`, the transaction is considered closed.

**Content:**

This is the plaintext JSON content before encryption. The resulting ciphertext is placed in the `content` field of the event.

```json theme={null}
{
  "company": "<string - Company name (set by app layer)>",
  "contact": "<string - Contact information>",
  "status": "<string - 'accepted' or 'rejected'>",
  "message": "<string - Quote message or note>",
  "meta": "<object - Arbitrary metadata JSON object (Optional)>",
  "quote": "<object - Embedded quote details (type: Quote)>",
  "reason": "<string - Reserved for future use>",
  "schema_version": "<string - listing schema version>"
}
```

**Response Tags**

```js theme={null}
[
  // Inherited Tags from replied-to quote
  ["n", "material_no"],
  ["m", "manufacturer name"],
  ["y", "supply or demand"],
  ["c", "poster_name"],
  ["b", "any"],
  ["i", "internal_no"],
  ["c", "any"],
  ["t", "any"],

  // Reply Event tags
  ["t", "thread_id"],
  ["r", "wss://domain.seminode.com/inbox"],        // My reply inbox node URL
  ["p", "recipient_pubkey"],                       // The recipient pubkey
  ["e", "root_listing_event_id", "", "root"],      // The listing event ID
  ["u", "user_pubkey1", "user_pubkey2"],           // Optional, the user pubkey

  // Response Only Tags
  ["s", "accepted", "rejected"],
  ["z", "complete", "pending"]
]
```

* Responses **SHOULD** copy the listing tags over.
* Responses **MUST** set the recipient `"p"` tag to the quote event's Author pubkey.
* Responses **MUST** set the status `"s"` tag to `accepted` or `rejected`.
* Responses **MUST** set the status `"z"` tag to `pending` if they are the first to accept, or `complete` if they reject, or are accepting another accepted response.
* Responses **MUST** be published to the listing's `"r"` tag inbox node URL, as well as the sender's inbox node.
