Users

/user

Find user using token

GET https://api.coodo.xyz/user

Headers

Name
Type
Description

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

Name
Type
Description

Authorization*

String

Bearer token

{
    "message": "OK",
    "data": [
        { pollObject },
        ...
    ]
}

Update user favorites polls using token

PUT https://api.coodo.xyz/user/favorites

Headers

Name
Type
Description

Authorization*

String

Bearer token

Request Body

Name
Type
Description

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

Name
Type
Description

id*

String

ID of the user to return

Headers

Name
Type
Description

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>
    }
}

Update user by ID

PUT https://api.coodo.xyz/users/:id

Path Parameters

Name
Type
Description

id*

String

ID of the user to edit

Headers

Name
Type
Description

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>
    }
}

Delete user by ID

DELETE https://api.coodo.xyz/users/:id

Path Parameters

Name
Type
Description

id*

String

ID of the user to delete

Headers

Name
Type
Description

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>
}

/users/:id/polls

Get user polls by ID

GET https://api.coodo.xyz/users/:id/polls

Path Parameters

Name
Type
Description

id*

String

ID of the user to get polls

Headers

Name
Type
Description

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

Name
Type
Description

id*

String

ID of the user to delete polls

Headers

Name
Type
Description

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>
	},
	...
    ]
}

/users/:id/polls/count

Get user polls count by ID

GET https://api.coodo.xyz/users/:id/polls/count

Path Parameters

Name
Type
Description

id*

String

ID of the user to delete polls

Headers

Name
Type
Description

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

Name
Type
Description

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

Name
Type
Description

id*

String

ID of the user to get polls

Query Parameters

Name
Type
Description

botOn

String

Only user guilds where bot is on

Headers

Name
Type
Description

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?