Skip to main content
POST
https://api.owem.com.br
/
v4
/
i
/
meds
/
{medId}
/
defense
Submit MED Defense
curl --request POST \
  --url https://api.owem.com.br/v4/i/meds/{medId}/defense \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "<string>",
  "files": [
    {}
  ]
}
'
{
  "requestId": "a111b222-c333-4d44-8e55-f66677788899",
  "success": true,
  "size": 1,
  "data": {
    "endToEndId": "E123456789202512240000000000001",
    "medId": "med_12345678-abcd-efgh-ijkl-123456789abc",
    "createdInfractionAt": 1766523042000,
    "pspCreatorName": "OTHER PAYMENT INSTITUTION LTD.",
    "payer": {
      "ispb": "12345678",
      "personType": "person",
      "cpfCnpj": "XXX123456XX",
      "name": "JOHN DOE",
      "agency": "0001",
      "accountType": "savings",
      "accountNumber": "123456"
    },
    "details": "Transaction contested by paying user",
    "feeAmount": 0,
    "netAmount": 0,
    "grossAmount": 150.0,
    "transactionCreatedAt": 1766436642000,
    "receiver": {
      "ispb": "87654321",
      "personType": "company",
      "agency": "0001",
      "accountType": "checking",
      "name": "MY COMPANY LTD",
      "cpfCnpj": "XX123456000XXX",
      "accountNumber": "987654321012"
    },
    "userId": "usr_abc123def",
    "status": "under_analysis",
    "defense": {
      "description": "Attached all proof of negotiation with customer",
      "createdAt": 1766609442000,
      "files": ["https://storage.owem.com.br/files/defense-001.pdf"]
    },
    "deadlines": {
      "defenseDeadLine": 1766782086000
    }
  }
}

Purpose

Submits a defense for a received MED. The defense must include a description and may contain proof files.
Defense must be submitted before the deadline indicated in deadlines.defenseDeadLine. After the deadline, defense will not be accepted.

Authentication

Authorization
string
required
Basic Auth required in format: Basic {Base64(API_KEY:API_SECRET)}

Path Parameters

medId
string
required
Unique MED identifier

Request Body

description
string
required
Defense description, explaining the transaction context
files
array
Array of proof file URLs (invoices, delivery receipts, chats, etc.)

Response

requestId
string
UUID for tracking
success
boolean
Operation status
size
number
Number of returned items
data
object
Updated MED with defense
{
  "requestId": "a111b222-c333-4d44-8e55-f66677788899",
  "success": true,
  "size": 1,
  "data": {
    "endToEndId": "E123456789202512240000000000001",
    "medId": "med_12345678-abcd-efgh-ijkl-123456789abc",
    "createdInfractionAt": 1766523042000,
    "pspCreatorName": "OTHER PAYMENT INSTITUTION LTD.",
    "payer": {
      "ispb": "12345678",
      "personType": "person",
      "cpfCnpj": "XXX123456XX",
      "name": "JOHN DOE",
      "agency": "0001",
      "accountType": "savings",
      "accountNumber": "123456"
    },
    "details": "Transaction contested by paying user",
    "feeAmount": 0,
    "netAmount": 0,
    "grossAmount": 150.0,
    "transactionCreatedAt": 1766436642000,
    "receiver": {
      "ispb": "87654321",
      "personType": "company",
      "agency": "0001",
      "accountType": "checking",
      "name": "MY COMPANY LTD",
      "cpfCnpj": "XX123456000XXX",
      "accountNumber": "987654321012"
    },
    "userId": "usr_abc123def",
    "status": "under_analysis",
    "defense": {
      "description": "Attached all proof of negotiation with customer",
      "createdAt": 1766609442000,
      "files": ["https://storage.owem.com.br/files/defense-001.pdf"]
    },
    "deadlines": {
      "defenseDeadLine": 1766782086000
    }
  }
}

Status Codes

HTTPDescription
200Defense submitted successfully
400Invalid payload
401Invalid credentials
403IP not allowlisted
404MED not found
409Defense already submitted
422Defense deadline expired
429Rate limit exceeded
500Internal error

Request Example

{
  "description": "Attached all proof of negotiation with customer. Delivery was made on 12/20/2025 as per protocol #12345.",
  "files": [
    "https://storage.example.com/invoice.pdf",
    "https://storage.example.com/delivery-receipt.pdf",
    "https://storage.example.com/customer-chat.pdf"
  ]
}
Include as much proof as possible: invoices, delivery receipts, customer chats, tracking information, etc.
After submitting defense, MED status remains under_analysis until analysis is completed by the institution that created the MED.