Zum Inhalt springen

Update

Dieser Inhalt ist noch nicht in Ihrer Sprache verfügbar.

POST https://api.pushwoosh.com/messaging/v2/update

Replaces a previously created message, identified by its message_code, with a new definition. The replacement is a full replace, not a patch: the new definition is applied exactly as sent, and the message_code does not change.

Update is available only while the message is still pending — scheduled for a future send and not yet picked up for processing or delivery.

To check whether a message is still in an updatable state, see Checking message status.

Authenticate with your Server API token in the Authorization: Token <API_TOKEN> header.

FieldTypeRequiredDescription
message_codestringYesMessage code of the message to update, as returned by Notify in result.message_code.
requestobjectYesThe full new definition of the message. Same shape as the Notify request body — a segment or transactional object. Validated exactly like Notify.

Example request

Anchor link to

Reschedule a segment message and change its content:

Terminal window
curl -X POST https://api.pushwoosh.com/messaging/v2/update \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message_code": "XXXX-XXXXXXXX-XXXXXXXX",
"request": {
"segment": {
"application": "XXXXX-XXXXX",
"platforms": ["IOS", "ANDROID"],
"code": "active_users",
"payload": {
"content": {
"localized_content": {
"en": {
"ios": { "body": "Updated message" },
"android": { "body": "Updated message" }
}
}
}
},
"schedule": { "at": "2026-05-02T12:00:00Z" },
"message_type": "MESSAGE_TYPE_MARKETING"
}
}
}'

On success, returns HTTP 200 with the result of the updated message. The message_code is unchanged.

{
"result": {
"message_code": "XXXX-XXXXXXXX-XXXXXXXX",
"unknown_identifiers": []
}
}
  • message_code (string): the same code that was passed in the request.
  • unknown_identifiers (array of string): identifiers in the new definition that were not found, when applicable (see Notify).

Errors use the standard gRPC-Gateway error envelope: { "code": ..., "message": ..., "details": [...] }.

HTTP statusCondition
400message_code is missing.
400The new request definition is missing or invalid (it is validated exactly like Notify).
400The message is not in an updatable state (it is no longer pending).
403The message belongs to another account.
404No message exists for the given message_code.
500An internal error occurred while loading the message or applying the update. Retry the request.

Example

Updating a message that no longer exists returns HTTP 404:

{
"code": 5,
"message": "message not found",
"details": []
}

Checking message status

Anchor link to

Before updating, you can verify whether a message is still in an updatable state. Besides reading the Status column in the messages table in the Control Panel (Campaigns → One-time messages), you can query the status programmatically with messages:list:

  • Pass the message_code in the filters.messages_codes array (alongside the required filters.application).
  • Read the status field of the matching entry in items[].