Users
/user
Find user using token
GET https://api.coodo.xyz/user
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"data": {
"id": <string>,
"username": <string>,
"discriminator": <string>,
"public_flags": <int>,
"flags": <int>,
"locale": <string>,
"premium_type": <int>,
"tag": <string>,
"avatarURL": <string>,
"disabled": <boolean>,
"premium": <boolean>,
"alerts": <int>,
"roles": <array>,
"lastUpdate": <int>,
"email": <string>,
"stripeCustomerId": <string>,
"favoritesPolls": <array> // Array of polls ids
}
}Find user favorites polls using token
GET https://api.coodo.xyz/user/favorites
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"data": [
{ pollObject },
...
]
}Update user favorites polls using token
PUT https://api.coodo.xyz/user/favorites
Headers
Authorization*
String
Bearer token
Request Body
favoritesPolls*
Array
Array of polls ids
{
"message": "OK",
"data": <array> // Array of polls ids
}/users/:id
Find user by ID
GET https://api.coodo.xyz/users/:id
Path Parameters
id*
String
ID of the user to return
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"data": {
"id": <string>,
"username": <string>,
"discriminator": <string>,
"public_flags": <int>,
"flags": <int>,
"locale": <string>,
"premium_type": <int>,
"tag": <string>,
"avatarURL": <string>,
"disabled": <boolean>,
"alerts": <int>,
"roles": <array>,
"favoritesPolls": <array>,
"lastUpdate": <int>
}
}{
"error": "Not Found"
}Update user by ID
PUT https://api.coodo.xyz/users/:id
Path Parameters
id*
String
ID of the user to edit
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"data": {
"id": <string>,
"username": <string>,
"discriminator": <string>,
"public_flags": <int>,
"flags": <int>,
"locale": <string>,
"premium_type": <int>,
"tag": <string>,
"avatarURL": <string>,
"disabled": <boolean>,
"premium": <boolean>,
"alerts": <int>,
"roles": <array>,
"lastUpdate": <int>,
"email": <string>,
"stripeCustomerId": <string>,
"favoritesPolls": <array>
}
}{
"error": "Not Found"
}{
"error": "Forbidden"
}Delete user by ID
DELETE https://api.coodo.xyz/users/:id
Path Parameters
id*
String
ID of the user to delete
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"data": {
"id": <string>,
"username": <string>,
"discriminator": <string>,
"public_flags": <int>,
"flags": <int>,
"locale": <string>,
"premium_type": <int>,
"tag": <string>,
"avatarURL": <string>,
"disabled": <boolean>,
"premium": <boolean>,
"alerts": <int>,
"roles": { type: Array },
"lastUpdate": <int>,
"email": <string>,
"stripeCustomerId": <string>,
"favoritesPolls": <array>
}{
"error": "Not Found"
}{
"error": "Forbidden"
}/users/:id/polls
Get user polls by ID
GET https://api.coodo.xyz/users/:id/polls
Path Parameters
id*
String
ID of the user to get polls
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"data": [
{
"pollID": <string>,
"channelID": <string>,
"buttons": [], // RESULTS HIDDEN (-> /polls/:id/results
"multiples": <boolean>,
"choices_max": <int>,
"anonymous": <boolean>,
"ended": <boolean>,
"title": <string>,
"ownerID": <string>,
"timestamp": <string>,
"timestamp_close": <int>,
"hide_results": <boolean>,
"description": <string>,
"image": <string>
},
...
]
}Delete user polls by ID
DELETE https://api.coodo.xyz/users/:id/polls
Path Parameters
id*
String
ID of the user to delete polls
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"data": [
{
"pollID": <string>,
"channelID": <string>,
"buttons": [], // RESULTS HIDDEN (-> /polls/:id/results
"multiples": <boolean>,
"choices_max": <int>,
"anonymous": <boolean>,
"ended": <boolean>,
"title": <string>,
"ownerID": <string>,
"timestamp": <string>,
"timestamp_close": <int>,
"hide_results": <boolean>,
"description": <string>,
"image": <string>
},
...
]
}{
"error": "Forbidden"
}/users/:id/polls/count
Get user polls count by ID
GET https://api.coodo.xyz/users/:id/polls/count
Path Parameters
id*
String
ID of the user to delete polls
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"count": <int>,
"max": <int>
}/users
Get users
GET https://api.coodo.xyz/users
⚠️ A maximum of 50 users are returned
Query Parameters
username
String
Username filter
String
Username id
{
"message": "OK",
"data": [
{
"id": <string>,
"username": <string>,
"discriminator": <string>,
"public_flags": <int>,
"flags": <int>,
"locale": <string>,
"premium_type": <int>,
"tag": <string>,
"avatarURL": <string>,
"disabled": <boolean>,
"alerts": <int>,
"roles": <array>,
"favoritesPolls": <array>,
"lastUpdate": <int>
}
{...}
]
}/users/:id/guilds
Get user guilds by ID
GET https://api.coodo.xyz/users/:id/guilds
Path Parameters
id*
String
ID of the user to get polls
Query Parameters
botOn
String
Only user guilds where bot is on
Headers
Authorization*
String
Bearer token
{
"message": "OK",
"data": [
{
"id": <string>,
"name": <string>,
"icon": <string>,
"features": <array>,
"approximate_member_count": <int>,
"approximate_presence_count": <int>,
"owner_id": <string>, // only with botOn = true
"last_update": <int>, // only with botOn = true
"owner": <boolean>, // only with botOn = false
"permissions": <string>, // only with botOn = false
"channels": <array>, // only with botOn = false
},
...
]
}Last updated
Was this helpful?