# Decode Runestone

This endpoint can be used to pass a transaction hex and extract and decode the runestone present in the OP\_RETURN

## POST /v1/tx/runes/decode

> Decode a runestone from transaction hex.

```json
{"openapi":"3.0.3","info":{"title":"SecretKeyLabs API","version":"1.0.0"},"tags":[{"name":"Ordinals"}],"servers":[{"url":"https://api.secretkeylabs.io"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"x-api-key","in":"header"}}},"paths":{"/v1/tx/runes/decode":{"post":{"tags":["Ordinals","Runes"],"description":"Decode a runestone from transaction hex.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tx":{"description":"Transaction hex string to decode","minLength":1,"type":"string"}},"required":["tx"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"Runestone":{"type":"object","properties":{"edicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"output":{"type":"number"}},"required":["id","amount","output"]}},"etching":{"type":"object","properties":{"divisibility":{"type":"number"},"premine":{"type":"number"},"rune":{"type":"string"},"spacers":{"type":"number"},"symbol":{"type":"string"},"terms":{"type":"object","properties":{"amount":{"type":"number"},"cap":{"type":"number"},"height":{},"offset":{}}},"turbo":{"type":"boolean"}},"required":["spacers","turbo"]},"mint":{},"pointer":{}},"required":["edicts"]},"Cenotaph":{"type":"object","properties":{"etching":{"type":"number"},"flaws":{"type":"number"},"mint":{"type":"string"}},"required":["flaws"]}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"description":"Invalid input","type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"string"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"description":"Not found","type":"string"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"description":"Internal server error","type":"string"}}}}}}}}}
```
