/Root
Last updated
Last updated
The /root
endpoint retrieves all the events in a thread, starting from the root event all the way down to the event whose id is provided. This is useful for tracing the ancestry of a reply in a conversation thread.
URL: /root
Method: GET
Auth Required: No
Permissions Required: None
Parameter | Description | Required |
---|---|---|
The response is a JSON object with the following structure:
id
: The event ID of the requested post.
events
: An array of events, starting from the root event and ending with the requested event.
profiles
: A map of author profiles for all events in the response, keyed by pubkey.
The events are returned in the correct order, with the root event first and the requested event last.
If the requested event is already a root event, only that event will be returned.
The endpoint uses the new NIP-10 spec--it maps the reply chain using the root
and reply
markers in e
tags.
400 Bad Request: If the event ID is missing or invalid.
404 Not Found: If the requested event or its root cannot be found.
500 Internal Server Error: If there's an issue processing the request.
id
The ID of the post to trace back to its root event.
Yes