Skip to content

Connecting to the API

Aerostack provides a dedicated endpoint to verify your API connection and ensure your API key is correctly configured. This is the recommended first step when integrating with the Aerostack API.

Use this endpoint to “ping” the API and verify that you can access your project.

GET https://api.aerostack.dev/v1/public/projects/:projectSlug/connect

HeaderValueDescription
X-API-KeyYOUR_API_KEYRequired. Your project’s secret API Key.
Terminal window
curl -X GET https://api.aerostack.dev/v1/public/projects/my-project-slug/connect \
-H "X-API-Key: ak_Live_..."

If your API key is valid and matches the project, you will receive a 200 OK response:

{
"success": true,
"message": "Successfully connected to project 'My Awesome Project'",
"project": {
"name": "My Awesome Project",
"slug": "my-project-slug",
"id": "proj_123456789"
}
}
  • 401 Unauthorized: API Key is missing or invalid.
  • 403 Forbidden: API Key is valid but does not belong to the specified project.
  • 404 Not Found: The project slug is incorrect.

Once you have successfully connected:

  1. Browse Components: Use /v1/public/projects/:slug/components to see your schema.
  2. Fetch Content: Use /v1/public/projects/:slug/collections/:collection_slug/items to get your data.