# Sending Information

You can send information to the UBuild API to add builds to the queue, cancel builds and if needed; you can even shut down UBuild.

## Methods

Below are the endpoints you can use to retrieve information from UBuild:

### /queue/add

Add a build to the queue.  
**Accepts:**

- Query/Params 
    - "token" - The user's access token. (optional; depending on api.config)
- Body 
    - Basic Example:  
        ```json
        {
            "ProjectFilename": "Scary Stories (git)",
            "PresetName": "Steam",
            "PlatformName": "Windows"
        }
        ```
    - Advanced Example: *(with Preset overrides)* ```json
        {
            "ProjectFilename": "",
            "PresetName": "",
            "PlatformName": "",
            "ProjectOverrides": {
                "ProjectFolder": "",
                "GitUser": "",
                "GitToken": "",
                "GitBranch": "",
                "UnityFolder": ""
            },
            "PresetOverrides": {
                "MethodToExecute": "",
                "AdditionalBuildArgs": [],
                "BuildFolder": "",
                "IncludeFilesFromFolder": "",
                "ExcludeFilesFromBuild": [],
                "ExcludeFoldersFromBuild": [],
                "DeleteBuildExceptZip": false,
                "CompressToZip": false,
                "ForcePullFreshProject": false
            }
        }
        ```

**Returns:**

- A plain-text message with the result of the operation. (200 = success)

---

### /queue/cancel-current

This will cancel the currently in-progress build.

**Accepts:**

- Query/Params 
    - "token" - The user's access token. (optional; depending on api.config)

**Returns:**

- A plain-text message with the result of the operation. (200 = success)

---

### /queue/cancel-all

This will cancel all builds within the queue.

**Accepts:**

- Query/Params 
    - "token" - The user's access token. (optional; depending on api.config)

**Returns:**

- A plain-text message with the result of the operation. (200 = success)