{"__v":95,"_id":"5789673bad30020e0038691b","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"**Pavlov Protect** is an integrated solution for detecting copyrighted and trademarked content at scale. It offers a simple API that lets you programmatically submit images and receive *detection decisions* on the content they contain. Additionally, you can train Protect to learn to detect new content.\n\nAll images submitted to Protect are run through our well-trained and object detection state-of-the-art [neural network](http://www.kdnuggets.com/2015/01/deep-learning-explanation-what-how-why.html). You can provide feedback and ask for further review on detections.\n\nAll request parameters (except file uploads) can be passed via `application/x-www-form-urlencoded` or `multipart/form-data` unless otherwise noted. Responses are in JSON format. Successful requests will have their relevant information in the response under the top-level `\"data\"` field. Unsuccessful requests will have an [`\"errors\"` field](doc:errors) with more information.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Authentication required\",\n  \"body\": \"All requests to Protect require an HTTP Basic username and password. If you have trouble finding your login credentials, please [contact us](mailto:team@pavlov.ai).\"\n}\n[/block]","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-07-15T22:44:11.440Z","excerpt":"Detect copyright and trademark infringement at scale.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"overview","sync_unique":"","title":"Getting started","type":"basic","updates":[],"user":"56afbce8aef9a21700da0e17","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

Getting started

Detect copyright and trademark infringement at scale.

**Pavlov Protect** is an integrated solution for detecting copyrighted and trademarked content at scale. It offers a simple API that lets you programmatically submit images and receive *detection decisions* on the content they contain. Additionally, you can train Protect to learn to detect new content. All images submitted to Protect are run through our well-trained and object detection state-of-the-art [neural network](http://www.kdnuggets.com/2015/01/deep-learning-explanation-what-how-why.html). You can provide feedback and ask for further review on detections. All request parameters (except file uploads) can be passed via `application/x-www-form-urlencoded` or `multipart/form-data` unless otherwise noted. Responses are in JSON format. Successful requests will have their relevant information in the response under the top-level `"data"` field. Unsuccessful requests will have an [`"errors"` field](doc:errors) with more information. [block:callout] { "type": "danger", "title": "Authentication required", "body": "All requests to Protect require an HTTP Basic username and password. If you have trouble finding your login credentials, please [contact us](mailto:team@pavlov.ai)." } [/block]
**Pavlov Protect** is an integrated solution for detecting copyrighted and trademarked content at scale. It offers a simple API that lets you programmatically submit images and receive *detection decisions* on the content they contain. Additionally, you can train Protect to learn to detect new content. All images submitted to Protect are run through our well-trained and object detection state-of-the-art [neural network](http://www.kdnuggets.com/2015/01/deep-learning-explanation-what-how-why.html). You can provide feedback and ask for further review on detections. All request parameters (except file uploads) can be passed via `application/x-www-form-urlencoded` or `multipart/form-data` unless otherwise noted. Responses are in JSON format. Successful requests will have their relevant information in the response under the top-level `"data"` field. Unsuccessful requests will have an [`"errors"` field](doc:errors) with more information. [block:callout] { "type": "danger", "title": "Authentication required", "body": "All requests to Protect require an HTTP Basic username and password. If you have trouble finding your login credentials, please [contact us](mailto:team@pavlov.ai)." } [/block]
{"__v":6,"_id":"578d5f7a2441e13200a142eb","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"When using Protect to detect regions of interest in an image:\n\n1. **[Submit an image](doc:protect-post-images)** to Protect using the RESTful API\n\n2. **[Retrieve the tags](doc:protect-get-images-id)** in the response body\n\n3. **[Provide feedback](doc:protect-post-images-id-feedback)** to Protect so it can improve accuracy for future submissions\n\n4. **[Review detection](doc:protect-post-images-id-review)** if you want Protect to dive deeper into its decision\n\n5. **[Receive a webhook](doc:protect-webhook)** whenever Protect updates its decision on any of your submitted images","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-07-18T23:00:10.881Z","excerpt":"Guidelines on how to use Protect.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"workflow","sync_unique":"","title":"Workflow","type":"basic","updates":[],"user":"56afbce8aef9a21700da0e17","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

Workflow

Guidelines on how to use Protect.

When using Protect to detect regions of interest in an image: 1. **[Submit an image](doc:protect-post-images)** to Protect using the RESTful API 2. **[Retrieve the tags](doc:protect-get-images-id)** in the response body 3. **[Provide feedback](doc:protect-post-images-id-feedback)** to Protect so it can improve accuracy for future submissions 4. **[Review detection](doc:protect-post-images-id-review)** if you want Protect to dive deeper into its decision 5. **[Receive a webhook](doc:protect-webhook)** whenever Protect updates its decision on any of your submitted images
When using Protect to detect regions of interest in an image: 1. **[Submit an image](doc:protect-post-images)** to Protect using the RESTful API 2. **[Retrieve the tags](doc:protect-get-images-id)** in the response body 3. **[Provide feedback](doc:protect-post-images-id-feedback)** to Protect so it can improve accuracy for future submissions 4. **[Review detection](doc:protect-post-images-id-review)** if you want Protect to dive deeper into its decision 5. **[Receive a webhook](doc:protect-webhook)** whenever Protect updates its decision on any of your submitted images
{"__v":8,"_id":"578c4c0f690f670e006d8887","api":{"auth":"required","examples":{"codes":[]},"params":[{"_id":"578c4dd5bd223d2000cc1449","ref":"","in":"query","required":false,"desc":"the number of images to skip","default":"0","type":"int","name":"offset"},{"_id":"578c4dd5bd223d2000cc1448","ref":"","in":"query","required":false,"desc":"the maximum number of images to return","default":"25","type":"string","name":"limit"},{"_id":"58023b6edbdae72300a05652","ref":"","in":"query","required":false,"desc":"whether or not to only list content owner assets","default":"false","type":"boolean","name":"contentOwnerOnly"},{"_id":"5822294d4af94127005529eb","default":"false","desc":"whether or not to only list content id assets","in":"query","name":"contentIdOnly","ref":"","required":false,"type":"boolean"}],"results":{"codes":[{"name":"","code":"{\n  \"data\": [\n    {\n      \"type\": \"image\",\n      \"id\": \"123\",\n\t    \"url\": \"http://kern.io/images/logo.png\",\n      \"createdAt\": \"2016-07-18T03:31:30.000Z\",\n      \"status\": \"complete\",\n\t    \"name\": \"Kern's Logo\",\n      \"description\": \"A good gibraltar.\",\n      \"detect\": true,\n      \"contentOwner\": false,\n      \"contentId\": null,\n      \"contentIdLabel\": null\n    },\n    {\n      \"type\": \"image\",\n    \t\"id\": \"456\",\n      \"url\": \"https://raw.githubusercontent.com/awentzonline/image-analogies/master/examples/images/trump-image-analogy.jpg\",\n      \"createdAt\": \"2016-07-18T04:20:00.000Z\",\n      \"status\": \"complete\",\n\t    \"name\": \"Trump Analogy\",\n      \"description\": \"Ugh this guy\",\n      \"detect\": false,\n      \"contentOwner\": false,\n      \"contentId\": null,\n      \"contentIdLabel\": null\n    }\n  ]\n}","language":"json","status":200}]},"settings":"578c4c8fd224b51700b83aee","url":"/images"},"body":"List all submitted images. Images are returned in reverse chronological order (latest to oldest).\n\n\n## Response Fields\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**id**\",\n    \"1-0\": \"**url**\",\n    \"1-1\": \"string\",\n    \"0-1\": \"string\",\n    \"6-0\": \"**detect**\",\n    \"6-1\": \"boolean\",\n    \"10-0\": \"**feedback**\",\n    \"10-1\": \"object | null\",\n    \"11-0\": \"**feedback.label**\",\n    \"12-0\": \"**feedback.bounds**\",\n    \"11-1\": \"string\",\n    \"12-1\": \"array of 4 numbers, or null for unbounded\",\n    \"0-2\": \"the image's unique identifier\",\n    \"1-2\": \"the image's url, persisted via Pavlov Protect\",\n    \"6-2\": \"whether or not Pavlov Protect detected infringing content in the image\",\n    \"10-2\": \"user feedback on the image\",\n    \"11-2\": \"a description of the tag\",\n    \"12-2\": \"the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`\",\n    \"2-0\": \"**createdAt**\",\n    \"2-1\": \"ISO 8601 date string\",\n    \"2-2\": \"the time the image was submitted\",\n    \"3-0\": \"**status**\",\n    \"3-1\": \"`\\\"pending\\\"`, `\\\"review\\\"` or `\\\"complete\\\"`\",\n    \"3-2\": \"`\\\"pending\\\"` if Protect is still tagging the image, `\\\"review\\\"` if it is currently under review, `\\\"complete\\\"` when it has finished\",\n    \"4-0\": \"**name**\",\n    \"5-0\": \"**description**\",\n    \"4-1\": \"string\",\n    \"5-1\": \"string\",\n    \"4-2\": \"the image's name\",\n    \"5-2\": \"the image's description\",\n    \"7-0\": \"**contentOwner**\",\n    \"7-1\": \"boolean\",\n    \"7-2\": \"whether or not the image is from a rights-holder\",\n    \"8-0\": \"**contentId**\",\n    \"8-1\": \"string | null\",\n    \"8-2\": \"the id of the matching content id asset\",\n    \"9-0\": \"**contentIdLabel**\",\n    \"9-1\": \"string | null\",\n    \"9-2\": \"the label of the matching content id asset\"\n  },\n  \"cols\": 3,\n  \"rows\": 13\n}\n[/block]","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-07-18T03:25:03.252Z","editedParams2":true,"excerpt":"List all submitted images.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"order":2,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"protect-get-images","sync_unique":"","title":"List all images","type":"get","updates":[],"user":"56afbce8aef9a21700da0e17","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

getList all images

List all submitted images.

Query Params

offset:
integer0
the number of images to skip
limit:
string25
the maximum number of images to return
contentOwnerOnly:
booleanfalse
whether or not to only list content owner assets
contentIdOnly:
booleanfalse
whether or not to only list content id assets
List all submitted images. Images are returned in reverse chronological order (latest to oldest). ## Response Fields [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "**id**", "1-0": "**url**", "1-1": "string", "0-1": "string", "6-0": "**detect**", "6-1": "boolean", "10-0": "**feedback**", "10-1": "object | null", "11-0": "**feedback.label**", "12-0": "**feedback.bounds**", "11-1": "string", "12-1": "array of 4 numbers, or null for unbounded", "0-2": "the image's unique identifier", "1-2": "the image's url, persisted via Pavlov Protect", "6-2": "whether or not Pavlov Protect detected infringing content in the image", "10-2": "user feedback on the image", "11-2": "a description of the tag", "12-2": "the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`", "2-0": "**createdAt**", "2-1": "ISO 8601 date string", "2-2": "the time the image was submitted", "3-0": "**status**", "3-1": "`\"pending\"`, `\"review\"` or `\"complete\"`", "3-2": "`\"pending\"` if Protect is still tagging the image, `\"review\"` if it is currently under review, `\"complete\"` when it has finished", "4-0": "**name**", "5-0": "**description**", "4-1": "string", "5-1": "string", "4-2": "the image's name", "5-2": "the image's description", "7-0": "**contentOwner**", "7-1": "boolean", "7-2": "whether or not the image is from a rights-holder", "8-0": "**contentId**", "8-1": "string | null", "8-2": "the id of the matching content id asset", "9-0": "**contentIdLabel**", "9-1": "string | null", "9-2": "the label of the matching content id asset" }, "cols": 3, "rows": 13 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



List all submitted images. Images are returned in reverse chronological order (latest to oldest). ## Response Fields [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "**id**", "1-0": "**url**", "1-1": "string", "0-1": "string", "6-0": "**detect**", "6-1": "boolean", "10-0": "**feedback**", "10-1": "object | null", "11-0": "**feedback.label**", "12-0": "**feedback.bounds**", "11-1": "string", "12-1": "array of 4 numbers, or null for unbounded", "0-2": "the image's unique identifier", "1-2": "the image's url, persisted via Pavlov Protect", "6-2": "whether or not Pavlov Protect detected infringing content in the image", "10-2": "user feedback on the image", "11-2": "a description of the tag", "12-2": "the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`", "2-0": "**createdAt**", "2-1": "ISO 8601 date string", "2-2": "the time the image was submitted", "3-0": "**status**", "3-1": "`\"pending\"`, `\"review\"` or `\"complete\"`", "3-2": "`\"pending\"` if Protect is still tagging the image, `\"review\"` if it is currently under review, `\"complete\"` when it has finished", "4-0": "**name**", "5-0": "**description**", "4-1": "string", "5-1": "string", "4-2": "the image's name", "5-2": "the image's description", "7-0": "**contentOwner**", "7-1": "boolean", "7-2": "whether or not the image is from a rights-holder", "8-0": "**contentId**", "8-1": "string | null", "8-2": "the id of the matching content id asset", "9-0": "**contentIdLabel**", "9-1": "string | null", "9-2": "the label of the matching content id asset" }, "cols": 3, "rows": 13 } [/block]
{"__v":5,"_id":"578c511a690f670e006d888c","api":{"auth":"required","examples":{"codes":[]},"params":[{"_id":"578c51d7d224b51700b83af8","ref":"","in":"body","required":false,"desc":"the image you want to submit for tagging. *required unless `url` is provided*","default":"","type":"file","name":"image"},{"_id":"578c51d7d224b51700b83af7","ref":"","in":"body","required":false,"desc":"the URL of the image you want to submit for tagging. *required unless `image` is provided*","default":"","type":"string","name":"url"},{"_id":"578c51d7d224b51700b83af5","ref":"","in":"body","required":false,"desc":"an optional name of the image","default":"","type":"string","name":"name"},{"_id":"578c51d7d224b51700b83af4","ref":"","in":"body","required":false,"desc":"an optional description of the image","default":"","type":"string","name":"description"},{"_id":"580234268e57360f00305ae3","ref":"","in":"body","required":false,"desc":"an optional label to tag the image with","default":"","type":"string","name":"label"},{"_id":"580234268e57360f00305ae2","ref":"","in":"body","required":false,"desc":"an optional comma-separated list of 4 integers defining the location of the tag within the image","default":"","type":"array_int","name":"bounds"}],"results":{"codes":[{"status":201,"language":"json","code":"{\n  \"data\": {\n    \"type\": \"image\",\n    \"id\": \"123\",\n    \"url\": \"http://kern.io/images/logo.png\",\n\t\t\"createdAt\": \"2016-07-18T03:31:30.000Z\",\n    \"status\": \"complete\",\n    \"name\": \"Kern's Logo\",\n    \"description\": \"A good gibraltar.\",\n    \"detect\": true,\n    \"contentOwner\": false,\n    \"contentId\": null,\n    \"contentIdLabel\": null\n  }\n}","name":""}]},"settings":"578c4c8fd224b51700b83aee","url":"/images"},"body":"Submits a new image for tagging. The tags are returned in the response body.\n\nImages are downsampled to fit within a 512x512 pixel box and stored. The maximum image size accepted is 25MiB. PNG, JPG, and TIFF formats are all acceptable.\n\n## Response Fields\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**id**\",\n    \"1-0\": \"**url**\",\n    \"1-1\": \"string\",\n    \"0-1\": \"string\",\n    \"6-0\": \"**detect**\",\n    \"6-1\": \"boolean\",\n    \"10-0\": \"**feedback**\",\n    \"10-1\": \"object | null\",\n    \"11-0\": \"**feedback.label**\",\n    \"12-0\": \"**feedback.bounds**\",\n    \"11-1\": \"string\",\n    \"12-1\": \"array of 4 numbers, or null for unbounded\",\n    \"0-2\": \"the image's unique identifier\",\n    \"1-2\": \"the image's url, persisted via Pavlov Protect\",\n    \"6-2\": \"whether or not Pavlov Protect detected infringing content in the image\",\n    \"10-2\": \"user feedback on the image\",\n    \"11-2\": \"a description of the tag\",\n    \"12-2\": \"the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`\",\n    \"2-0\": \"**createdAt**\",\n    \"2-1\": \"ISO 8601 date string\",\n    \"2-2\": \"the time the image was submitted\",\n    \"3-0\": \"**status**\",\n    \"3-1\": \"`\\\"pending\\\"`, `\\\"review\\\"` or `\\\"complete\\\"`\",\n    \"3-2\": \"`\\\"pending\\\"` if Protect is still tagging the image, `\\\"review\\\"` if it is currently under review, `\\\"complete\\\"` when it has finished\",\n    \"4-0\": \"**name**\",\n    \"5-0\": \"**description**\",\n    \"4-1\": \"string\",\n    \"5-1\": \"string\",\n    \"4-2\": \"the image's name\",\n    \"5-2\": \"the image's description\",\n    \"7-0\": \"**contentOwner**\",\n    \"7-1\": \"boolean\",\n    \"7-2\": \"whether or not the image is from a rights-holder\",\n    \"8-0\": \"**contentId**\",\n    \"9-0\": \"**contentIdLabel**\",\n    \"9-1\": \"string | null\",\n    \"8-1\": \"string | null\",\n    \"8-2\": \"the id of the matching content id asset\",\n    \"9-2\": \"the label of the matching content id asset\"\n  },\n  \"cols\": 3,\n  \"rows\": 13\n}\n[/block]","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-07-18T03:46:34.451Z","editedParams2":true,"excerpt":"Submit an image for detection.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"order":3,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"protect-post-images","sync_unique":"","title":"Detect in an image","type":"post","updates":[],"user":"56afbce8aef9a21700da0e17","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

postDetect in an image

Submit an image for detection.

Body Params

image:
file
the image you want to submit for tagging. *required unless `url` is provided*
url:
string
the URL of the image you want to submit for tagging. *required unless `image` is provided*
name:
string
an optional name of the image
description:
string
an optional description of the image
label:
string
an optional label to tag the image with
bounds:
array of integers
an optional comma-separated list of 4 integers defining the location of the tag within the image
Submits a new image for tagging. The tags are returned in the response body. Images are downsampled to fit within a 512x512 pixel box and stored. The maximum image size accepted is 25MiB. PNG, JPG, and TIFF formats are all acceptable. ## Response Fields [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "**id**", "1-0": "**url**", "1-1": "string", "0-1": "string", "6-0": "**detect**", "6-1": "boolean", "10-0": "**feedback**", "10-1": "object | null", "11-0": "**feedback.label**", "12-0": "**feedback.bounds**", "11-1": "string", "12-1": "array of 4 numbers, or null for unbounded", "0-2": "the image's unique identifier", "1-2": "the image's url, persisted via Pavlov Protect", "6-2": "whether or not Pavlov Protect detected infringing content in the image", "10-2": "user feedback on the image", "11-2": "a description of the tag", "12-2": "the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`", "2-0": "**createdAt**", "2-1": "ISO 8601 date string", "2-2": "the time the image was submitted", "3-0": "**status**", "3-1": "`\"pending\"`, `\"review\"` or `\"complete\"`", "3-2": "`\"pending\"` if Protect is still tagging the image, `\"review\"` if it is currently under review, `\"complete\"` when it has finished", "4-0": "**name**", "5-0": "**description**", "4-1": "string", "5-1": "string", "4-2": "the image's name", "5-2": "the image's description", "7-0": "**contentOwner**", "7-1": "boolean", "7-2": "whether or not the image is from a rights-holder", "8-0": "**contentId**", "9-0": "**contentIdLabel**", "9-1": "string | null", "8-1": "string | null", "8-2": "the id of the matching content id asset", "9-2": "the label of the matching content id asset" }, "cols": 3, "rows": 13 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Submits a new image for tagging. The tags are returned in the response body. Images are downsampled to fit within a 512x512 pixel box and stored. The maximum image size accepted is 25MiB. PNG, JPG, and TIFF formats are all acceptable. ## Response Fields [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "**id**", "1-0": "**url**", "1-1": "string", "0-1": "string", "6-0": "**detect**", "6-1": "boolean", "10-0": "**feedback**", "10-1": "object | null", "11-0": "**feedback.label**", "12-0": "**feedback.bounds**", "11-1": "string", "12-1": "array of 4 numbers, or null for unbounded", "0-2": "the image's unique identifier", "1-2": "the image's url, persisted via Pavlov Protect", "6-2": "whether or not Pavlov Protect detected infringing content in the image", "10-2": "user feedback on the image", "11-2": "a description of the tag", "12-2": "the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`", "2-0": "**createdAt**", "2-1": "ISO 8601 date string", "2-2": "the time the image was submitted", "3-0": "**status**", "3-1": "`\"pending\"`, `\"review\"` or `\"complete\"`", "3-2": "`\"pending\"` if Protect is still tagging the image, `\"review\"` if it is currently under review, `\"complete\"` when it has finished", "4-0": "**name**", "5-0": "**description**", "4-1": "string", "5-1": "string", "4-2": "the image's name", "5-2": "the image's description", "7-0": "**contentOwner**", "7-1": "boolean", "7-2": "whether or not the image is from a rights-holder", "8-0": "**contentId**", "9-0": "**contentIdLabel**", "9-1": "string | null", "8-1": "string | null", "8-2": "the id of the matching content id asset", "9-2": "the label of the matching content id asset" }, "cols": 3, "rows": 13 } [/block]
{"__v":4,"_id":"578c535ebd223d2000cc1457","api":{"auth":"required","examples":{"codes":[]},"params":[{"_id":"578d4303bd9f40200058dd46","default":"","desc":"the image's unique identifier","in":"path","name":":id","ref":"","required":true,"type":"string"}],"results":{"codes":[{"name":"","code":"{\n  \"data\": {\n    \"type\": \"image\",\n    \"id\": \"123\",\n    \"url\": \"http://kern.io/images/logo.png\",\n\t\t\"createdAt\": \"2016-07-18T03:31:30.000Z\",\n    \"status\": \"complete\",\n    \"name\": \"Kern's Logo\",\n    \"description\": \"A good gibraltar.\",\n    \"detect\": true,\n    \"contentOwner\": true,\n    \"contentId\": null,\n    \"contentIdLabel\": null\n  }\n}","language":"json","status":200}]},"settings":"578c4c8fd224b51700b83aee","url":"/images/:id"},"body":"Retrieves the URL, tags, name, description, and detection result of a previously submitted image.\n\n## Response Fields\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**id**\",\n    \"1-0\": \"**url**\",\n    \"1-1\": \"string\",\n    \"0-1\": \"string\",\n    \"6-0\": \"**detect**\",\n    \"6-1\": \"boolean\",\n    \"10-0\": \"**feedback**\",\n    \"10-1\": \"object | null\",\n    \"11-0\": \"**feedback.label**\",\n    \"12-0\": \"**feedback.bounds**\",\n    \"11-1\": \"string\",\n    \"12-1\": \"array of 4 numbers, or null for unbounded\",\n    \"0-2\": \"the image's unique identifier\",\n    \"1-2\": \"the image's url, persisted via Pavlov Protect\",\n    \"6-2\": \"whether or not Pavlov Protect detected infringing content in the image\",\n    \"10-2\": \"user feedback on the image\",\n    \"11-2\": \"a description of the tag\",\n    \"12-2\": \"the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`\",\n    \"2-0\": \"**createdAt**\",\n    \"2-1\": \"ISO 8601 date string\",\n    \"2-2\": \"the time the image was submitted\",\n    \"3-0\": \"**status**\",\n    \"3-1\": \"`\\\"pending\\\"`, `\\\"review\\\"` or `\\\"complete\\\"`\",\n    \"3-2\": \"`\\\"pending\\\"` if Protect is still tagging the image, `\\\"review\\\"` if it is currently under review, `\\\"complete\\\"` when it has finished\",\n    \"4-0\": \"**name**\",\n    \"5-0\": \"**description**\",\n    \"4-1\": \"string\",\n    \"5-1\": \"string\",\n    \"4-2\": \"the image's name\",\n    \"5-2\": \"the image's description\",\n    \"7-0\": \"**contentOwner**\",\n    \"7-1\": \"boolean\",\n    \"7-2\": \"whether or not the image is from a rights-holder\",\n    \"8-0\": \"**contentId**\",\n    \"9-0\": \"**contentIdLabel**\",\n    \"8-1\": \"string | null\",\n    \"9-1\": \"string | null\",\n    \"9-2\": \"the label of the matching content id asset\",\n    \"8-2\": \"the id of the matching content id asset\"\n  },\n  \"cols\": 3,\n  \"rows\": 13\n}\n[/block]","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-07-18T03:56:14.912Z","excerpt":"Retrieves tags of a submitted image.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"order":4,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"protect-get-images-id","sync_unique":"","title":"Retrieve an image","type":"get","updates":[],"user":"56afbce8aef9a21700da0e17","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

getRetrieve an image

Retrieves tags of a submitted image.

Path Params

id:
required
string
the image's unique identifier
Retrieves the URL, tags, name, description, and detection result of a previously submitted image. ## Response Fields [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "**id**", "1-0": "**url**", "1-1": "string", "0-1": "string", "6-0": "**detect**", "6-1": "boolean", "10-0": "**feedback**", "10-1": "object | null", "11-0": "**feedback.label**", "12-0": "**feedback.bounds**", "11-1": "string", "12-1": "array of 4 numbers, or null for unbounded", "0-2": "the image's unique identifier", "1-2": "the image's url, persisted via Pavlov Protect", "6-2": "whether or not Pavlov Protect detected infringing content in the image", "10-2": "user feedback on the image", "11-2": "a description of the tag", "12-2": "the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`", "2-0": "**createdAt**", "2-1": "ISO 8601 date string", "2-2": "the time the image was submitted", "3-0": "**status**", "3-1": "`\"pending\"`, `\"review\"` or `\"complete\"`", "3-2": "`\"pending\"` if Protect is still tagging the image, `\"review\"` if it is currently under review, `\"complete\"` when it has finished", "4-0": "**name**", "5-0": "**description**", "4-1": "string", "5-1": "string", "4-2": "the image's name", "5-2": "the image's description", "7-0": "**contentOwner**", "7-1": "boolean", "7-2": "whether or not the image is from a rights-holder", "8-0": "**contentId**", "9-0": "**contentIdLabel**", "8-1": "string | null", "9-1": "string | null", "9-2": "the label of the matching content id asset", "8-2": "the id of the matching content id asset" }, "cols": 3, "rows": 13 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Retrieves the URL, tags, name, description, and detection result of a previously submitted image. ## Response Fields [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "**id**", "1-0": "**url**", "1-1": "string", "0-1": "string", "6-0": "**detect**", "6-1": "boolean", "10-0": "**feedback**", "10-1": "object | null", "11-0": "**feedback.label**", "12-0": "**feedback.bounds**", "11-1": "string", "12-1": "array of 4 numbers, or null for unbounded", "0-2": "the image's unique identifier", "1-2": "the image's url, persisted via Pavlov Protect", "6-2": "whether or not Pavlov Protect detected infringing content in the image", "10-2": "user feedback on the image", "11-2": "a description of the tag", "12-2": "the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`", "2-0": "**createdAt**", "2-1": "ISO 8601 date string", "2-2": "the time the image was submitted", "3-0": "**status**", "3-1": "`\"pending\"`, `\"review\"` or `\"complete\"`", "3-2": "`\"pending\"` if Protect is still tagging the image, `\"review\"` if it is currently under review, `\"complete\"` when it has finished", "4-0": "**name**", "5-0": "**description**", "4-1": "string", "5-1": "string", "4-2": "the image's name", "5-2": "the image's description", "7-0": "**contentOwner**", "7-1": "boolean", "7-2": "whether or not the image is from a rights-holder", "8-0": "**contentId**", "9-0": "**contentIdLabel**", "8-1": "string | null", "9-1": "string | null", "9-2": "the label of the matching content id asset", "8-2": "the id of the matching content id asset" }, "cols": 3, "rows": 13 } [/block]
{"__v":2,"_id":"578c5383bb7d810e00e01c4c","api":{"auth":"required","examples":{"codes":[]},"params":[{"_id":"578d473e9a98a41900717e20","default":"","desc":"the image's unique identifier","in":"path","name":":id","ref":"","required":true,"type":"string"},{"_id":"578d473e9a98a41900717e1f","default":"","desc":"the label to tag the image with. if not provided, the image is marked as having no detection","in":"body","name":"label","ref":"","required":true,"type":"string"},{"_id":"578d473e9a98a41900717e1e","default":"","desc":"comma-separated list of 4 integers defining the location of the tag within the image. if null, the tag is unbounded","in":"body","name":"bounds","ref":"","required":false,"type":"array_int"}],"results":{"codes":[{"name":"","code":"{\n  \"data\": true\n}","language":"json","status":202}]},"settings":"578c4c8fd224b51700b83aee","url":"/images/:id/feedback"},"body":"Provides Protect with feedback on a previously submitted image.","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-07-18T03:56:51.064Z","excerpt":"Provide feedback on an image's detection decision.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"spot-post-images-id-feedback","sync_unique":"","title":"Provide feedback","type":"post","updates":[],"user":"56afbce8aef9a21700da0e17","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

postProvide feedback

Provide feedback on an image's detection decision.

Path Params

id:
required
string
the image's unique identifier

Body Params

label:
required
string
the label to tag the image with. if not provided, the image is marked as having no detection
bounds:
array of integers
comma-separated list of 4 integers defining the location of the tag within the image. if null, the tag is unbounded
Provides Protect with feedback on a previously submitted image.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Provides Protect with feedback on a previously submitted image.
{"__v":1,"_id":"57fd88354defec0e00642275","api":{"auth":"required","examples":{"codes":[]},"params":[{"_id":"578d473e9a98a41900717e20","ref":"","in":"path","required":true,"desc":"the image's unique identifier","default":"","type":"string","name":":id"}],"results":{"codes":[{"name":"","code":"{\n  \"data\": true\n}","language":"json","status":200}]},"settings":"578c4c8fd224b51700b83aee","url":"/images/:id/feedback"},"body":"Notifies Protect to remove feedback provided on a previously submitted image.","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-10-12T00:47:49.443Z","excerpt":"Remove feedback on an image's detection decision.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"remove-feedback","sync_unique":"","title":"Remove feedback","type":"delete","updates":[],"user":"57a2443a5220910e002a17fd","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

deleteRemove feedback

Remove feedback on an image's detection decision.

Path Params

id:
required
string
the image's unique identifier
Notifies Protect to remove feedback provided on a previously submitted image.

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Notifies Protect to remove feedback provided on a previously submitted image.
{"__v":1,"_id":"57f2ca3d64c01c2d00f811eb","api":{"auth":"required","examples":{"codes":[]},"params":[{"_id":"57f2ce9696aed10e00dcc68b","default":"","desc":"the image's unique identifier","in":"path","name":":id","ref":"","required":true,"type":"string"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\": true\n}","name":""}]},"settings":"578c4c8fd224b51700b83aee","url":"/images/:id/review"},"body":"Ask Pavlov Protect to review the image's detection. If your account has a webhook configured, it will be called when the review has completed.","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-10-03T21:14:37.058Z","excerpt":"Ask Pavlov Protect to review the image's detection result.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","order":7,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"protect-post-review-detection","sync_unique":"","title":"Request review","type":"post","updates":[],"user":"57a2443a5220910e002a17fd","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

postRequest review

Ask Pavlov Protect to review the image's detection result.

Path Params

id:
required
string
the image's unique identifier
Ask Pavlov Protect to review the image's detection. If your account has a webhook configured, it will be called when the review has completed.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Ask Pavlov Protect to review the image's detection. If your account has a webhook configured, it will be called when the review has completed.
{"__v":3,"_id":"58092625a0c3150f00ae46ef","api":{"auth":"required","examples":{"codes":[]},"params":[{"_id":"58092708a0c3150f00ae46f5","ref":"","in":"body","required":false,"desc":"the image you want to submit for tagging. *required unless `url` is provided*","default":"","type":"file","name":"image"},{"_id":"58092708a0c3150f00ae46f4","ref":"","in":"body","required":false,"desc":"the URL of the image you want to submit for tagging. *required unless `image` is provided*","default":"","type":"string","name":"url"},{"_id":"58092708a0c3150f00ae46f3","default":"","desc":"a label to tag the asset with (marked as clear if blank)","in":"body","name":"label","ref":"","required":true,"type":"string"},{"_id":"58092708a0c3150f00ae46f2","ref":"","in":"body","required":false,"desc":"an optional comma-separated list of 4 integers defining the location of the tag within the image","default":"","type":"array_int","name":"bounds"},{"_id":"5821823409de110f0054e2b2","default":"false","desc":"indicates the asset is from a rights holder","in":"body","name":"contentOwner","ref":"","required":false,"type":"boolean"},{"_id":"5821823409de110f0054e2b1","default":"false","desc":"marks the asset as a content id asset (i.e. its label is returned if matched)","in":"body","name":"contentId","ref":"","required":false,"type":"boolean"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\": {\n    \"id\": \"1234567890\"\n  }\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"578c4c8fd224b51700b83aee","url":"/submit"},"body":"Tags an asset for future detections.\n\nThere are flags for special kinds of assets:\n\n**contentOwner** - indicates the asset is from a rights holder\n**contentId** - marks the asset as a content id asset (i.e. its label is returned if matched)\n\nImages are downsampled to fit within a 512x512 pixel box and stored. The maximum image size accepted is 25MiB. PNG, JPG, and TIFF formats are all acceptable.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Public password recommended\",\n  \"body\": \"Assets may be submitted through this endpoint using your username and public password. Your public password can be distributed with your client code so that rights holders may submit their assets directly through your rights-holder interface portal.\"\n}\n[/block]\n## Response Fields\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**id**\",\n    \"1-0\": \"**image.url**\",\n    \"1-1\": \"string\",\n    \"0-1\": \"string\",\n    \"6-0\": \"**image.detect**\",\n    \"6-1\": \"boolean\",\n    \"8-0\": \"**image.feedback**\",\n    \"8-1\": \"object | null\",\n    \"9-0\": \"**image.feedback.label**\",\n    \"10-0\": \"**image.feedback.bounds**\",\n    \"9-1\": \"string\",\n    \"10-1\": \"array of 4 numbers, or null for unbounded\",\n    \"0-2\": \"the image's unique identifier\",\n    \"1-2\": \"the image's url, persisted via Pavlov Protect\",\n    \"6-2\": \"whether or not Pavlov Protect detected infringing content in the image\",\n    \"8-2\": \"user feedback on the image\",\n    \"9-2\": \"a description of the tag\",\n    \"10-2\": \"the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`\",\n    \"2-0\": \"**image.createdAt**\",\n    \"2-1\": \"ISO 8601 date string\",\n    \"2-2\": \"the time the image was submitted\",\n    \"3-0\": \"**image.status**\",\n    \"3-1\": \"`\\\"pending\\\"`, `\\\"review\\\"` or `\\\"complete\\\"`\",\n    \"3-2\": \"`\\\"pending\\\"` if Protect is still tagging the image, `\\\"review\\\"` if it is currently under review, `\\\"complete\\\"` when it has finished\",\n    \"4-0\": \"**image.name**\",\n    \"5-0\": \"**image.description**\",\n    \"4-1\": \"string\",\n    \"5-1\": \"string\",\n    \"4-2\": \"the image's name\",\n    \"5-2\": \"the image's description\",\n    \"7-0\": \"**image.originalAsset**\",\n    \"7-1\": \"boolean\",\n    \"7-2\": \"whether or not the image is from a rights-holder\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-10-20T20:16:37.447Z","excerpt":"Tags an asset for future detections.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"order":8,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"submit-an-original-asset","sync_unique":"","title":"Submit an asset","type":"post","updates":[],"user":"57a2443a5220910e002a17fd","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

postSubmit an asset

Tags an asset for future detections.

Body Params

image:
file
the image you want to submit for tagging. *required unless `url` is provided*
url:
string
the URL of the image you want to submit for tagging. *required unless `image` is provided*
label:
required
string
a label to tag the asset with (marked as clear if blank)
bounds:
array of integers
an optional comma-separated list of 4 integers defining the location of the tag within the image
contentOwner:
booleanfalse
indicates the asset is from a rights holder
contentId:
booleanfalse
marks the asset as a content id asset (i.e. its label is returned if matched)
Tags an asset for future detections. There are flags for special kinds of assets: **contentOwner** - indicates the asset is from a rights holder **contentId** - marks the asset as a content id asset (i.e. its label is returned if matched) Images are downsampled to fit within a 512x512 pixel box and stored. The maximum image size accepted is 25MiB. PNG, JPG, and TIFF formats are all acceptable. [block:callout] { "type": "warning", "title": "Public password recommended", "body": "Assets may be submitted through this endpoint using your username and public password. Your public password can be distributed with your client code so that rights holders may submit their assets directly through your rights-holder interface portal." } [/block] ## Response Fields [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "**id**", "1-0": "**image.url**", "1-1": "string", "0-1": "string", "6-0": "**image.detect**", "6-1": "boolean", "8-0": "**image.feedback**", "8-1": "object | null", "9-0": "**image.feedback.label**", "10-0": "**image.feedback.bounds**", "9-1": "string", "10-1": "array of 4 numbers, or null for unbounded", "0-2": "the image's unique identifier", "1-2": "the image's url, persisted via Pavlov Protect", "6-2": "whether or not Pavlov Protect detected infringing content in the image", "8-2": "user feedback on the image", "9-2": "a description of the tag", "10-2": "the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`", "2-0": "**image.createdAt**", "2-1": "ISO 8601 date string", "2-2": "the time the image was submitted", "3-0": "**image.status**", "3-1": "`\"pending\"`, `\"review\"` or `\"complete\"`", "3-2": "`\"pending\"` if Protect is still tagging the image, `\"review\"` if it is currently under review, `\"complete\"` when it has finished", "4-0": "**image.name**", "5-0": "**image.description**", "4-1": "string", "5-1": "string", "4-2": "the image's name", "5-2": "the image's description", "7-0": "**image.originalAsset**", "7-1": "boolean", "7-2": "whether or not the image is from a rights-holder" }, "cols": 3, "rows": 1 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Tags an asset for future detections. There are flags for special kinds of assets: **contentOwner** - indicates the asset is from a rights holder **contentId** - marks the asset as a content id asset (i.e. its label is returned if matched) Images are downsampled to fit within a 512x512 pixel box and stored. The maximum image size accepted is 25MiB. PNG, JPG, and TIFF formats are all acceptable. [block:callout] { "type": "warning", "title": "Public password recommended", "body": "Assets may be submitted through this endpoint using your username and public password. Your public password can be distributed with your client code so that rights holders may submit their assets directly through your rights-holder interface portal." } [/block] ## Response Fields [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "**id**", "1-0": "**image.url**", "1-1": "string", "0-1": "string", "6-0": "**image.detect**", "6-1": "boolean", "8-0": "**image.feedback**", "8-1": "object | null", "9-0": "**image.feedback.label**", "10-0": "**image.feedback.bounds**", "9-1": "string", "10-1": "array of 4 numbers, or null for unbounded", "0-2": "the image's unique identifier", "1-2": "the image's url, persisted via Pavlov Protect", "6-2": "whether or not Pavlov Protect detected infringing content in the image", "8-2": "user feedback on the image", "9-2": "a description of the tag", "10-2": "the bounds of the tag in the images as 2 points: `[x1, y1, x2, y2]`", "2-0": "**image.createdAt**", "2-1": "ISO 8601 date string", "2-2": "the time the image was submitted", "3-0": "**image.status**", "3-1": "`\"pending\"`, `\"review\"` or `\"complete\"`", "3-2": "`\"pending\"` if Protect is still tagging the image, `\"review\"` if it is currently under review, `\"complete\"` when it has finished", "4-0": "**image.name**", "5-0": "**image.description**", "4-1": "string", "5-1": "string", "4-2": "the image's name", "5-2": "the image's description", "7-0": "**image.originalAsset**", "7-1": "boolean", "7-2": "whether or not the image is from a rights-holder" }, "cols": 3, "rows": 1 } [/block]
{"__v":0,"_id":"57f2d45f96aed10e00dcc697","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Set up webhooks on your account\",\n  \"body\": \"[Contact us](mailto:founders@usepavlov.com) if you'd like to receive a webhook whenever the detection decisions on your images change.\"\n}\n[/block]\nPavlov Protect will perform an *HTTP POST* request to a URL of your choice whenever it updates its decision on any of your submitted images, including when you provide feedback and when a review has completed. The body of the request is identical to the response when you [retrieve an image](doc:protect-get-images-id).","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-10-03T21:57:51.732Z","excerpt":"Receive an HTTP POST when whenever Protect updates its decision on any of your submitted images.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","order":9,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"protect-webhook","sync_unique":"","title":"Webhook","type":"basic","updates":[],"user":"57a2443a5220910e002a17fd","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

Webhook

Receive an HTTP POST when whenever Protect updates its decision on any of your submitted images.

[block:callout] { "type": "success", "title": "Set up webhooks on your account", "body": "[Contact us](mailto:founders@usepavlov.com) if you'd like to receive a webhook whenever the detection decisions on your images change." } [/block] Pavlov Protect will perform an *HTTP POST* request to a URL of your choice whenever it updates its decision on any of your submitted images, including when you provide feedback and when a review has completed. The body of the request is identical to the response when you [retrieve an image](doc:protect-get-images-id).
[block:callout] { "type": "success", "title": "Set up webhooks on your account", "body": "[Contact us](mailto:founders@usepavlov.com) if you'd like to receive a webhook whenever the detection decisions on your images change." } [/block] Pavlov Protect will perform an *HTTP POST* request to a URL of your choice whenever it updates its decision on any of your submitted images, including when you provide feedback and when a review has completed. The body of the request is identical to the response when you [retrieve an image](doc:protect-get-images-id).
{"__v":1,"_id":"57b265442b27c50e0096abae","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Errors are exposed under the top-level `\"errors\"` array of the JSON response. It will only be present in the event of an error and the absence of the `\"data\"` field. All errors have a message, and potentially other information about why the request failed.\n\n## Errors\n\n* **400 Bad Request:** Missing required arguments or arguments have an invalid format\n* **401 Unauthorized:** Username/password combination is incorrect\n* **404 Not Found:** Page or image at the given URL cannot be found\n* **500 Internal Server Error:** Something went wrong on our end, please [contact us](mailto:team@pavlov.ai)\n\n## Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"errors\\\": [\\n    {\\n      \\\"message\\\": \\\"not found\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"name\": null\n    }\n  ]\n}\n[/block]","category":"578964b2d7bf751900e3cbb9","createdAt":"2016-08-16T00:58:44.823Z","excerpt":"","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"order":10,"parentDoc":null,"project":"560dcecc8e6f870d004e3e86","slug":"errors","sync_unique":"","title":"Handling errors","type":"basic","updates":[],"user":"57a2443a5220910e002a17fd","version":"560dcecd8e6f870d004e3e89","childrenPages":[]}

Handling errors


Errors are exposed under the top-level `"errors"` array of the JSON response. It will only be present in the event of an error and the absence of the `"data"` field. All errors have a message, and potentially other information about why the request failed. ## Errors * **400 Bad Request:** Missing required arguments or arguments have an invalid format * **401 Unauthorized:** Username/password combination is incorrect * **404 Not Found:** Page or image at the given URL cannot be found * **500 Internal Server Error:** Something went wrong on our end, please [contact us](mailto:team@pavlov.ai) ## Example [block:code] { "codes": [ { "code": "{\n \"errors\": [\n {\n \"message\": \"not found\"\n }\n ]\n}", "language": "json", "name": null } ] } [/block]
Errors are exposed under the top-level `"errors"` array of the JSON response. It will only be present in the event of an error and the absence of the `"data"` field. All errors have a message, and potentially other information about why the request failed. ## Errors * **400 Bad Request:** Missing required arguments or arguments have an invalid format * **401 Unauthorized:** Username/password combination is incorrect * **404 Not Found:** Page or image at the given URL cannot be found * **500 Internal Server Error:** Something went wrong on our end, please [contact us](mailto:team@pavlov.ai) ## Example [block:code] { "codes": [ { "code": "{\n \"errors\": [\n {\n \"message\": \"not found\"\n }\n ]\n}", "language": "json", "name": null } ] } [/block]