Create, list, update, and delete image projects.

Projects

A project is a container for images, presets, and signing configuration. Each project gets a unique slug used in CDN URLs.

List projects

GET /images/projects
curl -H "Authorization: Bearer spronta_img_..." \
  https://app.spronta.com/api/images/projects

Response 200

[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "My App",
    "slug": "my-app-a1b2c3",
    "customDomain": null,
    "plan": "free",
    "requireSignedUrls": false,
    "createdAt": "2026-03-20T10:00:00.000Z",
    "updatedAt": "2026-03-20T10:00:00.000Z"
  }
]

Create a project

POST /images/projects
FieldTypeRequiredDescription
namestringYesProject name (1–100 chars)
curl -X POST \
  -H "Authorization: Bearer spronta_img_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "My App"}' \
  https://app.spronta.com/api/images/projects

Response 201 — Returns the created project.

Get project details

GET /images/projects/{projectId}

Returns the project with usage stats.

curl -H "Authorization: Bearer spronta_img_..." \
  https://app.spronta.com/api/images/projects/123e4567-e89b-12d3-a456-426614174000

Response 200

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "My App",
  "slug": "my-app-a1b2c3",
  "plan": "free",
  "stats": {
    "imageCount": 42,
    "totalSize": 104857600
  }
}

Update a project

PATCH /images/projects/{projectId}
FieldTypeDescription
namestringNew name (1–100 chars)
customDomainstring \nullCustom CDN domain (max 253 chars)
curl -X PATCH \
  -H "Authorization: Bearer spronta_img_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "Renamed App"}' \
  https://app.spronta.com/api/images/projects/123e4567-...

Response 200 — Returns the updated project.

Delete a project

DELETE /images/projects/{projectId}

Permanently deletes the project and all its images.

curl -X DELETE \
  -H "Authorization: Bearer spronta_img_..." \
  https://app.spronta.com/api/images/projects/123e4567-...

Response 200

{ "deleted": true }