Skip to content

Create an Attachment

Request

Create an attachment

Security
Auth0(Required scopes: offline_accessmanage:services)
Bodyapplication/json
target_idnumber, (int32), >= 1required
Example:8
strategy_idnumber, (int32), >= 0required
Example:332
restrictionstring, non-emptyrequired
Enum:"INCLUDE""EXCLUDE"
operatorstring, non-emptyrequired
Enum:"OR""AND"
or_betterboolean
curl -i -X POST \
  https://api.mediamath.com/api/v3.0/attachments \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "target_id": 8,
    "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" } }