Docs menuChat and favorites

API reference

Chat and favorites

Post in a coin's chat and keep a list of favorite coins.

Post a message

POST/api/v1/coin/{address}/commentSigned in, CSRF header

Adds a message to a live coin's chat. Plain text, 1 to 1000 characters.

Sign in
Needed (session cookie)
CSRF header
Needed: x-zpad: zpad
Cached
Never
Rate limit
10 a minute per wallet

Path

NameTypeWhat it is
addressstringThe coin's address (its mint).

Body

NameTypeWhat it is
commentstringThe message, 1 to 1000 characters.

Response

200
{
  "success": true,
  "message": "Comment created successfully",
  "data": {
    "id": "<message id>",
    "mint": "<coin address>",
    "message": "<text>",
    "userId": "<your wallet>",
    "createdAt": "<ISO time>"
  }
}

Errors

StatusMessageWhen
400Write a message first.comment is empty.
400A message can be 1000 characters at most.comment is too long.
401Connect your wallet and sign in first.No session cookie, or it expired.
403Refused. Reload the page and try again.The CSRF header is missing, or the request came from another site.
404No such coin here.The coin is not live on Zpad.
429That is a lot of messages. Wait a moment and try again.More than 10 messages a minute.

Example

Terminal
curl -s -X POST -b cookies.txt "/api/v1/coin/<coin address>/comment" \
  -H "x-zpad: zpad" \
  -H "content-type: application/json" \
  -d '{"comment":"<your message>"}'

Add a favorite

POST/api/v1/coin/{address}/favoriteSigned in, CSRF header

Saves the coin to your favorites. Sending it again changes nothing.

Sign in
Needed (session cookie)
CSRF header
Needed: x-zpad: zpad
Cached
Never
Rate limit
None of its own

Path

NameTypeWhat it is
addressstringThe coin's address (its mint).

Response

200
{
  "success": true,
  "message": "Coin added to favorites",
  "data": true
}

Errors

StatusMessageWhen
401Connect your wallet and sign in first.No session cookie, or it expired.
403Refused. Reload the page and try again.The CSRF header is missing, or the request came from another site.
404No such coin here.The coin is not live on Zpad.

Example

Terminal
curl -s -X POST -b cookies.txt "/api/v1/coin/<coin address>/favorite" \
  -H "x-zpad: zpad"

Remove a favorite

POST/api/v1/coin/{address}/unfavoriteSigned in, CSRF header

Removes the coin from your favorites. Sending it again changes nothing.

Sign in
Needed (session cookie)
CSRF header
Needed: x-zpad: zpad
Cached
Never
Rate limit
None of its own

Path

NameTypeWhat it is
addressstringThe coin's address (its mint).

Response

200
{
  "success": true,
  "message": "Coin removed from favorites",
  "data": true
}

Errors

StatusMessageWhen
401Connect your wallet and sign in first.No session cookie, or it expired.
403Refused. Reload the page and try again.The CSRF header is missing, or the request came from another site.
404No such coin here.The coin is not live on Zpad.

Example

Terminal
curl -s -X POST -b cookies.txt "/api/v1/coin/<coin address>/unfavorite" \
  -H "x-zpad: zpad"
Cookies On Our Website. We use cookies to keep you signed in and remember your settings.