Use a Veryfront API key to list the projects available to it. This request reads data without changing your project.
1. Prepare an API key
In Studio, open API Keys and create a key for your client. See Create an API key for storage and verification guidance.
In your terminal, replace the placeholder with the key:
export VERYFRONT_API_KEY="<API_KEY>"Run these commands in a trusted terminal or backend environment. Keep the key out of browser application code and source control.
2. List accessible projects
curl --silent --show-error --fail-with-body \
'https://api.veryfront.com/projects?limit=5' \
-H "Authorization: Bearer $VERYFRONT_API_KEY"The JSON response contains a data array of projects and page_info pagination metadata. Find the expected project's id, slug, and name in data.
An empty array means this request returned no projects. It doesn't prove access to a particular project. A project-scoped key limits the project context available to the request.
3. Check failures
If the request fails, add --include to the command to inspect the HTTP status and response headers. Read the response body for the specific error.
- 401: Check that the variable contains a valid key and that the bearer header is present.
- Unexpected or missing project: Check the key's project context and your access to that project.
- Connection failure: Confirm the client can reach
api.veryfront.com.
Next
Use the project ID or slug from the response in your next request:
- Upload project content: Upload a file and verify it was stored.
- Deploy through the API: Release an existing project branch and deploy it to an environment.
Related
- REST API reference: Endpoint parameters and response schemas.
- Authentication: Key scope and request authentication.