Portal Community
60-minute window: WhatsApp enforces a strict 60-minute time limit for deleting sent messages. After this window, deletion attempts are rejected by the Meta API. Always store the message ID and send timestamp if you need to support deletion workflows, and build time-validation logic before calling this operation.

When to Use

Configuration

Connection

FieldRequiredDescription
accessTokenRequiredPermanent System User access token. Store in BizFirst Credentials Manager.
phoneNumberIdRequiredNumeric string ID of the sending phone number that originally sent the message.
apiVersionOptionalMeta Graph API version. Defaults to v18.0.

Operation

FieldRequiredDescription
messageIdRequiredThe WhatsApp message ID (wamid) of the sent message to delete. Must be a message sent by this business phone number — you cannot delete messages sent by the other party.
toRequiredThe recipient's phone number (the conversation partner). Required by the Meta API to identify the conversation context.

Sample Configuration

{
  "resource": "message",
  "operation": "delete",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "messageId": "{{ $input.messageIdToDelete }}",
  "to": "{{ $input.recipientPhone }}"
}
Pre-deletion time check: Always validate that the message is within the 60-minute deletion window before calling this operation. Use a Function node to compute now - sentAt < 3600 seconds. If outside the window, route to an error notification flow rather than attempting deletion.

Validation Errors

ErrorCause
accessToken is requiredThe accessToken field is empty.
phoneNumberId is requiredThe phoneNumberId field is empty.
messageId is requiredThe messageId field is empty.
131026 (Meta)Message ID not found or does not belong to this phone number's conversations.
131000 (Meta)Deletion window expired — the message is more than 60 minutes old.
131047 (Meta)Attempting to delete a message outside the 24-hour conversation window.

Output

Success Port

FieldTypeDescription
messageIdstringThe wamid of the deleted message (echoed from input).
statusstring"sent" on success (the deletion request was accepted by Meta).
errorCodestringEmpty on success.
errorMessagestringEmpty on success.
rawResponsestringFull raw JSON from the Meta API.

Error Port

FieldTypeDescription
statusstring"failed" or "error".
errorCodestringMeta error code or BizFirst validation code.
errorMessagestringHuman-readable error description.
rawResponsestringRaw API error response.

Sample Output

{
  "messageId": "wamid.HBgLMTQxNTU1NTI2NzEVAgARGBIxQzM4NjhGQTExMjQ3RDMAA",
  "status": "sent",
  "errorCode": null,
  "errorMessage": null,
  "rawResponse": "{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"14155552671\",\"wa_id\":\"14155552671\"}],\"messages\":[{\"id\":\"wamid.HBgLMTQxNTU1NTI2NzEVAgARGBIxQzM4NjhGQTExMjQ3RDMAA\"}]}"
}

Expression Reference

ValueExpressionNotes
Deleted message ID{{ $output.deleteMsg.messageId }}Echoed from input for confirmation logging.
Status{{ $output.deleteMsg.status }}Branch on "sent" (deletion accepted) vs "failed".
Error code{{ $output.deleteMsg.errorCode }}Check for 131000 to detect an expired deletion window specifically.

Node Policies & GuardRails

Policy AreaRecommendation
Credential storageStore the access token in BizFirst Credentials Manager. Never inline in configuration.
Time window enforcementAlways check whether the message is within the 60-minute deletion window in a Function or IfCondition node before calling this operation. Expired deletion attempts waste API quota and return uninformative errors.
Store message IDsSave the wamid and send timestamp for every outbound message in a database or VariableAssignment node if your workflow needs deletion capability. Without the stored wamid, deletion is impossible.
Cannot delete received messagesOnly messages sent by the business phone number can be deleted. You cannot delete messages sent by the customer. Attempting to delete an inbound message ID returns a 131026 error.
Audit trailLog all deletion operations with the operator identity, reason, original message content, and timestamp. Regulatory environments may require a record of what was sent and when it was deleted.
Error portConnect the error port. Expired window (131000) and invalid message ID (131026) are common failure modes. Route to separate handling branches for each error type.

Examples

Immediate Deletion on Wrong Recipient Error

{
  "resource": "message",
  "operation": "delete",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "messageId": "{{ $output.sendMsg.messageId }}",
  "to": "{{ $input.recipientPhone }}"
}

An error-recovery sub-workflow is triggered when a downstream validation step detects that a message was sent to the wrong phone number. This node is called within seconds of the erroneous send — well within the 60-minute window. A follow-up node sends an apology to the recipient, and a notification is sent to the compliance team.

Flash Sale Offer Retraction

{
  "resource": "message",
  "operation": "delete",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "messageId": "{{ $input.offerMessageId }}",
  "to": "{{ $input.customerPhone }}"
}

A ScheduledTrigger fires 55 minutes after a flash sale offer message was sent. A Loop node iterates over all recipients and calls this delete operation for each stored wamid. The messages are replaced with "This message was deleted" in each conversation, preventing late redemption attempts. Note: this pattern only works if the offer window is under 60 minutes.