API Documentation · v1

Integrate in 5 minutes

netlike CDN API is REST-based, returns JSON, supports multipart uploads. Callable from any language — see samples below.

Quick start

Live in 3 steps.

  1. 01
    Sign up
    Create a free account from the dashboard
  2. 02
    Generate API key
    Dashboard → API Keys page → create new key. Shown only once.
  3. 03
    Create folder & upload
    Open a folder in the default main container. Upload using the sample code below.

Authentication

Every request uses the X-API-KEY header.

curl https://api.netlike.net.tr/api/v1/usage \
  -H "X-API-KEY: gn_xxxxxxxxxxxxxxxxxxxx"
Never leak your key
Do not embed in client-side JS. Call from your backend. If leaked → revoke from dashboard + generate a new one.

Endpoints

Base URL · production

https://api.netlike.net.tr
Container & Folder structure
Each account has multiple containers (Free: 1, Pro: 5, Enterprise: ∞). Each container has a top-level folder limit based on plan (Free: 5, Pro: 50). Below each top-level folder, subfolder count is UNLIMITED — go as deep as you need.

Container CRUD

GET/api/v1/containersList containers

Returns all containers in your account. Default container main is auto-created at register.

200
[
  {
    "id": "cmq001",
    "name": "main",
    "slug": "main",
    "isDefault": true,
    "folderCount": 3
  }
]
POST/api/v1/containersCreate container

Creates a new container. Slug is auto-generated.

ParameterTypeDescription
namestring · requiredDisplay name. Slug derived from this.
{ "name": "Shop" }
200
{
  "id": "cmqXXX",
  "name": "Shop",
  "slug": "shop",
  "isDefault": false
}
DELETE/api/v1/containers/:idDelete container

All folders and images in the container are cascade-deleted.

200
{
  "ok": true
}

Folder CRUD

GET/api/v1/foldersList folders

Filter by container and/or parent.

ParameterTypeDescription
containerstring · optionalContainer slug
parentstring · optional"root" → top-level · folder slug → direct subfolders
POST/api/v1/foldersCreate folder or subfolder

Without parent → top-level folder (counts against plan limit). With parent → subfolder (unlimited).

ParameterTypeDescription
namestring · requiredDisplay name
containerstring · requiredContainer slug
parentstring · optionalParent folder slug (omit for top-level)
{ "name": "Products", "container": "main" }
{ "name": "Winter 2026", "container": "main", "parent": "products" }
PATCH/api/v1/folders/:idRename folder

Slug and all descendant paths auto-update.

{ "name": "Winter 2027" }
DELETE/api/v1/folders/:idDelete folder (and subfolders + images)

Deletes folder and entire subtree cascade.

200
{
  "ok": true
}
POST/api/v1/uploadUpload image

Multipart/form-data upload, single or multiple files. Auto-converted to WebP.

ParameterTypeDescription
containerstring · optionalContainer slug
folderstring · requiredTarget folder slug
filesfile[] · requiredImage file(s). JPG/PNG/WebP/AVIF/GIF, max 25MB per plan.
200
{
  "uploaded": [
    {
      "id": "cmqxxxx",
      "url": "https://cdn.netlike.net.tr/sukru/main/products/8f3...e1.webp",
      "width": 1920,
      "height": 1080,
      "sizeBytes": 124310
    }
  ]
}
GET/api/v1/imagesList images

Filter by container and folder slugs + cursor-based pagination.

GET/api/v1/images/:idSingle image details

Full metadata for a specific image.

DELETE/api/v1/images/:idDelete image

Deletes a single image. Removed from CDN too.

200
{
  "ok": true,
  "id": "img_a1b2c3"
}
POST/api/v1/images/batch-deleteBulk delete images

Delete up to 200 images per request. Body: { ids: ["img_a", "img_b", ...] }. IDs you don't own or that don't exist are silently skipped — the rest are deleted. Response returns a per-id status (deleted: true/false).

200
{
  "ok": true,
  "requested": 3,
  "deleted": 2,
  "skipped": 1,
  "bytesFreed": "491520",
  "results": [
    {
      "id": "img_a1b2c3",
      "deleted": true,
      "sizeBytes": 245760
    },
    {
      "id": "img_d4e5f6",
      "deleted": true,
      "sizeBytes": 245760
    },
    {
      "id": "img_unknown",
      "deleted": false,
      "reason": "not_found_or_not_owned"
    }
  ]
}
GET/api/v1/usageUsage/quota

Live storage status and plan.

200
{
  "storageUsedBytes": "124310",
  "storageQuotaMB": 500,
  "maxFileSizeMB": 5,
  "plan": "FREE"
}

Code samples

Same upload, 5 languages.

KEY="gn_xxxxxxxxxxxxxxxxxxxx"

curl https://api.netlike.net.tr/api/v1/containers -H "X-API-KEY: $KEY"

curl -X POST https://api.netlike.net.tr/api/v1/folders -H "X-API-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Products","container":"main"}'

curl -X POST https://api.netlike.net.tr/api/v1/upload -H "X-API-KEY: $KEY" \
  -F "container=main" -F "folder=products" \
  -F "files=@/path/photo.jpg"

Error codes

HTTPerrorDescription
400ValidationErrorBody / query invalid. Details in issues[] array.
401UnauthorizedErrorX-API-KEY missing or revoked.
402QuotaExceededStorage or plan limit exceeded.
404NotFoundFolder/file not found.
415UnsupportedMediaTypeUploaded file is not an image (magic byte check).
429RateLimitExceededPer-minute call limit exceeded.
502StorageUnavailableSFTP push to CDN storage failed (transient).

Limits

  • Max 10 files per upload request
  • Max file size by plan (Free: 5MB, Pro: 25MB, Enterprise: 100MB)
  • Rate limit: 60 uploads/min, 600 list/delete/min per API key
  • Each image cached 1 year with Cache-Control: public, max-age=31536000, immutable
  • Allowed MIME: image/jpeg, image/png, image/webp, image/avif, image/gif
netlike CDN — Modern image hosting & delivery API