Cloudify API Docs

Beginner-friendly guide for the backend at https://cloudify.meraj.pro.

Current provider: Cloudinary. You can manage private auth tokens, public keys, and files from these endpoints.

Before You Start

You will use two different tokens in this API.

Auth token: returned from register/login. Use this for account-level routes (user, logout, keys management).

Public key: generated from /api/keys/public. Use this for file routes (upload/list/delete).

Example header format

Authorization: Bearer <TOKEN_HERE>

Quick Start Flow

If this is your first time, follow these steps in order.

  1. Register or login to get an auth token.
  2. Add a Cloudinary account in /api/keys/cloudinary.
  3. Create a public key in /api/keys/public.
  4. Use that public key to upload/list/delete files.

Auth

Create an account, login, inspect your user, and logout.

MethodEndpointAuthInput
POST
/api/auth/register
NoneJSON: name, email, password, password_confirmation
POST
/api/auth/login
NoneJSON: email, password
GET
/api/user
Bearer auth-token-
POST
/api/logout
Bearer auth-token-

Example: register

curl -X POST "https://cloudify.meraj.pro/api/auth/register" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name":"Alex",
    "email":"alex@example.com",
    "password":"Password123!",
    "password_confirmation":"Password123!"
  }'

# Response includes: user + token

Cloudinary Keys (Requires Auth)

Store Cloudinary credentials for the logged-in user.

MethodEndpointAuthInput
GET
/api/keys/cloudinary
Bearer auth-token-
POST
/api/keys/cloudinary
Bearer auth-tokenJSON: name (cloud_name), key (api_key), secret (api_secret)
GET
/api/keys/cloudinary/{id}
Bearer auth-token-
PUT
/api/keys/cloudinary/{id}
Bearer auth-tokenJSON: name
DELETE
/api/keys/cloudinary/{id}
Bearer auth-token-

Example: add Cloudinary key

curl -X POST "https://cloudify.meraj.pro/api/keys/cloudinary" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <AUTH_TOKEN>" \
  -d '{
    "name":"your_cloud_name",
    "key":"your_api_key",
    "secret":"your_api_secret"
  }'

Public Keys (Requires Auth)

Create project-level public keys to access file endpoints safely.

MethodEndpointAuthInput
GET
/api/keys/public
Bearer auth-token-
POST
/api/keys/public
Bearer auth-tokenJSON: name
GET
/api/keys/public/{id}
Bearer auth-token-
PUT
/api/keys/public/{id}
Bearer auth-tokenJSON: name
DELETE
/api/keys/public/{id}
Bearer auth-token-

Example: create a public key

curl -X POST "https://cloudify.meraj.pro/api/keys/public" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <AUTH_TOKEN>" \
  -d '{"name":"main"}'

# Response includes generated "key" value (save it).

Cloudinary Files (Use Public Key)

Upload, list, and delete files by logical group name.

MethodEndpointAuthInput
POST
/api/cloudinary/upload
Bearer public_keymultipart/form-data: name, images[]
GET
/api/cloudinary/files
Bearer public_keyquery: name
DELETE
/api/cloudinary/files
Bearer public_keyJSON: name, files[] (upload IDs from list/upload response)

Allowed upload types: jpg, jpeg, png, webp, gif, svg, avif.

Files are uploaded under Cloudinary folder: uploads/<name>

Example: upload images

curl -X POST "https://cloudify.meraj.pro/api/cloudinary/upload" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <PUBLIC_KEY>" \
  -F "name=main" \
  -F "images[]=@/path/to/photo-1.jpg" \
  -F "images[]=@/path/to/photo-2.png"

Example: list files

curl -X GET "https://cloudify.meraj.pro/api/cloudinary/files?name=main" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <PUBLIC_KEY>"

Example: delete files

curl -X DELETE "https://cloudify.meraj.pro/api/cloudinary/files" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <PUBLIC_KEY>" \
  -d '{"name":"main","files":[1,2,3]}'

Common Errors

Quick meanings of errors beginners usually hit first.

StatusMeaningWhat to check
401Invalid tokenUse the right token type and include `Bearer` prefix.
422Validation failedMissing required fields like `name`, `images[]`, or bad format.
507No usable Cloudinary storageAdd or fix Cloudinary credentials in account keys.
404Endpoint not foundCheck path starts with `/api/...` and method is correct.