📚 Docs

💡 Code Examples

Practical examples for calling APIs, integrating SDKs, and automating your workflows using AppVerse.

🧩 Example 1 — Create a New User

Use the /v1/users endpoint to create a new user in your app.

fetch("https://api.appverse.tech/v1/users", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ name: "Alice" })
})
  .then(res => res.json())
  .then(console.log)
  .catch(console.error);

⚡ Make sure to replace YOUR_API_KEY with a valid token from your AppVerse dashboard.

👤 Example 2 — Fetch User Details

Retrieve user information securely from the API using their unique ID.

const userId = "usr_123";

fetch(`https://api.appverse.tech/v1/users/${userId}`, {
  headers: { "Authorization": "Bearer YOUR_API_KEY" }
})
  .then(res => res.json())
  .then(data => console.log("User:", data));

🧠 Tip: Always validate API responses before displaying user data in your UI.

🐍 Example 3 — Using the Python SDK

The official AppVerse Python SDK lets you interact with AI and App APIs easily.

from appverse import Client

client = Client(api_key="YOUR_API_KEY")

user = client.users.create(name="Alice")
print("✅ Created user:", user.id)

📦 Install it first with: pip install appverse-sdk

💡 Explore more advanced API use cases in API Reference or browse Developer Guides for step-by-step tutorials.
AppVerse – Build Privacy-First AI Apps