⚙️
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
  2. API Reference

Group Chats (Non-NFT Related)

Group chat related API endpoints:

PreviousNFT ChatsNextCommon API Endpoints

Last updated 2 years ago

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 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
  • POSTCreateCommunityChatitem creates GroupChatitem just with community tag (likely could be consolidated)
  • GETGet Community Chat Landing Page Info
  • POSTJoin an NFT or Community group chat
  • POSTCreateCommunity creates new custom community chat
  • POSTCreate/Insert chat message for Community/NFT/Group Messaging
  • POSTLeave an NFT or Community group chat
  • GETCheck if a wallet address has bookmarked/joined given NFT contract
  • GETCheck if a wallet address has bookmarked/joined given NFT contract
  • GETGet group chat items, given a wallt FROM address and NFT Contract Address
  • GETGet Unread Groupchat Items (TODO: cleanup naming convention here)

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"
        }
      }
    ]
  }
]

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"
  }
]

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"
  }
]