Allows a message status to be updated.

View interactive version here

Request Parameters

Parameter Required Type Description
messageId Yes string The messageId of the message to update
status Yes string The status to set on the message

Response Parameters

A response to an update message request

Parameter Type Description
scriptData ScriptData A JSON Map of any data added either to the Request or the Response by your Cloud Code

Nested types


A collection of arbitrary data that can be added to a message via a Cloud Code script.

Parameter Type Description
myKey string An arbitrary data key
myValue JSON An arbitrary data value.

Code Samples


    using GameSparks.Api;
    using GameSparks.Api.Requests;
    using GameSparks.Api.Responses;
    new UpdateMessageRequest()
        .Send((response) => {
        GSData scriptData = response.ScriptData;

ActionScript 3

    import com.gamesparks.*;
    import com.gamesparks.api.requests.*;
    import com.gamesparks.api.responses.*;
    import com.gamesparks.api.types.*;

        .send(function(response:com.gamesparks.api.responses.UpdateMessageResponse):void {
        var scriptData:ScriptData = response.getScriptData(); 


    #import "GS.h"
    #import "GSAPI.h"
    GSUpdateMessageRequest* request = [[GSUpdateMessageRequest alloc] init];
    [request setMessageId:messageId;
    [request setStatus:status;
    [request setCallback:^ (GSUpdateMessageResponse* response) {
    NSDictionary* scriptData = [response getScriptData]; 
    [gs send:request];


    #include <GameSparks/generated/GSRequests.h>
    using namespace GameSparks::Core;
    using namespace GameSparks::Api::Responses;
    using namespace GameSparks::Api::Requests;

    void UpdateMessageRequest_Response(GS& gsInstance, const UpdateMessageResponse& response) {
    GSData scriptData = response.getScriptData(); 

    UpdateMessageRequest request(gsInstance);


import com.gamesparks.sdk.api.autogen.GSRequestBuilder.UpdateMessageRequest;
import com.gamesparks.sdk.api.autogen.GSResponseBuilder.UpdateMessageResponse;
import com.gamesparks.sdk.api.autogen.GSTypes.*;
import com.gamesparks.sdk.api.GSEventListener;

    .send(new GSEventListener<UpdateMessageResponse>() {
        public void onEvent(UpdateMessageResponse response) {

Cloud Code

    var request = new SparkRequests.UpdateMessageRequest();
    request.messageId = ...;
    request.status = ...;
    var response = request.Send();

var scriptData = response.scriptData; 
Did this page help you? Please enter your feedback below. For questions about using this part of the platform, please contact support here