⚙️
API Docs
  • ⚙️WalletChat API Reference
  • Reference
    • API Reference
      • Authentication
      • Direct Messages (DMs)
      • NFT Chats
      • Group Chats (Non-NFT Related)
      • Common API Endpoints
      • Inbox
      • Unused / Legacy
Powered by GitBook
On this page
  1. Reference

API Reference

Interactive API docs located at: https://api.v2.walletchat.fun/docs/index.html

PreviousWalletChat API ReferenceNextAuthentication

Last updated 2 years ago

Full API reference is included here, subsections are broken out in the navigate pane. Current API version is:

https://api.v2.walletchat.fun

Get Community Chat Landing Page Info

get

TODO: need a creation API for communities, which includes specificied welcome message text, Twitter handle, page title

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
200
OK
application/json
get
GET /v1/community/{community}/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "has_messaged": true,
    "is_verified": true,
    "joined": true,
    "logo": "text",
    "members": 1,
    "messages": [
      {
        "context_type": "text",
        "fromaddr": "text",
        "id": 1,
        "message": "text",
        "nftaddr": "text",
        "sender_name": "text",
        "timestamp": "text",
        "timestamp_dtm": "text",
        "type": "text"
      }
    ],
    "name": "text",
    "social": [
      {
        "type": "text",
        "username": "text"
      }
    ],
    "tweets": [
      {
        "attachments": {
          "media_keys": [
            "text"
          ]
        },
        "author_id": "text",
        "created_at": "text",
        "id": "text",
        "media": {
          "media_keys": [
            "text"
          ]
        },
        "text": "text",
        "user": {
          "id": "text",
          "name": "text",
          "profile_image_url": "text",
          "username": "text"
        }
      }
    ]
  }
]

Delete Single Chat Item (DM)

delete

Can only delete messages sent, cannot delete incoming messages

Authorizations
Path parameters
idstringRequired

message ID

Responses
204
No Content
delete
DELETE /v1/delete_chatitem/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

No Content

No content

Delete Public Comments for given FROM wallet address, NFT Contract and ID

delete

NFTs have a public comment section

Authorizations
Path parameters
addressstringRequired

FROM Wallet Address

nftaddrstringRequired

NFT Contract Address

nftidstringRequired

NFT ID

Responses
204
No Content
delete
DELETE /v1/delete_comments/{fromaddr}/{nftaddr}/{nftid} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

No Content

No content

Delete Settings Info

delete

TODO: not yet used

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
204
No Content
delete
DELETE /v1/delete_settings/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

No Content

No content

Delete All Chat Items (DMs) between FROM and TO given addresses

delete

Currently deletes all chat items between these two addresses

Authorizations
Path parameters
toaddrstringRequired

TO: Address

fromaddrstringRequired

FROM: Address

Responses
204
No Content
delete
DELETE /v1/deleteall_chatitems/{fromaddr}/{toaddr} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

No Content

No content

Check if a wallet address has bookmarked/joined given NFT contract

get

This used for UI purposes, checking if a user/wallet has bookmarked a community.

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
200
OK
application/json
get
GET /v1/get_bookmarks/{address}/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "chain": "text",
    "id": 1,
    "nftaddr": "text",
    "walletaddr": "text"
  }
]

Check if a wallet address has bookmarked/joined given NFT contract

get

This used for UI purposes, checking if a user/wallet has bookmarked a community.

Authorizations
Path parameters
walletaddrstringRequired

Wallet Address

nftaddrstringRequired

NFT Contract Address

Responses
200
OK
application/json
Responsebool
get
GET /v1/get_bookmarks/{walletaddr}/{nftaddr} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

No content

Get Public Comments for given NFT Contract and ID

get

NFTs have a public comment section

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
200
OK
application/json
get
GET /v1/get_comments/{nftaddr}/{nftid} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "fromaddr": "text",
    "id": 1,
    "message": "text",
    "name": "text",
    "nftaddr": "text",
    "nftid": 1,
    "timestamp": "text"
  }
]

Get Public Comments Count for given NFT Contract and ID

get

NFTs have a public comment section

Authorizations
Path parameters
nftaddrstringRequired

NFT Contract Address

nftidstringRequired

NFT ID

Responses
200
OK
application/json
Responseinteger
get
GET /v1/get_comments_cnt/{nftaddr}/{nftid} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

1

Get group chat items, given a wallt FROM address and NFT Contract Address

get

Get all group chat items for a given wallet (useraddress) for a given NFT Contract Address (TODO: fix up var names)

Authorizations
Path parameters
addressstringRequired

NFT Address

useraddressstringRequired

FROM: wallet address

Responses
200
OK
application/json
get
GET /v1/get_groupchatitems/{address}/{useraddress} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "context_type": "text",
    "fromaddr": "text",
    "id": 1,
    "message": "text",
    "nftaddr": "text",
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "type": "text"
  }
]

Get Unread Groupchat Items (TODO: cleanup naming convention here)

get

For group chat unread counts, currently the database stores a timestamp for each time a user enters a group chat. We though in the design it would be impractical to keep a read/unread count copy per user per message, but if this method doesn't proof to be fine grained enough, we could add a boolean relational table of read messgages per user.

Path parameters
namestringRequired

Common Name Mapped to User/Community

Responses
200
OK
text/plain
Responseinteger
get
GET /v1/get_groupchatitems_unreadcnt/{address}/{useraddress} HTTP/1.1
Host: 
Accept: */*
200

OK

1

Get Inbox Summary With Last Message

get

Get Each 1-on-1 Conversation, NFT and Community Chat For Display in Inbox

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
200
OK
application/json
get
GET /v1/get_inbox/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "chain": "text",
    "context_type": "text",
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "logo": "text",
    "message": "text",
    "name": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text",
    "type": "text",
    "unread": 1
  }
]

Get Settings Info

get

TODO: not yet used

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
200
OK
application/json
get
GET /v1/get_settings/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "domain": "text",
    "email": "text",
    "id": 1,
    "notify24": "text",
    "notifydm": "text",
    "signupsite": "text",
    "verified": "text",
    "walletaddr": "text"
  }
]

Get all unread messages TO a specific user, used for total count notification at top notification bar

get

Get Each 1-on-1 Conversation, NFT and Community Chat For Display in Inbox

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
200
OK
application/json
Responseinteger
get
GET /v1/get_unread_cnt/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

1

Get all unread messages for a specific NFT context

get

Get Unread count for specifc NFT context given a wallet address and specific NFT

Authorizations
Path parameters
addressstringRequired

Wallet Address

nftaddrstringRequired

NFT Contract Address

nftidstringRequired

NFT ID

Responses
200
OK
application/json
Responseinteger
get
GET /v1/get_unread_cnt/{address}/{nftaddr}/{nftid} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

1

Get all unread messages between two addresses

get

Get Unread count for DMs

Authorizations
Path parameters
toaddrstringRequired

TO: Wallet Address

fromstringRequired

FROM: Wallet Address

Responses
200
OK
application/json
Responseinteger
get
GET /v1/get_unread_cnt/{fromaddr}/{toaddr} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

1

Get all unread messages TO a specific user, used for total count notification at top notification bar

get

Get Each 1-on-1 Conversation, NFT and Community Chat For Display in Inbox

Authorizations
Path parameters
addressstringRequired

Wallet Address

typestringRequired

Message Type - nft|community|dm|all

Responses
200
OK
application/json
Responseinteger
get
GET /v1/get_unread_cnt_by_type/{address}/{type} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

1

Get all unread messages for all NFT related chats for given user

get

Get Unread count for all NFT contexts given a wallet address

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
200
OK
application/json
Responseinteger
get
GET /v1/get_unread_cnt_nft/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

1

Get Chat Item For Given Wallet Address

get

Get all Chat Items for DMs for a given wallet address

Authorizations
Path parameters
toaddrstringRequired

Wallet Address

Responses
200
OK
application/json
get
GET /v1/getall_chatitems/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Get Chat Data Between Two Addresses

get

Get chat data between the given two addresses, TO and FROM and interchangable here

Authorizations
Path parameters
toaddrstringRequired

TO: Wallet Address

fromstringRequired

FROM: Wallet Address

Responses
200
OK
application/json
get
GET /v1/getall_chatitems/{fromaddr}/{toaddr} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Get Chat Data Between Two Addresses

get

Get chat data between the given two addresses, TO and FROM and interchangable here

Authorizations
Path parameters
toaddrstringRequired

TO: Wallet Address

fromstringRequired

FROM: Wallet Address

timestringRequired

Load only messages after this time

Responses
200
OK
application/json
get
GET /v1/getall_chatitems/{fromaddr}/{toaddr}/${time} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Get NFT Related Chat Items For Given Wallet Address

get

Get ALL NFT context items for a given wallet address

Authorizations
Path parameters
toaddrstringRequired

Wallet Address

Responses
200
OK
application/json
get
GET /v1/getnft_chatitems/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Get NFT Related Chat Items For Given NFT Contract and ID, relating to one wallet

get

Get all specified NFT contract and ID items for a given wallet address

Authorizations
Path parameters
addressstringRequired

Wallet Address

nftaddrstringRequired

NFT Contract Address

nftidstringRequired

NFT ID

Responses
200
OK
application/json
get
GET /v1/getnft_chatitems/{address}/{nftaddr}/{nftid} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Get NFT Related Chat Items For Given NFT Contract and ID, between two wallet addresses (TO and FROM are interchangable)

get

Get ALL NFT context items for a specifc NFT context convo between two wallets

Authorizations
Path parameters
nftaddrstringRequired

NFT Contract Address

nftidstringRequired

NFT ID

toaddrstringRequired

TO: Wallet Address

fromstringRequired

FROM: Wallet Address

Responses
200
OK
application/json
get
GET /v1/getnft_chatitems/{fromaddr}/{toaddr}/{nftaddr}/{nftid} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Get NFT Related Chat Items For Given NFT Contract and ID

get

Get ALL NFT context items for a given wallet address

Authorizations
Path parameters
nftaddrstringRequired

NFT Contract Address

nftidstringRequired

NFT ID

Responses
200
OK
application/json
get
GET /v1/getnft_chatitems/{nftaddr}/{nftid} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Get Recently Read Messages

get

Get newly read messages to update READ status for lazy loading

Authorizations
Path parameters
toaddrstringRequired

TO: Wallet Address

fromstringRequired

FROM: Wallet Address

Responses
200
OK
application/json
get
GET /v1/getread_chatitems/{fromaddr}/{toaddr} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Get Thumbnail Image Data

get

Retreive image data for use with user/community/nft group dislayed icon

Authorizations
Path parameters
namestringRequired

Wallet/NFT Address Mapped to User/Community

Responses
200
OK
application/json
get
GET /v1/image/{addr} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "addr": "text",
    "base64data": "text",
    "id": 1
  }
]

Check if given wallet address owns an NFT from given contract address

get

API user could check this directly via any third party service like NFTPort, Moralis as well

Authorizations
Path parameters
contractstringRequired

NFT Contract Address

walletstringRequired

Wallet Address

Responses
200
OK
application/json
get
GET /v1/is_owner/{contract}/{wallet} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "has_messaged": true,
    "is_verified": true,
    "joined": true,
    "logo": "text",
    "members": 1,
    "messages": [
      {
        "context_type": "text",
        "fromaddr": "text",
        "id": 1,
        "message": "text",
        "nftaddr": "text",
        "sender_name": "text",
        "timestamp": "text",
        "timestamp_dtm": "text",
        "type": "text"
      }
    ],
    "name": "text",
    "social": [
      {
        "type": "text",
        "username": "text"
      }
    ],
    "tweets": [
      {
        "attachments": {
          "media_keys": [
            "text"
          ]
        },
        "author_id": "text",
        "created_at": "text",
        "id": "text",
        "media": {
          "media_keys": [
            "text"
          ]
        },
        "text": "text",
        "user": {
          "id": "text",
          "name": "text",
          "profile_image_url": "text",
          "username": "text"
        }
      }
    ]
  }
]

get the common name which has been mapped to an address

get

get the given a common name (Kevin.eth, BillyTheKid, etc) what has already been mapped to an Address

Authorizations
Path parameters
addressstringRequired

Get Name for given address

Responses
200
OK
application/json
get
GET /v1/name/{name} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "address": "text",
    "id": 1,
    "name": "text"
  }
]

Get all unread messages TO a specific user, used for total count notification at top notification bar

get

Get Unread count just given an address

Authorizations
Path parameters
addressstringRequired

Wallet Address

Responses
200
OK
application/json
Responseinteger
get
GET /v1/unreadcount/{address} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

1
  • POSTSign In with signed nonce value, currently JWT token returned should be valid for 24 hours
  • GETIf the current wallet doesn't have a valid local JWT, need to request a new nonce to sign
  • POSTCreateCommunityChatitem creates GroupChatitem just with community tag (likely could be consolidated)
  • GETGet Community Chat Landing Page Info
  • POSTJoin an NFT or Community group chat
  • POSTCreate/Insert DM Chat Message (1-to-1 messaging)
  • POSTComments are used within an NFT community chat
  • POSTCreateCommunity creates new custom community chat
  • POSTCreate/Insert chat message for Community/NFT/Group Messaging
  • POSTLeave an NFT or Community group chat
  • DELETEDelete Single Chat Item (DM)
  • DELETEDelete Public Comments for given FROM wallet address, NFT Contract and ID
  • DELETEDelete Settings Info
  • DELETEDelete All Chat Items (DMs) between FROM and TO given addresses
  • GETCheck if a wallet address has bookmarked/joined given NFT contract
  • GETCheck if a wallet address has bookmarked/joined given NFT contract
  • GETGet Public Comments for given NFT Contract and ID
  • GETGet Public Comments Count for given NFT Contract and ID
  • GETGet group chat items, given a wallt FROM address and NFT Contract Address
  • GETGet Unread Groupchat Items (TODO: cleanup naming convention here)
  • GETGet Inbox Summary With Last Message
  • GETGet Settings Info
  • GETGet all unread messages TO a specific user, used for total count notification at top notification bar
  • GETGet all unread messages for a specific NFT context
  • GETGet all unread messages between two addresses
  • GETGet all unread messages TO a specific user, used for total count notification at top notification bar
  • GETGet all unread messages for all NFT related chats for given user
  • GETGet Chat Item For Given Wallet Address
  • GETGet Chat Data Between Two Addresses
  • GETGet Chat Data Between Two Addresses
  • GETGet NFT Related Chat Items For Given Wallet Address
  • GETGet NFT Related Chat Items For Given NFT Contract and ID, relating to one wallet
  • GETGet NFT Related Chat Items For Given NFT Contract and ID, between two wallet addresses (TO and FROM are interchangable)
  • GETGet NFT Related Chat Items For Given NFT Contract and ID
  • GETGet Recently Read Messages
  • POSTStore Image in DB for later user
  • PUTStore Image in DB for later user (update existing photo)
  • GETGet Thumbnail Image Data
  • POSTStore Image in Bucket Storage
  • GETCheck if given wallet address owns an NFT from given contract address
  • POSTgive a common name to a user address, or NFT collection
  • GETget the common name which has been mapped to an address
  • GETGet all unread messages TO a specific user, used for total count notification at top notification bar
  • PUTUpdate Message Read Status of a given DM chat message
  • POSTSettings hold a user address and the email address for notifications if they opt-in
  • GETLink a user can click in email to verify email address, will have unique code

If the current wallet doesn't have a valid local JWT, need to request a new nonce to sign

get

As part of the login process, we need a user to sign a nonce genrated from the API, to prove the user in fact the owner of the wallet they are siging in from. JWT currently set to 24 hour validity (could change this upon request)

Path parameters
addressstringRequired

wallet address to get nonce to sign

Responses
200
OK
application/json
Responseany
get
GET /users/{address}/nonce HTTP/1.1
Host: 
Accept: */*
200

OK

No content

Sign In with signed nonce value, currently JWT token returned should be valid for 24 hours

post

Every call the to API after this signin should present the JWT Bearer token for authenticated access. Upon request we can change the timeout to greater than 24 hours, or setup an addtional dedicated API for an agreed upon development and maintenance cost

Body
addressstringOptional
msgstringOptional
namestringOptional
noncestringOptional
sigstringOptional
Responses
200
OK
application/json
Responseinteger
post
POST /signin HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "address": "text",
  "msg": "text",
  "name": "text",
  "nonce": "text",
  "sig": "text"
}
200

OK

1

CreateCommunityChatitem creates GroupChatitem just with community tag (likely could be consolidated)

post

Community Chat Data

Authorizations
Body
context_typestringOptional
fromaddrstringOptional
idintegerOptional
messagestringOptional
nftaddrstringOptional
sender_namestringOptional
timestampstringOptional
timestamp_dtmstringOptional
typestringOptional
Responses
200
OK
application/json
post
POST /v1/community HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 159

{
  "context_type": "text",
  "fromaddr": "text",
  "id": 1,
  "message": "text",
  "nftaddr": "text",
  "sender_name": "text",
  "timestamp": "text",
  "timestamp_dtm": "text",
  "type": "text"
}
200

OK

[
  {
    "context_type": "text",
    "fromaddr": "text",
    "id": 1,
    "message": "text",
    "nftaddr": "text",
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "type": "text"
  }
]

Join an NFT or Community group chat

post

Bookmarks keep an NFT/Community group chat in the sidebar

Authorizations
Body
chainstringOptional
idintegerOptional
nftaddrstringOptional
walletaddrstringOptional
Responses
200
OK
application/json
post
POST /v1/create_bookmark HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "chain": "text",
  "id": 1,
  "nftaddr": "text",
  "walletaddr": "text"
}
200

OK

[
  {
    "chain": "text",
    "id": 1,
    "nftaddr": "text",
    "walletaddr": "text"
  }
]

Create/Insert DM Chat Message (1-to-1 messaging)

post

For DMs, Chatitem data struct is used to store each message and associated info. REQUIRED: fromaddr, toaddr, message (see data struct section at bottom of page for more detailed info on each paramter) Other fields are generally filled in by the backed REST API and used as return parameters ID is auto generated and should never be used as input.

Authorizations
Body
encrypted_sym_lit_keystringOptional

USE IF USING LIT ENCRYPTION

fromaddrstringRequired

*** REQUIRED INPUT ***

idintegerOptional

AUTO-GENERATED (PRIMARY KEY)

lit_access_conditionsstringOptional
messagestringRequired

*** REQUIRED INPUT ***

nftaddrstringOptional

ONLY USED FOR NFT DM CONTEXT

nftidstringOptional

ONLY USED FOR NFT DM CONTEXT

readbooleanOptional

DEFAULT FALSE

sender_namestringOptional

AUTO-SET BY BACKED FOR RETURN VALUE

timestampstringOptional

AUTO-SET BY REST API

timestamp_dtmstringOptional

USED FOR SORTING WHEN TIME FORMAT NEEDED

toaddrstringRequired

*** REQUIRED INPUT ***

Responses
200
OK
application/json
post
POST /v1/create_chatitem HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 228

{
  "encrypted_sym_lit_key": "text",
  "fromaddr": "text",
  "id": 1,
  "lit_access_conditions": "text",
  "message": "text",
  "nftaddr": "text",
  "nftid": "text",
  "read": true,
  "sender_name": "text",
  "timestamp": "text",
  "timestamp_dtm": "text",
  "toaddr": "text"
}
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Comments are used within an NFT community chat

post

Comments are meant to be public, someday having an up/downvote method for auto-moderation

Authorizations
Body
fromaddrstringOptional
idintegerOptional
messagestringOptional
namestringOptional
nftaddrstringOptional
nftidintegerOptional
timestampstringOptional
Responses
200
OK
application/json
post
POST /v1/create_comments HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 103

{
  "fromaddr": "text",
  "id": 1,
  "message": "text",
  "name": "text",
  "nftaddr": "text",
  "nftid": 1,
  "timestamp": "text"
}
200

OK

[
  {
    "fromaddr": "text",
    "id": 1,
    "message": "text",
    "name": "text",
    "nftaddr": "text",
    "nftid": 1,
    "timestamp": "text"
  }
]

CreateCommunity creates new custom community chat

post

Community Chat Creation

Authorizations
Body
communitystringOptional
Responses
200
OK
application/json
post
POST /v1/create_community HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 61

{
  "community": "text",
  "social": [
    {
      "name": "text",
      "type": "text"
    }
  ]
}
200

OK

[
  {
    "community": "text",
    "social": [
      {
        "name": "text",
        "type": "text"
      }
    ]
  }
]

Create/Insert chat message for Community/NFT/Group Messaging

post

Currently used for all messages outside of DMs

Authorizations
Body
context_typestringOptional
fromaddrstringOptional
idintegerOptional
messagestringOptional
nftaddrstringOptional
sender_namestringOptional
timestampstringOptional
timestamp_dtmstringOptional
typestringOptional
Responses
200
OK
application/json
post
POST /v1/create_groupchatitem HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 159

{
  "context_type": "text",
  "fromaddr": "text",
  "id": 1,
  "message": "text",
  "nftaddr": "text",
  "sender_name": "text",
  "timestamp": "text",
  "timestamp_dtm": "text",
  "type": "text"
}
200

OK

[
  {
    "context_type": "text",
    "fromaddr": "text",
    "id": 1,
    "message": "text",
    "nftaddr": "text",
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "type": "text"
  }
]

Leave an NFT or Community group chat

post

Bookmarks keep an NFT/Community group chat in the sidebar

Authorizations
Body
chainstringOptional
idintegerOptional
nftaddrstringOptional
walletaddrstringOptional
Responses
200
OK
application/json
post
POST /v1/delete_bookmark HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "chain": "text",
  "id": 1,
  "nftaddr": "text",
  "walletaddr": "text"
}
200

OK

[
  {
    "chain": "text",
    "id": 1,
    "nftaddr": "text",
    "walletaddr": "text"
  }
]

Store Image in DB for later user

post

Currently used for the WC HQ Logo, stores the base64 raw data of the profile image for a community

Authorizations
Body
addrstringOptional
base64datastringOptional
idintegerOptional
Responses
200
OK
application/json
post
POST /v1/image HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "addr": "text",
  "base64data": "text",
  "id": 1
}
200

OK

[
  {
    "addr": "text",
    "base64data": "text",
    "id": 1
  }
]

Store Image in DB for later user (update existing photo)

put

Currently used for the WC HQ Logo, stores the base64 raw data of the profile image for a community

Authorizations
Body
addrstringOptional
base64datastringOptional
idintegerOptional
Responses
200
OK
application/json
put
PUT /v1/image HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "addr": "text",
  "base64data": "text",
  "id": 1
}
200

OK

[
  {
    "chain": "text",
    "id": 1,
    "nftaddr": "text",
    "walletaddr": "text"
  }
]

Store Image in Bucket Storage

post

public facing PFP storage to make it faster for UI to get and load images

Authorizations
Body
addrstringOptional
base64datastringOptional
idintegerOptional
Responses
200
OK
application/json
post
POST /v1/imagepfp HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "addr": "text",
  "base64data": "text",
  "id": 1
}
200

OK

[
  {
    "addr": "text",
    "base64data": "text",
    "id": 1
  }
]

give a common name to a user address, or NFT collection

post

Give a common name (Kevin.eth, BillyTheKid, etc) to an Address

Authorizations
Body
addressstringOptional

ADDRESS

domainstringOptional

DOMAIN

idintegerOptional
namestringOptional

NAME

signupsitestringOptional

SITE USER SIGNED UP FROM

Responses
200
OK
application/json
Responseinteger
post
POST /v1/name HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "address": "text",
  "domain": "text",
  "id": 1,
  "name": "text",
  "signupsite": "text"
}
200

OK

1

Update Message Read Status of a given DM chat message

put

Currently this only update the message read/unread status. It could update the entire JSON struct upon request, however we only needed this functionality currently and it saved re-encryption of the data. TODO: TO/FROM address in the URL is not needed/not used anymore.

Authorizations
Body
encrypted_sym_lit_keystringOptional

USE IF USING LIT ENCRYPTION

fromaddrstringRequired

*** REQUIRED INPUT ***

idintegerOptional

AUTO-GENERATED (PRIMARY KEY)

lit_access_conditionsstringOptional
messagestringRequired

*** REQUIRED INPUT ***

nftaddrstringOptional

ONLY USED FOR NFT DM CONTEXT

nftidstringOptional

ONLY USED FOR NFT DM CONTEXT

readbooleanOptional

DEFAULT FALSE

sender_namestringOptional

AUTO-SET BY BACKED FOR RETURN VALUE

timestampstringOptional

AUTO-SET BY REST API

timestamp_dtmstringOptional

USED FOR SORTING WHEN TIME FORMAT NEEDED

toaddrstringRequired

*** REQUIRED INPUT ***

Responses
200
OK
application/json
put
PUT /v1/update_chatitem/{fromaddr}/{toaddr} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 228

{
  "encrypted_sym_lit_key": "text",
  "fromaddr": "text",
  "id": 1,
  "lit_access_conditions": "text",
  "message": "text",
  "nftaddr": "text",
  "nftid": "text",
  "read": true,
  "sender_name": "text",
  "timestamp": "text",
  "timestamp_dtm": "text",
  "toaddr": "text"
}
200

OK

[
  {
    "encrypted_sym_lit_key": "text",
    "fromaddr": "text",
    "id": 1,
    "lit_access_conditions": "text",
    "message": "text",
    "nftaddr": "text",
    "nftid": "text",
    "read": true,
    "sender_name": "text",
    "timestamp": "text",
    "timestamp_dtm": "text",
    "toaddr": "text"
  }
]

Settings hold a user address and the email address for notifications if they opt-in

post

Update settings, email address, daily notifications and per DM notifications

Authorizations
Body
domainstringOptional

DOMAIN

emailstringOptional

Publickey string json:"publickey"

idintegerOptional

AUTO-GENERATED (PRIMARY KEY)

notify24stringOptional

RECEIVE NOTIFICATION FOR EVERY DM RECEIVED (string value true/false)

notifydmstringOptional

RECEIVE DAILY NOTIFICATION SUMMARY EMAIL (string value true/false)

signupsitestringOptional

LATEST SITE WHERE NOTIFICATIONS EMAIL WAS ENTERED

verifiedstringOptional

USER CONFIRMED EMAIL OR NOT (string value true/false)

walletaddrstringRequired

*** REQUIRED INPUT ***

Responses
200
OK
application/json
post
POST /v1/update_settings HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 133

{
  "domain": "text",
  "email": "text",
  "id": 1,
  "notify24": "text",
  "notifydm": "text",
  "signupsite": "text",
  "verified": "text",
  "walletaddr": "text"
}
200

OK

[
  {
    "domain": "text",
    "email": "text",
    "id": 1,
    "notify24": "text",
    "notifydm": "text",
    "signupsite": "text",
    "verified": "text",
    "walletaddr": "text"
  }
]

Link a user can click in email to verify email address, will have unique code

get

Users will get an email when signing-up to verify email, to ensure we do not send spam

Authorizations
Body
domainstringOptional

DOMAIN

emailstringOptional

Publickey string json:"publickey"

idintegerOptional

AUTO-GENERATED (PRIMARY KEY)

notify24stringOptional

RECEIVE NOTIFICATION FOR EVERY DM RECEIVED (string value true/false)

notifydmstringOptional

RECEIVE DAILY NOTIFICATION SUMMARY EMAIL (string value true/false)

signupsitestringOptional

LATEST SITE WHERE NOTIFICATIONS EMAIL WAS ENTERED

verifiedstringOptional

USER CONFIRMED EMAIL OR NOT (string value true/false)

walletaddrstringRequired

*** REQUIRED INPUT ***

Responses
200
OK
application/json
get
GET /v1/verify_email/{email}/{verification_code} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 133

{
  "domain": "text",
  "email": "text",
  "id": 1,
  "notify24": "text",
  "notifydm": "text",
  "signupsite": "text",
  "verified": "text",
  "walletaddr": "text"
}
200

OK

[
  {
    "domain": "text",
    "email": "text",
    "id": 1,
    "notify24": "text",
    "notifydm": "text",
    "signupsite": "text",
    "verified": "text",
    "walletaddr": "text"
  }
]