curl --request POST \
--url https://mcp.echozero.app/api/v1/users/me/channel-memberships \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>' \
--data '
{
"platform": "telegram",
"channelId": "-1003750684798"
}
'{
"success": true,
"data": {
"id": "<string>",
"userId": "<string>",
"platform": "telegram",
"channelId": "<string>",
"status": "active",
"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"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}Link Telegram or Discord channel membership
Upserts a row keyed by (user, platform, channelId). Telegram requires telegramUserId; Discord requires discordUserId (snowflake).
curl --request POST \
--url https://mcp.echozero.app/api/v1/users/me/channel-memberships \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>' \
--data '
{
"platform": "telegram",
"channelId": "-1003750684798"
}
'{
"success": true,
"data": {
"id": "<string>",
"userId": "<string>",
"platform": "telegram",
"channelId": "<string>",
"status": "active",
"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"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}Authorizations
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
Required for API-key authenticated requests. HMAC-SHA256(secretKey, timestamp + METHOD + path + body) as lowercase hex. Omit only for JWT/OAuth session tokens or public routes.
Required with x-signature. Epoch milliseconds; rejected if drift exceeds 5 minutes. Omit only for JWT/OAuth session tokens or public routes.
Body
telegram, discord Telegram supergroup / channel id string (e.g. -100…).
"-1003750684798"
Your Telegram user id (numeric). In production, prefer verifying via Telegram Login Widget; this field is required for getChatMember checks.
Your Discord user id (snowflake string). Required for Discord membership checks.