Skip to main content
POST
/
api
/
v1
/
users
/
me
/
channel-memberships
curl --request POST \
  --url https://mcp.echozero.app/api/v1/users/me/channel-memberships \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "platform": "telegram",
  "channelId": "-1003750684798"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "userId": "<string>",
    "channelId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "channelName": "<string>",
    "telegramUserId": 123,
    "telegramUsername": "<string>",
    "discordUserId": "<string>",
    "discordUsername": "<string>",
    "verifiedAt": "2023-11-07T05:31:56Z",
    "lastCheckedAt": "2023-11-07T05:31:56Z",
    "gracePeriodExpiresAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

User JWT access token issued by POST /api/auth/verify or POST /api/auth/social/verify. Routes that accept both auth modes declare api-key and bearer-jwt security schemes.

Headers

x-signature
string

HMAC-SHA256 signature: HMAC-SHA256(secretKey, timestamp + METHOD + path + body). Optional -- when omitted, HMAC verification is skipped.

x-timestamp
string

Request timestamp in epoch milliseconds. Required when x-signature is provided. Rejected if drift exceeds 5 minutes.

Body

application/json
platform
enum<string>
required
Available options:
telegram,
discord
channelId
string
required

Telegram supergroup / channel id string (e.g. -100…).

Example:

"-1003750684798"

channelName
string
telegramUserId
number

Your Telegram user id (numeric). In production, prefer verifying via Telegram Login Widget; this field is required for getChatMember checks.

telegramUsername
string
discordUserId
string

Your Discord user id (snowflake string). Required for Discord membership checks.

discordUsername
string

Response

Membership saved.

success
boolean
required
Example:

true

data
object
required

Endpoint-specific payload