Projects

The Projects API allows you to manage projects within an organization, including their creation, deletion, and updates.

List all Projects

GET/v1/projects
curl -X GET "https://api.lunary.ai/v1/projects" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <api_key>"

Example response for /v1/projects:

[
{
"id": "project-123",
"createdAt": "2023-01-01T00:00:00Z",
"name": "Example Project",
"orgId": "org-456",
"activated": true,
"publicApiKey": "public-key-789",
"privateApiKey": "private-key-101"
}
]

Create a Project

POST/v1/projects
curl -X POST "https://api.lunary.ai/v1/projects" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <api_key>" \
-d '{
"name": "New Project"
}'

Accepted Keys:

name

Example response for /v1/projects:

{
"id": "project-123",
"createdAt": "2023-01-01T00:00:00Z",
"name": "New Project",
"orgId": "org-456"
}

Delete a Project

DELETE/v1/projects/:projectId
curl -X DELETE "https://api.lunary.ai/v1/projects/:projectId" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <api_key>"

Update a Project

PATCH/v1/projects/:projectId
curl -X PATCH "https://api.lunary.ai/v1/projects/:projectId" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <api_key>" \
-d '{
"name": "Updated Project Name"
}'

Accepted Keys:

name

Example response for /v1/projects/:projectId:

{
"id": "project-123",
"createdAt": "2023-01-01T00:00:00Z",
"name": "Updated Project Name",
"orgId": "org-456"
}

Questions? We're here to help.