# Service Discovery

| brfc         | title                      | authors                                       | version |
| ------------ | -------------------------- | --------------------------------------------- | ------- |
| b2aa66e26b43 | bsvalias Service Discovery | andy (nChain), Ryan X. Charles (Money Button) | 1       |

Service discovery is separated into two phases:

* [Host Discovery](/paymail/service-discovery/host-discovery.md) is a DNS based lookup of the responsible host for a given paymail alias
* [Capability Discovery](/paymail/service-discovery/capability-discovery.md) resolves the paymail service endpoint URIs from the responsible DNS host and describes the capabilities supported by a given paymail service instance

## Service Discovery Process

<figure><img src="/files/tIij0bhCubaGJlt35Q5P" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bsvblockchain.org/paymail/service-discovery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
