# API quickstart Make one authenticated request to list the sites in your account. ## 1. Create an API key Open **API Keys** in the Interfold dashboard and create a **Read-only** key. Choose **Read/write** only when the integration needs to change resources. Store the key in a server-side environment variable. Never put it in browser code, commit it to a repository, or paste it into chat. ```sh export INTERFOLD_API_KEY='' export INTERFOLD_ACCOUNT_ID='' ``` ## 2. List sites ```sh curl "https://api.interfold.dev/v0/sites?accountId=$INTERFOLD_ACCOUNT_ID" \ -H "Authorization: Bearer $INTERFOLD_API_KEY" ``` The response contains a page of sites: ```json { "sites": [], "pagination": { "hasMore": false, "nextOffset": null } } ``` ## 3. Create a site Use a Read/write key for mutations: ```sh curl -X POST "https://api.interfold.dev/v0/sites" \ -H "Authorization: Bearer $INTERFOLD_API_KEY" \ -H "Content-Type: application/json" \ --data '{ "accountId": "", "name": "My Site", "access": "PRIVATE" }' ``` The response includes the Site ID, generated subdomain, attached bucket, and access state. Use [Get a site](/api-reference/sites#get-a-site) before deriving a hosted URL; do not guess the subdomain from the name. ## Next steps - [Authentication & permissions](/api-reference/authentication) - [Sites](/api-reference/sites) - [Files](/api-reference/files) - [Errors](/api-reference/errors)