/update/{endpoint}

You can update values of the data stored in the endpoint config or metadata.

Path parameters

endpoint: endpoint: The ID of your endpoint (usually your Discord server id)

Query parameters

query name
type
min-max length
description

index

integer

-

Index of the value in a list to edit (will overwrite the index' value)

webhook_discord

string

50 .. 350 characters

Discord Webhook URL

webhook_guilded

string

50 .. 350 characters

Guilded Webhook URL

webhook_revolt

string

50 .. 350 characters

Revolt Webhook URL (not supported by Revolt)

webhook_nerimity

string

50 .. 350 characters

Nerimity Webhook URL (not supported by Nerimity)

log_discord

string

-

Discord Log Channel ID

log_guilded

string

5 .. 50 characters

Guilded Log Channel ID

log_revolt

string

5 .. 50 characters

Revolt Log Channel ID

log_nerimity

string

5 .. 50 characters

Nerimity Log Channel ID

channel_discord

string

-

Discord Channel ID

channel_guilded

string

5 .. 150 characters

Guilded Channel ID

channel_revolt

string

5 .. 50 characters

Revolt Channel ID

channel_nerimity

string

5 .. 50 characters

Nerimity Channel ID

blacklist

string

1 .. 250 characters

Word appending to the Blacklist

sender_channel

string

10 .. 80 characters

Sender Channel ID

trigger

boolean

-

Value if a new message exists

sender

string

5 .. 10 characters

Sender platform

message_author_name

string

1 .. 50 characters

Message author name

message_author_avatar

string

50 .. 250 characters

Message author avatar as URL

allowed_ids

string

5 .. 50 characters

An ID appending to the allowed ids list

message_reply

boolean Default: false

-

If the message if a reply

message_reply_message

string

<= 1500 characters

The content of the message that got replied to

message_reply_author

string

5 .. 50 characters

The author avatar as URL of the message that got replied ti

message_author_id

string

5 .. 50 characters

Message author ID

message_content

string

<= 1500 characters

Message content

message_attachments

string

20 .. 1550 characters

URL of the attachment of the message

message_embed

string (json formatted)

<= 1500 characters

JSON object as string of the messages embed

selfuse

boolean Default: false

-

Value of the API should bridge messages -> See selfuse [ADD LINK]

token

string

71 .. 85 characters

Astroid endpoint token

beta

boolean Default: false

-

Value if the beta is in the beta program

only_check

boolean Default: false

-

Only check unread messages and ignore other data completely

Example request

import requests

endpoint_id = 1
token = "S3Kjd0LHDLhPWJDnxeh..."

log_discord = "1234..."
blacklist = "badword,anotherbadword" # words can be passed with a , to insert multiple

params = f"log_discord={log_discord}&blacklist={blacklist}"

request = requests.post(f"https://api.astroid.cc/update/{endpoint_id}?token={token}&{params}")
data = request.json()
print(data)

Example response

The response you get when updating data in an endpoint is the live updated data

{
    "config": {
            "allowed-ids": [],
            "blacklist": [
                    "badword",
                    "anotherbadword"
            ],
            "channels": { 
                "discord": [
                        "10481283...",
                        "1234..."
                        ],
                "guilded": [
                        "76a74hGS-0b..."
                        ],
                "nerimity": [
                        "154820..."
                        ],
                "revolt": [
                        "0KN5XD2..."
                        ]
                },
        "isbeta": false,
        "logs": {
                "discord": "10703...",
                "guilded": "093c5096-06...",
                "nerimity": null,
                "revolt": null
                },
        "self-user": false,
        "webhooks": {
                "discord": [
                        "https://discord.com/api/webhooks/1247..."
                        ],
                "guilded": [
                        "https://media.guilded.gg/webhooks/c4295ddb-f8...",
                        ]
                "nerimity": [ 
                        // No Webhooks supported
                        ],
                "revolt": [
                        // No Webhooks supported
                        ]
                }
        },
"meta": {
        "message": {
                "attachments": [],
                "author":{
                        "avatar": null,
                        "id": null,
                        "name": null
                        },
                "content": null,
                "embed":{
                        "description": "None",
                        "fields": [],
                        "footer": "None",
                        "image": "None",
                        "thumbnail": "None",
                        "title": "None"},
                        // isReply and the reply object may be missing in your data
                        "isReply": false,
                        "reply":{
                                "author": null,
                                "message": null
                                }
                        },
                        "read":{
                                "discord": false,
                                "guilded": false,
                                "nerimity": false,
                                "revolt": false
                                },
                        "sender": null,
                        "sender-channel": null,
                        "trigger": false
                }
        }

Last updated

Was this helpful?