Skip to content

(Legacy) Update an Attachment

Request

Update an attachment by ID

Security
Auth0(Required scopes: offline_accessmanage:services)
Path
attachment_idintegerrequired

Numeric ID of the attachment to update

Bodyapplication/json
target_idnumber, (int32), >= 0
Example:8
versionnumber, (int32)required
Example:1
strategy_idnumber, (int32), >= 1
Example:332
restrictionstring, non-empty
Enum:"INCLUDE""EXCLUDE"
operatorstring, non-empty
Enum:"OR""AND"
or_betterboolean
curl -i -X PUT \
  'https://api.mediamath.com/api/v3.0/attachment/{attachment_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "target_id": 8,
    "version": 1,
    "strategy_id": 332,
    "restriction": "INCLUDE",
    "operator": "OR",
    "or_better": true
  }'

Responses

Attachment response

Bodyapplication/json
dataobject(attachment_base)
metaobject(single_metadata)
Response
{ "data": { "id": 1, "entity_type": "string", "target_id": 0, "strategy_id": 1, "restriction": "INCLUDE", "operator": "OR", "created_on": "string", "updated_on": "string", "version": 0, "or_better": true }, "meta": { "status": "success" } }