Querying with cURL

You can use the following cURL command to query a database via the API.

curl --request POST '[https://proxy.phonesql.com/api](https://proxy.phonesql.com/api)' \
--user "USERNAME:PASSWORD" \
--header 'Content-Type: application/json' \
--data '{
    "database": "DATABASE_ID",
    "queries": [
        {
            "id": "query-id-1",
            "sql": "SELECT * FROM your_table LIMIT 10"
        }
    ]
}'