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.
Request
Anchor link toAuthenticate with your Server API token in the Authorization: Token <API_TOKEN> header.
| Field | Type | Required | Description |
|---|---|---|---|
message_code | string | Yes | Message code of the message to update, as returned by Notify in result.message_code. |
request | object | Yes | The 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 toReschedule a segment message and change its content:
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" } } }'Response
Anchor link toOn 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 (seeNotify).
Errors
Anchor link toErrors use the standard gRPC-Gateway error envelope: { "code": ..., "message": ..., "details": [...] }.
| HTTP status | Condition |
|---|---|
400 | message_code is missing. |
400 | The new request definition is missing or invalid (it is validated exactly like Notify). |
400 | The message is not in an updatable state (it is no longer pending). |
403 | The message belongs to another account. |
404 | No message exists for the given message_code. |
500 | An 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 toBefore 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_codein thefilters.messages_codesarray (alongside the requiredfilters.application). - Read the
statusfield of the matching entry initems[].