docs.catquery.com
← DocsBase URL: https://api.catquery.com
DELETE /connections/trakt
Authorization: Bearer <your-api-token>
{
"success": true
}
DELETE /connections/trakt
Authorization: Bearer <your-api-token>
{
"error": "No Trakt connection found."
}
GET /connections/trakt
Authorization: Bearer <your-api-token>
{
"connection": {
"platformUsername": "my-trakt-username",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z"
}
}
GET /connections/trakt
Authorization: Bearer <your-api-token>
{
"connection": null
}
POST /connections/trakt
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"platformUsername": "my-trakt-username"
}
{
"connection": {
"platformUsername": "my-trakt-username",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z"
}
}
PUT /connections/trakt
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"platformUsername": "my-new-trakt-username"
}
{
"connection": {
"platformUsername": "my-new-trakt-username",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-06-01T00:00:00.000Z"
}
}
PUT /connections/trakt
Authorization: Bearer <your-api-token>
{
"error": "No Trakt connection found. Use POST to create one."
}
GET /eventBadges
{
"badges": [
{
"id": "ditto",
"name": "Ditto",
"streamdatabaseUrl": "https://www.streamdatabase.com/twitch/global-badges/ditto/1",
"imageUrl": "https://static-cdn.jtvnw.net/badges/v1/abc123/3",
"startAt": "2026-01-01T00:00:00.000Z",
"endAt": "2026-12-31T23:59:59.000Z",
"free": true
}
]
}
GET /health
{
"status": "ok",
"services": {
"api": "up",
"chat": "up",
"firehose": "up",
"streams": "up",
"redirects": "up",
"proxy": "up"
},
"dependencies": {
"database": "up",
"nats": "up"
},
"uptime": "2h 34m",
"memory": "156 MB",
"cpu": "2.5%",
"channelsJoined": 42,
"firehoseClients": 3,
"activeStreams": 2,
"proxiedRequests": 1042,
"msgsPerMin": 1234,
"sessionMessages": 50000,
"commandsExecuted": 312,
"bansIssued": 7,
"totalUsers": 280000,
"permanentChannels": 280000,
"temporaryChannels": 0,
"monitoredUsers": 12,
"liveChannels": 12,
"shards": [
{
"index": 0,
"joinedChannels": 2800,
"wantedChannels": 2800,
"desync": 0,
"messageCount": 18500,
"reconnectCount": 0,
"failedJoinCount": 0
}
]
}
GET /health
{
"status": "degraded",
"services": {
"api": "up",
"chat": "down",
"firehose": "up",
"streams": "up",
"redirects": "up",
"proxy": "up"
},
"dependencies": {
"database": "up",
"nats": "up"
},
"uptime": "N/A",
"memory": "N/A",
"cpu": "N/A",
"channelsJoined": 0,
"firehoseClients": 3,
"activeStreams": 2,
"proxiedRequests": 1042,
"msgsPerMin": 0,
"sessionMessages": 0,
"commandsExecuted": 0,
"bansIssued": 0,
"totalUsers": 280000,
"permanentChannels": 280000,
"temporaryChannels": 0,
"monitoredUsers": 12,
"liveChannels": 12,
"shards": []
}
DELETE /proxy/urls
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"url": "https://example.com"
}
{
"success": true
}
GET /proxy/urls
Authorization: Bearer <your-api-token>
{
"urls": [
{
"origin": "https://example.com",
"createdAt": "2026-01-01T00:00:00.000Z"
}
]
}
POST /proxy/urls
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"url": "https://example.com/some/page"
}
{
"proxyUrl": {
"origin": "https://example.com",
"createdAt": "2026-01-01T00:00:00.000Z"
}
}
POST /reboot
Authorization: Bearer <your-api-token>
{
"status": "rebooting",
"message": "VM reboot initiated"
}
POST /reboot
{
"error": "Unauthorized"
}
POST /redirects
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"url": "https://example.com"
}
{
"redirect": {
"url": "https://r.example.com/a1b2c3d4",
"createdAt": "2025-01-01T00:00:00.000Z"
}
}
POST /redirects
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"url": "https://example.com",
"slug": "my-link"
}
{
"redirect": {
"url": "https://r.example.com/my-link",
"createdAt": "2025-01-01T00:00:00.000Z"
}
}
POST /redirects
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"url": "https://example.com"
}
{
"redirect": {
"url": "https://r.example.com/a1b2c3d4",
"createdAt": "2025-01-01T00:00:00.000Z"
}
}
POST /restart
Authorization: Bearer <your-api-token>
{
"status": "restarting",
"message": "Chat service restart initiated"
}
POST /restart
Authorization: Bearer <your-api-token>
{
"error": "Chat service unreachable"
}
DELETE /streamKey
Authorization: Bearer <your-api-token>
{
"success": true
}
DELETE /streamKey
Authorization: Bearer <your-api-token>
{
"error": "No stream key found."
}
POST /streamKey
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"streamKey": "live_abc123..."
}
{
"success": true
}
PUT /streamKey
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"streamKey": "live_xyz789..."
}
{
"success": true
}
PUT /streamKey
Authorization: Bearer <your-api-token>
{
"error": "No stream key found. Use POST to create one."
}
GET /user?id=123456789
{
"id": "123456789",
"login": "farty",
"createdAt": "2011-03-16T17:06:00Z",
"level": {
"name": "Moderator",
"level": 2
},
"knownNameCount": 2
}
GET /user?name=farty
{
"id": "123456789",
"login": "farty",
"createdAt": "2011-03-16T17:06:00Z",
"level": {
"name": "User",
"level": 1
},
"knownNameCount": 0
}
GET /user
{
"error": "id or name parameter is required"
}
GET /user/lastWatched?id=123456789
{
"type": "episode",
"watched_at": "2025-11-22T10:00:00Z",
"show": {
"title": "Breaking Bad",
"year": 2008
},
"episode": {
"season": 3,
"number": 7,
"title": "One Minute"
},
"movie": null
}
GET /user/lastWatched?name=farty
{
"type": "movie",
"watched_at": "2025-10-15T08:30:00Z",
"movie": {
"title": "Inception",
"year": 2010
},
"show": null,
"episode": null
}
GET /user/lastWatched
{
"error": "id or name parameter is required"
}
GET /user/live?id=123456789
{
"live": true
}
GET /user/live?name=testuser
{
"live": false
}
GET /user/live
{
"error": "id or name parameter is required"
}
GET /user/missingEventBadges?name=farty
{
"badges": [
{
"id": "ditto",
"name": "Ditto",
"streamdatabaseUrl": "https://www.streamdatabase.com/twitch/global-badges/ditto/1",
"imageUrl": "https://static-cdn.jtvnw.net/badges/v1/abc123/3",
"startAt": "2026-01-01T00:00:00.000Z",
"endAt": "2026-12-31T23:59:59.000Z",
"free": true
}
]
}
GET /user/monitored?id=123456789
{
"monitored": true,
"reason": "Discord Scammer Bot"
}
GET /user/monitored?name=testuser
{
"monitored": false,
"reason": null
}
GET /user/monitored
{
"error": "id or name parameter is required"
}
GET /user/names?id=123456789
{
"names": [
{
"id": "1",
"user_id": "123456789",
"name": "oldusername",
"first_timestamp": "2024-01-01T00:00:00.000Z",
"last_timestamp": "2025-11-22T10:00:00.000Z"
}
]
}
GET /user/names?name=farty
{
"names": []
}
GET /user/names
{
"error": "id or name parameter is required"
}