---
updatedAt: 2025-02-13T21:21:59.000Z
agentTools:
  projectIndex: https://docs.solana.fm/llms.txt
---

# Account Favourite Domain

Account Favourite Domain
<h3>This endpoint returns you the favourited domain of the account hash provided</h3>

## Parameters

* `accountHashes`- a list of domain owner's account hashes to query for
* `fidaType`- SNS domain type to query for\
  Available options for this field are \[`"OWNER"`, `"NAME_SERVICE"`]

## Results

### Valid Response

`[<object>]`- a list of JSON objects containing the following fields each:

* `owner:`\<String>, the domain owner's account hash
* `name:`\<String>, the name of the domain account
* `nameServiceAccount:`\<String>, the name service account hash
* Example of a valid response:

```json response data
{
  "status": "Success",
  "message": "Retrived favourite domains of multiple accounts!",
  "result": [
    {
      "owner": "6PzyBQbt3F8aRRAEohn3usYtdTx6nQAVwiFUHVtC7giW",
      "name": "impuesto",
      "nameServiceAccount": "6PzyBQbt3F8aRRAEohn3usYtdTx6nQAVwiFUHVtC7giW"
    }
  ]
}
```

### Invalid Response

`<object>` - a JSON object containing the following fields if the requested account doesn't exist

* `code:`\<integer>, The error code
* `message:`\<String>, An error message to indicate which part of the query went wrong
* `status:`\<String>, The response status following the error code
  * 400 = Bad Request (client side)
  * 500 = Internal Server Error (server side)

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "SolanaFM API Overview",
    "description": "A list of API endpoints that are exposed to the public",
    "contact": {
      "name": "Elvis Yong"
    },
    "license": {
      "name": "MIT"
    },
    "version": "0.2.9"
  },
  "servers": [
    {
      "url": "https://api.solana.fm"
    }
  ],
  "paths": {
    "/v0/domains/bonfida/favourites": {
      "post": {
        "tags": [
          "Bonfida Domains"
        ],
        "summary": "Account Favourite Domain",
        "description": "Account Favourite Domain\n<h3>This endpoint returns you the favourited domain of the account hash provided</h3>",
        "operationId": "get_favourite_domains_by_multiple_accounts",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostFavouriteDomainRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully retrieved favourite domains by multiple accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostFavouriteDomainViewModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "description": "This is where we have our API error response struct\nFeel free to design your own API Error response\nFor this example I am referencing Google's JSON API error response\nhttps://cloud.google.com/apis/design/errors",
        "required": [
          "code",
          "message",
          "status"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "example": "500",
            "minimum": 0
          },
          "message": {
            "type": "string",
            "example": "Internal Server Error"
          },
          "status": {
            "type": "string",
            "example": "500"
          }
        }
      },
      "PostFavouriteDomainRequestBody": {
        "type": "object",
        "required": [
          "accountHashes",
          "fidaType"
        ],
        "properties": {
          "accountHashes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of domain owner account hashes to query for"
          },
          "fidaType": {
            "type": "string",
            "description": "Fida type to filter the results\nOptions are either `OWNER` or `NAME_SERVICE`"
          }
        }
      },
      "PostFavouriteDomainViewModel": {
        "type": "object",
        "required": [
          "owner",
          "name",
          "nameServiceAccount"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the domain"
          },
          "nameServiceAccount": {
            "type": "string",
            "description": "The name service account hash of the domain"
          },
          "owner": {
            "type": "string",
            "description": "The domain owner's account hash"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Bonfida Domains",
      "description": "Domain name service specifically for bonfida"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```