:id is the dispute id or its ticket number. Needs an API key with Disputes access (Read & reply). See Permissions.
What a message changes
- When DHMAD asked for your side (
deadlines.merchantReplyByis set), your first message, text or files, is your side: it stops the automatic refund, anddeadlines.merchantRepliedAtrecords when it arrived. DHMAD then decides. - Otherwise a message moves no deadline. The 20 days of a charge dispute keep running (
deadlines.closesAt). - A resolved thread opens again when you write on it. Once DHMAD has closed the thread, messages are refused with 409
DISPUTE_CLOSED.actions.replytells you which.
Request body
Send JSON withmessage, or multipart/form-data with message and one files field per file. A message needs text, files, or both.
Multipart only. Up to 5 files, 20 MB each: images (PNG, JPEG, GIF, WebP, HEIC), PDF, Word (
.doc, .docx), Excel (.xls, .xlsx), text (.txt) or zip. DHMAD checks that each file’s content matches its type.Idempotency
Send anIdempotency-Key header (up to 255 characters), for example your helpdesk’s reply id. A retry with the same key on the same dispute returns the message it created with 200 and "idempotentReplay": true: nothing is posted twice and the files are not stored again. A JSON retry with the same key but a different message answers 409 IDEMPOTENCY_KEY_REUSED. A multipart retry is answered before its files are read, so its body is not compared: use a new key for each new message.
Path Parameters
Response
201 withmessage (the message object; author.type is merchant and source is api) and dispute (the dispute object without messages). An idempotent replay returns 200 with the same fields and "idempotentReplay": true.
Your message also comes back in the dispute.message.created webhook, with source: "api".
Errors
Errors carry the code inerror and code, with a readable message:
Other upload problems return 400
UPLOAD_INCOMPLETE (the upload was cut off), 400 FILE_VALIDATION_FAILED (a file’s content does not match its type) or 503 FILE_STORAGE_UNAVAILABLE. Send the request again with the same Idempotency-Key.
