---
title: "Get first valid Sidetree transaction"
method: POST
path: "/anchor/transactions/first-valid"
tags: ["Anchor"]
---

# Get first valid Sidetree transaction

`POST /anchor/transactions/first-valid`

Given a list of Sidetree transactions, returns the first transaction in the list that is valid. Returns 404 NOT FOUND if none of the given transactions are valid. This API is primarily used by the Sidetree core library to determine a transaction that can be used as a marker in time to reprocess transactions in the event of a block reorganization (temporary fork).

## Request body

- AnchorTransaction[]
  - `transaction_number` number — A monotonically increasing number (need NOT be by 1) that identifies a Sidtree transaction.
  - `transaction_time` number — The logical anchor time this transaction is anchored. Used for protocol version selection.
  - `transaction_time_hash` string — The hash associated with the transaction time.
  - `anchor_string` string — The string written to the anchor for this transaction.
  - `transaction_fee_paid` string — A number representing the fee paid for this transaction.
  - `normalized_transaction_fee` string — A number representing the normalized transaction fee used for proof-of-fee calculation.
  - `writer` string — A string representing the writer of the transaction. Used in the value time lock calculations.

## Response `200`

Success

- AnchorTransaction
  - `transaction_number` number — A monotonically increasing number (need NOT be by 1) that identifies a Sidtree transaction.
  - `transaction_time` number — The logical anchor time this transaction is anchored. Used for protocol version selection.
  - `transaction_time_hash` string — The hash associated with the transaction time.
  - `anchor_string` string — The string written to the anchor for this transaction.
  - `transaction_fee_paid` string — A number representing the fee paid for this transaction.
  - `normalized_transaction_fee` string — A number representing the normalized transaction fee used for proof-of-fee calculation.
  - `writer` string — A string representing the writer of the transaction. Used in the value time lock calculations.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Server Error

---

[API](https://skmtc.net/decentralized-identity/apis/sidetree-rest-api.md) · [All operations](https://skmtc.net/decentralized-identity/apis/sidetree-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/decentralized-identity/sidetree-rest-api/revisions/9a32549ab92a/schema)
