Negative Star Innovators
Login Get Started

REST API

The Thieves REST API allows you to programmatically interact with your trackers and alert methods. All API requests require a valid API token.

Authentication

All API requests require a token parameter, passed in the Authorization header as a Bearer token. This token is obtained after a user logs into their account, enters 'Account Settings' and clicks "Create New Token".

Create Tracker

Endpoint: POST https://negativestarinnovators.com/api/v1/create_tracker

Creates a new tracker.

Request Body (JSON):


{
    "name": "string",
    "url": "string",
    "running": boolean,
    "check_frequency": integer,
    "condition": "string",
    "alert_methods": [integer]
}
                
  • name: The name of the tracker.
  • url: The URL to be tracked.
  • running: true to start the tracker immediately, false otherwise.
  • check_frequency: How often to check the URL (in minutes). The minimum check frequency value is 30 minutes
  • condition: The condition to check for (e.g., "when tommorow's weather is forcased to be raining").
  • alert_methods: An array of alert method IDs (integers). Once your condition is met notifications will be sent to these alert methods

Response (JSON):


{
    "success": boolean,
    "message": "string",
    "tracker_id": integer
}
                

Modify Tracker

Endpoint: POST https://negativestarinnovators.com/api/v1/modify_tracker

Modifies an existing tracker.

Request Body (JSON):


{
    "id": integer,
    "name": "string",
    "url": "string",
    "running": boolean,
    "check_frequency": integer,
    "condition": "string",
    "alert_methods": [integer]
}
                
  • id: The ID of the tracker to modify (required).
  • name: (Optional) The new name of the tracker.
  • url: (Optional) The new URL to track.
  • running: (Optional) true to start/resume, false to pause.
  • check_frequency: (Optional) New check frequency (minutes).
  • condition: (Optional) The new condition.
  • alert_methods: (Optional) A *new* array of alert method IDs. This will *replace* the existing alert methods.

If an optional field is omitted, its current value will be preserved.

Response (JSON):


{
    "success": boolean,
    "message": "string",
    "tracker_id": integer
}
                

Delete Trackers

Endpoint: DELETE https://negativestarinnovators.com/api/v1/delete_trackers

Deletes one or more trackers.

Request Body (JSON):


{
    "ids": [integer]
}
                
  • tracker_ids: An array of tracker IDs to delete.

Response (JSON):


{
    "success": boolean,
    "message": "string"
}
                

Get Trackers

Endpoint: POST https://negativestarinnovators.com/api/v1/get_trackers

Gets tracker information.

Request Body (JSON):


{
    "ids": [integer]
}
                
  • tracker_ids: (Optional) An array of tracker IDs to retrieve. If omitted, *all* trackers for the user are returned.

Response (JSON):


{
    "success": boolean,
    "message": "string",
    "trackers": [
        {
            "id": integer,
            "name": "string",
            "url": "string",
            "condition": "string",
            "running": boolean,
            "alertMethods": [integer],
            "check_frequency": integer,
            "created_at": "string",
            "last_checked": "string",
            "user_id": integer
        }
    ]
}
                

Create Alert Method

Endpoint: POST https://negativestarinnovators.com/api/v1/create_alert_method

Creates a new alert method.

Request Body (JSON):


{
    "name": "string",
    "type": "string",
    "contact_details": "string"
}
               
  • name: A descriptive name for the alert method (e.g., "My Discord Webhook").
  • type: The type of alert method. Must be one of "Email", "Telegram", "Discord Webhook", "Webhook".
  • contact_details: Alert method-specific details. See below.

Contact Details Formats:

  • Email: The email address where you want your notifiations sent to. The email address needs to be verified.
  • Telegram: Leave blank. A token will be generated, which you must send to the Telegram bot at @negative_star_innovators_bot by sending '/auth token'.
  • Discord Webhook: The Discord webhook of the channels where you want notifiations to be sent to
  • Webhook: Your webhook. The condition check result will be passed here for both False and True results

Response (JSON):


{
    "success": boolean,
    "message": "string",
    "new_alert_method_id": integer,
    "telegram_token": "string" // Only present if type is telegram
}
               

Modify Alert Method

Endpoint: POST https://negativestarinnovators.com/api/v1/modify_alert_method

Modifies an existing alert method.

Request Body (JSON):


{
    "id": integer,
    "name": "string"
}
                
  • id: The ID of the alert method you want to modify.
  • name: The new name for the alert method.

Response (JSON):


{
    "success": boolean,
    "message": "string",
    "user_alert_method_id": integer
}
                

Get Alert Methods

Endpoint: POST https://negativestarinnovators.com/api/v1/get_alert_methods

Gets alert method information.

Request Body (JSON):


{
    "ids": [integer]
}
                
  • ids: (Optional) An array of alert method IDs to retrieve. If omitted, *all* alert methods for the user are returned.

Response (JSON):


{
    "success": boolean,
    "message": "string",
    "user_alert_methods": [
        {
            "id": integer,
            "name": "string",
            "type": "string",
            "contact_details": "string",
            "user_id": integer
        }
    ]
}
                

Delete Alert Methods

Endpoint: DELETE https://negativestarinnovators.com/api/v1/delete_alert_methods

Deletes one or more alert methods.

Request Body (JSON):


{
    "ids": [integer]
}
                
  • ids: An array of alert method IDs to delete.

Response (JSON):


{
    "success": boolean,
    "message": "string"
}
                

Get Allowed Checks Remaining

Endpoint: GET https://negativestarinnovators.com/api/v1/get_allowed_checks_remaining

Retrieves the number of allowed checks remaining for the authenticated user.

Request: No request body.

Response (JSON):


{
    "success": boolean,
    "message": "string",
    "allowed_checks_remaining": integer
}