Send a notification to a lab instance

Prev Next
Get
/sendnotification

The SendNotification command allows you to send a notification to a specified lab instance for the user to see. For notifications sent using the GET HTTP verb, the notification text is limited to 800 characters.

Security
API Key
Header parameter nameapi_key

All methods require an API key, which must be obtained from Skillable. This key is used by Skillable to validate your account. The key can be passed as an HTTP request header with the header name "api_key".

Query parameters
labinstanceid
integer (int64) Required

The ID of the lab instance to send the notification to.

Example2393048
notification
stringRequired

The text of the notification to send. Please ensure the message is properly encoded. Line breaks can be included using \n. For notifications sent using the GET HTTP verb, the notification text is limited to 800 characters.

ExampleI'd+like+to+let+you+know
name
string

An optional name for the notification. If you name the notification, subsequent SendNotification commands using the same labInstanceId and name will cause the existing notification to be updated. It is also possible to delete a named notification by sending the name along with no notification value.

ExampleHello
Responses
200

OK Response.

Example of successfully sending a notification
{
  "Id": 28297,
  "Result": 1,
  "Status": 1,
  "Error": null
}
object
name
string

An optional name for the notification. If you name the notification, subsequent SendNotification commands using the same labInstanceId and name will cause the existing notification to be updated. It is also possible to delete a named notification by sending the name along with no notification value.

Id
integer (int32)

The unique identifier of the notification.

Result
integer (int32)

Result of the sending the notification.
0 = Error
1 = Success

Status
integer (int32)

Indicates the status of the API request.
0 = Error
1 = Success

Error
string | null

In the event of an error, this will contain a detailed error message.