Media

Get Media

Get single media object by Id.

Example Request

curl -i https://api.oktopost.com/v2/media/002000000000000

Example Result

{  
    "Result":true,
    "Media":{  
        "Id":"002000000000000",
        "Created":"2015-07-22 10:44:21",
        "Modified":"2015-07-22 10:44:21",
        "AccountId":"001000000000000",
        "Status":"valid",
        "CreatedBy":"00A000000000000",
        "ModifiedBy":"00A000000000000",
        "Type":"ImageUrl",
        "Size":0,
        "Resource":"http:\/\/ww1.prweb.com\/prfiles\/2013\/08\/30\/11077903\/India%20Water%20Pumps%20Market.JPG",
        "Name":"http:\/\/ww1.prweb.com\/prfiles\/2013\/08\/30\/11077903\/India%20Water%2",
        "Description":""
    }
}

List Media

List account media assets.

Example Request

curl -i https://api.oktopost.com/v2/media

Example Result

{  
    "Result":true,
    "Items":[  
        {  
            "Id":"026000000000000",
            "AccountId":"001000000000000",
            "Status":"valid",
            "Created":"2014-09-01 14:42:15",
            "Modified":"2015-01-19 14:58:18",
            "CreatedBy":"00A000000000000",
            "ModifiedBy":"00A000000000000",
            "Type":"Image",
            "Size":0,
            "Resource":"http:\/\/6.advisoraction.com\/l\/38202\/2014-04-16\/253y\/38202\/6396\/SAX_three_men_computer_450X300.jpg",
            "Name":"",
            "Description":""
        },
        ...
    ],
    "Total":696
}

Create Media

Create a new media asset. Resource must consist of a valid image Url that can be publicly accessed. On success, this endpoint will return a similar response to the GET endpoint.

Example Request

curl -i https://api.oktopost.com/v2/media -X POST \
-d resource="https://www.oktopost.com/assets/img/oktopost-og.png"

Delete Media

Delete asset from media library.

Example Request

curl -i https://api.oktopost.com/v2/media/002000000000000 -X DELETE

Feedback and Knowledge Base