UPDATE_PROFILE

The UPDATE_PROFILE handler is used to create or update a user's profile on Pulse Protocol. A user profile includes a username, name, description, profile picture, and cover photo.

Interaction Format

To interact with this handler, use the following format:

Send({
    Target = "Process_ID", -- Replace with the actual process ID
    Action = "UPDATE_PROFILE",
    Tags = {
        username = "your_username",
        name = "Your Full Name",
        profileDescription = "Your profile description (optional)",
        profileExtraData = '{"key": "value"}', -- JSON string (optional)
        profile_picture_url = "https://example.com/profile.jpg", -- Optional
        cover_photo_url = "https://example.com/cover.jpg" -- Optional
    }
})

Input Parameters

Field
Type
Required
Description

username

String

Yes

Username with up to 30 characters. Only letters, numbers, and underscores are allowed.

name

String

Yes

Full name with up to 50 characters.

profileDescription

String

No

Description with up to 200 characters.

profileExtraData

JSON String

No

Additional profile data in JSON format.

profile_picture_url

String (URL)

No

URL of the profile picture (max length: 200 characters).

cover_photo_url

String

No

URL of the cover photo (max length: 200 characters).

Validations

  • username: Must be ≤30 characters and consist of letters, numbers, or underscores.

  • name: Must be ≤50 characters.

  • profileDescription: Must be ≤200 characters.

  • profileExtraData: Must be valid JSON.

  • URLs: Must be ≤200 characters and follow a valid URL format.

Response Format

Success

{
    "status": "success",
    "message": "Profile created successfully" or "Profile updated successfully",
    "data": {
        "address": "user_address",
        "username": "user_username",
        "name": "user_full_name",
        "description": "profile_description",
        "profile_extra_data": {"key": "value"},
        "profile_picture_url": "https://example.com/profile.jpg",
        "cover_photo_url": "https://example.com/cover.jpg"
    }
}

Error

{
    "status": "error",
    "message": "Error message explaining the issue"
}

Last updated