Skip to content

This page shows how to upload, download, list/delete files, and transfer ARK using the API. No sensitive endpoints are shown.

Requests use your existing session cookie. For headless use, create a user token in your account settings and send it as Authorization: Bearer <token>.

API keys

Generate personal access tokens to use KodeForge/Kode CryptX APIs from CI or custom tools.

  1. Open Profile > API Access and click Generate key.
  2. Copy the key immediately. It is shown once and stored hashed on the server.
  3. Use it by sending Authorization: Bearer <token> or X-API-Key: <token>.
curl -sS \
  -H "Authorization: Bearer <api-token>" \
  "{{ base }}/api/projects/{{ owner }}/{{ project }}/files"

Keys inherit your account permissions. Revoke compromised keys from the same profile tab.

Usage

Monitor per-key traffic in the API Access tab. Each request increments the usage counter which is shown beside the key label.

  • Server timeouts return 504; retry with exponential backoff.
  • Rate limiting returns 429 with a Retry-After hint.
  • Upload progress can be tracked via /api/uploads/status?id=….

Coming soon: downloadable per-key CSV usage report.

Billing

API access is currently covered by your workspace plan. Usage does not incur additional charges while in beta.

Future billing data will appear here, including:

  • Monthly API call volume per key.
  • Storage/egress overages.
  • Automated invoices and payment links.

Need enterprise or SLA coverage? Email [email protected].

Basics

Base URL: https://kodecryptx.au

  • Authenticated by session cookie or Bearer token
  • Rate limits apply; handle 429 with backoff
  • All examples are safe (no privileged routes)

Use the controls in the top bar to customize snippets for copy-paste.

List files

Returns a JSON array of files for a project.

curl -sS \
  "{{ base }}/api/projects/{{ owner }}/{{ project }}/files" \
  -H "Accept: application/json"
const res = await fetch(`${base}/api/projects/${owner}/${project}/files`, {
  credentials: "include"
});
const files = await res.json();

Upload files

Multipart upload. Large uploads may return an id you can poll via /api/uploads/status?id=….

curl -sS -X POST \
  "{{ base }}/api/projects/{{ owner }}/{{ project }}/upload" \
  -H "Accept: application/json" \
  -F "file=@./path/to/your-file.bin"
const fd = new FormData();
fd.append("file", fileInput.files[0]);
const up = await fetch(`${base}/api/projects/${owner}/${project}/upload`, {
  method: "POST", body: fd, credentials: "include"
});
const info = await up.json();
// Optional polling (if info.id exists)
if (info.id) {
  let state = "pending";
  while (state === "pending") {
    await new Promise(r => setTimeout(r, 2000));
    const s = await fetch(`${base}/api/uploads/status?id=${info.id}`, { credentials:"include" });
    const j = await s.json(); state = j.state;
  }
}

The server decides if it returns the file entry immediately or a status id for long uploads.

Download a file

Download by path relative to the project’s root.

curl -L \
  "{{ base }}/api/projects/{{ owner }}/{{ project }}/download?path={{ urlenc('README.md') }}" \
  -o README.md
const path = "README.md";
const res = await fetch(`${base}/api/projects/${owner}/${project}/download?path=${encodeURIComponent(path)}`, {
  credentials: "include"
});
if (!res.ok) throw new Error("Download failed");
const blob = await res.blob();
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = path.split("/").pop();
a.click();
URL.revokeObjectURL(a.href);

If your server requires additional query params, adjust accordingly (e.g., version).

Delete a file

Deletes a file by path. This endpoint is access-controlled; ensure you have write permissions.

curl -sS -X DELETE \
  "{{ base }}/api/projects/{{ owner }}/{{ project }}/files?path={{ urlenc('old/notes.txt') }}" \
  -H "Accept: application/json"
const path = "old/notes.txt";
await fetch(`${base}/api/projects/${owner}/${project}/files?path=${encodeURIComponent(path)}`, {
  method: "DELETE", credentials: "include"
});

Transfer ARK

Create a simple ARK transfer. Server validates balance, limits, and logs the transaction.

curl -sS -X POST \
  "{{ base }}/api/ark/transfer" \
  -H "Content-Type: application/json" \
  -d '{"to":"nate","amount":25.00,"memo":"build support"}'
const payload = { to: "nate", amount: 25.00, memo: "build support" };
const res = await fetch(`${base}/api/ark/transfer`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(payload),
  credentials: "include"
});
const out = await res.json();

Tip: query your wallet after transfers to confirm.

curl -sS "{{ base }}/api/ark/balance"

Common status codes

  • 200 OK β€” request succeeded
  • 201 Created β€” resource created (e.g., upload)
  • 401
  • Unauthorized β€” login or token required
  • 403
  • Forbidden β€” you lack permissions for the project
  • 404
  • Not Found β€” path or project doesn’t exist
  • 409
  • Conflict β€” already exists / locked
  • 422
  • Unprocessable β€” missing required param (e.g., path on download)
  • 429
  • Too Many Requests β€” backoff and retry