Cannot post upon making a request to the web api

Iโ€™m making the following request to get the owners of all the nfts of a contract (clojure + https://github.com/dakrone/clj-http):

(clj-http/post "https://deep-index.moralis.io/api/v2/nft/0x719d66810662BD3A33B54b83a85F55fd86dd7A9d/owners"
                 {:headers {:accept "application/json"
                            "X-API-KEY" "myapikey"}})

But Iโ€™m getting a 404 response with the following body:

"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot POST /api/v2/nft/0x719d66810662BD3A33B54b83a85F55fd86dd7A9d/owners</pre>\n</body>\n</html>\n"

How to fix this?

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/nft/0x719d66810662BD3A33B54b83a85F55fd86dd7A9d/owners?chain=bsc&format=decimal' \
  -H 'accept: application/json' \
  -H 'X-API-Key: API_KEY'

It looks like this is a GET request and not a POST request.

using get

(clj-http/get (str "https://deep-index.moralis.io/api/v2/nft/"
                      (-> req :params :contract-address)                   
                      "/owners?chain=eth&format=decimal"
                 {:headers {:accept "application/json"
                            "X-API-KEY" "myapikey"}}))

gives 401 too with the body:

"{\"message\":\"API KEY missing from x-api-key header\"}"

Are you sure thatโ€™s the syntax to set those header options? It looks like it could concatenate those two strings instead of two entries in headers with:

                 {:headers {:accept "application/json"
                            "X-API-KEY" "myapikey"}}))

Even when I make the request with curl, I get

{"message":"Invalid key"}

(And yes, the clojure syntax is correct.)

I copied the key from Master Key in the server that I created in the moralis dashboard.

That is not the api-key that you should use, you can get the api key from https://admin.moralis.io/web3Api

Upon using the api key from the link you gave, the curl command works but the clojure request still gives:

"{\"message\":\"API KEY missing from x-api-key header\"}"
             {:headers {:accept "application/json\nX-API-KEY" "myapikey"}}))

try this in case that original syntax was not ok.