Skip to main content
These endpoints allow you to manage the applications available for streaming.

GET /api/apps

Get the list of available applications.

Authentication

Required

Response

array
Array of application objects
string
Application name
string
Command to launch the application
string
Path to log output file (optional)
string
Full path to the application cover image (PNG file) (optional)
boolean
Whether to exclude global preparation commands
boolean
Whether to run the application with elevated privileges
boolean
Whether to automatically detach from the application process
boolean
Whether to wait for all child processes to exit
integer
Timeout in seconds before force-closing the application
array
Array of preparation commands (optional)
string
Command to execute before launching the application
string
Command to execute after closing the application
boolean
Whether to run this command with elevated privileges
array
Array of detached commands to run alongside the application (optional)

Example Request

Example Response

POST /api/apps

Create a new application or update an existing one.

Authentication

Required

Request Body

string
required
Application name
string
Command to launch the application
integer
required
Application index. Use -1 to create a new application, or provide the existing index to update an application
string
Path to log output file
string
Full path to the application cover image (must be a PNG file)
boolean
default:false
Exclude global preparation commands
boolean
default:false
Run with elevated privileges
boolean
default:true
Automatically detach from the application process
boolean
default:true
Wait for all child processes to exit
integer
default:5
Timeout in seconds before force-closing
array
Array of preparation commands
string
Command to execute before launching
string
Command to execute after closing
boolean
Run with elevated privileges
array
Array of detached commands (strings) to run alongside the application

Response

boolean
Whether the operation was successful

Example Request

Example Response

Notes

  • Applications are automatically sorted by name after creation or update
  • Empty prep-cmd and detached arrays are removed from the configuration
  • Use index -1 to create a new application; it will be added to the end of the list (before sorting)

POST /api/apps/close

Close the currently running application.

Authentication

Required

Request Headers

Response

boolean
Whether the operation was successful

Example Request

Example Response

Notes

  • This terminates the currently running application process
  • The request body can be empty JSON {} but the Content-Type header is required

DELETE /api/apps/

Delete an application by its index.

Authentication

Required

Path Parameters

integer
required
The zero-based index of the application to delete

Response

boolean
Whether the operation was successful
string
Success message indicating which application was deleted

Example Request

Example Response

Error Responses

If the index is out of range:
If no applications exist:

GET /api/covers/

Get the cover image for an application.

Authentication

Required

Path Parameters

integer
required
The zero-based index of the application

Response

Returns the PNG image file with Content-Type: image/png header.

Example Request

Error Responses

If the application has no cover image:
If the index is out of range:

Notes

  • Only PNG files are supported for cover images
  • The image path is validated to ensure it’s a valid PNG file
  • If no custom image is set, the default image path is used

POST /api/covers/upload

Upload or download a cover image for applications.

Authentication

Required

Request Body

string
required
Unique identifier for the cover image (e.g., igdb_<game_id>)
string
URL to download the image from (must be from images.igdb.com). If provided, the image will be downloaded
string
Base64-encoded image data. Used if url is not provided

Response

boolean
Whether the upload was successful
string
File path where the cover image was saved

Example Request (URL)

Example Request (Base64)

Example Response

Error Responses

If the key is missing:
If the URL host is not allowed:
If the download fails:

Notes

  • Images are stored in the covers/ subdirectory of the Sunshine config directory
  • The key is URL-escaped before being used as the filename
  • Only images.igdb.com is allowed as an external image source for security
  • You can use either url (for downloading) or data (for direct upload)