Index Network Documentation
  • Overview
    • What is Index Network
    • Architecture
  • Getting Started
    • Quick start
    • Data Models
  • API Reference
    • Identity
      • Authentication
      • Profile
    • Semantic Index
      • Index
        • Creator Roles
        • Privacy
      • IndexItem
      • Embedding
    • Discovery Protocol
      • Completions
      • Private Conversations
      • Semantic Listener
      • Vector Search
  • Resources
    • Libraries
      • Node.js SDK
      • Python SDK
      • React SDK
      • Langchain
  • More
    • Contact
Powered by GitBook
On this page
Edit on GitHub
  1. API Reference
  2. Identity

Profile

Last updated 1 year ago

In our platform, we utilize DID Identities by allowing you to connect with your wallet. This way, you can initiate a DID Sessions and perform your operations with it.

The Profile model represents user profiles within the Index Network, containing personal information such as a controller DID, name, bio, and an optional avatar.

After signing with your session, it is possible to create a profile for that DID. Profile data is created using a .

Decentralized Identifier (DID) identities in technology refer to a new type of identifier that enables a verifiable, self-sovereign identity. Unlike traditional identifiers such as email addresses or usernames that are typically controlled by external organizations (like email providers or social media platforms), DIDs are fully controlled by the individual or entity to which they refer.

Here is an example of how you can create and update your profile using our SDK.

// Provide your avatar image file
const avatarCID = indexClient.uploadAvatar(yourFile);

// Update it by using your information
await indexClient.updateProfile({
    name: "John Doe",
    bio: "Building amazing things",
    avatar: avatarCID
})

API Endpoint Reference

The corresponding API endpoint for profile is described below:

Profile Model
  • API Endpoint Reference
  • POSTUpload avatar image
  • PATCHUpdate profile information

Upload avatar image

post
Body
filestring ยท binaryOptional

Image file for avatar

Responses
200
Avatar uploaded successfully
400
Invalid request
post
POST /api/profile/upload_avatar HTTP/1.1
Host: dev.index.network
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}

No content

Update profile information

patch
Body
namestringRequired

Name of the user

biostringRequired

Biography of the user

avatarstringRequired

CID of the avatar image

Responses
200
Profile updated successfully
400
Invalid request
patch
PATCH /api/profile HTTP/1.1
Host: dev.index.network
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "name": "text",
  "bio": "text",
  "avatar": "text"
}

No content