openapi: 3.0.0 info: title: URL API Reference Add-Ons Webhook API version: '2022-11-28' description: 'Every uploaded file is immediately available on the Uploadcare CDN. The CDN includes on-the-fly processing features and can work as a proxy. ## API endpoints Access files in Uploadcare CDN at `ucarecdn.com` over HTTP/HTTPS like this: ```https://ucarecdn.com/:uuid/``` You can add CDN operations by including directives in the CDN URL: ```https://ucarecdn.com/:uuid/-/:operation/:params/:filename``` * `:uuid` stands for the unique file identifier, UUID, assigned on upload. * `/-/` is a mandatory parsing delimiter to divide operations and other path components. * `:operation/:params/` is a CDN operation directive with parameters. * `:filename` is an optional filename you can add after a trailing slash /. You can stack two and more operations like this: ```-/:operation/:params/-/:operation/:params/``` ' contact: name: API support email: help@uploadcare.com x-logo: url: https://ucarecdn.com/12e3af14-392d-416f-8542-f210c2eb6ec4/logourlapi.svg backgroundColor: '#fafafa' altText: Uploadcare URL API Reference x-meta: title: URL API Reference — Uploadcare description: A reference documentation for the Uploadcare's URL API. servers: - url: https://ucarecdn.com description: Production server tags: - name: Webhook paths: /webhooks/: get: summary: List of webhooks description: List of project webhooks. tags: - Webhook operationId: webhooksList parameters: - $ref: '#/components/parameters/acceptHeader' responses: '200': description: List of project webhooks. content: application/json: schema: type: array items: $ref: '#/components/schemas/webhook_of_list_response' '400': description: Simple HTTP Auth or webhook permission errors. content: application/json: schema: oneOf: - $ref: '#/components/schemas/simpleAuthHTTPForbidden' - $ref: '#/components/schemas/cantUseWebhooksError' examples: Authentication Error: $ref: '#/components/examples/simpleAuthHTTPForbidden' Permission Error: $ref: '#/components/examples/cantUseWebhooksError' '401': $ref: '#/components/responses/authorizationProblemsResponse' '406': $ref: '#/components/responses/invalidAcceptHeader' '429': $ref: '#/components/responses/requestWasThrottledError' x-codeSamples: - lang: JavaScript label: JS source: "import {\n listOfWebhooks,\n UploadcareSimpleAuthSchema,\n} from '@uploadcare/rest-client';\n\nconst uploadcareSimpleAuthSchema = new UploadcareSimpleAuthSchema({\n publicKey: 'YOUR_PUBLIC_KEY',\n secretKey: 'YOUR_SECRET_KEY',\n});\n\nconst result = await listOfWebhooks({}, { authSchema: uploadcareSimpleAuthSchema })\n" - lang: PHP label: PHP source: "webhook();\nforeach ($api->listWebhooks() as $webhook) {\n \\sprintf(\"Webhook with url %s is %s\\n\", $webhook->getTargetUrl(), $webhook->isActive() ? 'active' : 'not active');\n}\n" - lang: Python label: Python source: "from pyuploadcare import Uploadcare, Webhook\nuploadcare = Uploadcare(public_key='YOUR_PUBLIC_KEY', secret_key='YOUR_SECRET_KEY')\n\nwebhooks: list[Webhook] = list(uploadcare.list_webhooks(limit=10))\nfor w in webhooks:\n print(w.id)\n" - lang: Ruby label: Ruby source: 'require ''uploadcare'' Uploadcare.config.public_key = ''YOUR_PUBLIC_KEY'' Uploadcare.config.secret_key = ''YOUR_SECRET_KEY'' webhooks = Uploadcare::Webhook.list webhooks.each { |webhook| puts webhook.inspect } ' - lang: Swift label: Swift source: "import Uploadcare\n\nlet uploadcare = Uploadcare(withPublicKey: \"YOUR_PUBLIC_KEY\", secretKey: \"YOUR_SECRET_KEY\")\n\nlet webhooks = try await uploadcare.getListOfWebhooks()\nfor webhook in webhooks {\n print(webhook)\n}\n" - lang: Kotlin label: Kotlin source: 'import com.uploadcare.android.library.api.UploadcareClient val uploadcare = UploadcareClient(publicKey = "YOUR_PUBLIC_KEY", secretKey = "YOUR_SECRET_KEY") val webhooks = uploadcare.getWebhooks() Log.d("TAG", webhooks.toString()) ' post: summary: Create webhook description: Create and subscribe to a webhook. You can use webhooks to receive notifications about your uploads. For instance, once a file gets uploaded to your project, we can notify you by sending a message to a target URL. operationId: webhookCreate parameters: - $ref: '#/components/parameters/acceptHeader' tags: - Webhook requestBody: required: true content: application/x-www-form-urlencoded: schema: required: - target_url - event type: object properties: target_url: $ref: '#/components/schemas/webhook_target' event: $ref: '#/components/schemas/webhook_event' is_active: $ref: '#/components/schemas/webhook_is_active' signing_secret: $ref: '#/components/schemas/webhook_signing_secret' version: $ref: '#/components/schemas/webhook_version_of_request' callbacks: file-uploaded: '{$request.body#/target_url}': post: summary: file.uploaded event payload description: file.uploaded event payload parameters: - $ref: '#/components/parameters/webhookSignature' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/webhookFilePayload' responses: 2XX: description: Webhook has been received successfully file-infected: '{$request.body#/target_url}': post: summary: file.infected event payload description: file.infected event payload parameters: - $ref: '#/components/parameters/webhookSignature' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/webhookFilePayload' responses: 2XX: description: Webhook has been received successfully file-stored: '{$request.body#/target_url}': post: summary: file.stored event payload description: file.stored event payload parameters: - $ref: '#/components/parameters/webhookSignature' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/webhookFilePayload' responses: 2XX: description: Webhook has been received successfully file-deleted: '{$request.body#/target_url}': post: summary: file.deleted event payload description: file.deleted event payload parameters: - $ref: '#/components/parameters/webhookSignature' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/webhookFilePayload' responses: 2XX: description: Webhook has been received successfully file-info-updated: '{$request.body#/target_url}': post: summary: file.info_updated event payload description: file.info_updated event payload parameters: - $ref: '#/components/parameters/webhookSignature' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/webhookFileInfoUpdatedPayload' responses: 2XX: description: Webhook has been received successfully responses: '201': description: Webhook successfully created. content: application/json: schema: $ref: '#/components/schemas/webhook_of_list_response' '400': description: Simple HTTP Auth or webhook permission or endpoint errors. content: application/json: schema: oneOf: - $ref: '#/components/schemas/simpleAuthHTTPForbidden' - $ref: '#/components/schemas/cantUseWebhooksError' - $ref: '#/components/schemas/webhookTargetUrlError' examples: Authentication Error: $ref: '#/components/examples/simpleAuthHTTPForbidden' Permission Error: $ref: '#/components/examples/cantUseWebhooksError' Target URL Error: $ref: '#/components/examples/webhookTargetUrlError' '401': $ref: '#/components/responses/authorizationProblemsResponse' '406': $ref: '#/components/responses/invalidAcceptHeader' '429': $ref: '#/components/responses/requestWasThrottledError' x-codeSamples: - lang: JavaScript label: JS source: "import {\n createWebhook,\n UploadcareSimpleAuthSchema,\n} from '@uploadcare/rest-client';\n\nconst uploadcareSimpleAuthSchema = new UploadcareSimpleAuthSchema({\n publicKey: 'YOUR_PUBLIC_KEY',\n secretKey: 'YOUR_SECRET_KEY',\n});\n\nconst result = await createWebhook(\n {\n targetUrl: 'https://yourwebhook.com',\n event: 'file.uploaded',\n isActive: true,\n },\n { authSchema: uploadcareSimpleAuthSchema }\n)\n" - lang: PHP label: PHP source: 'webhook(); $result = $api->createWebhook(''https://yourwebhook.com'', true, ''sign-secret'', ''file.uploaded''); echo \sprintf(''Webhook %s created'', $result->getId()); ' - lang: Python label: Python source: "from pyuploadcare import Uploadcare, Webhook\nuploadcare = Uploadcare(public_key='YOUR_PUBLIC_KEY', secret_key='YOUR_SECRET_KEY')\n\nwebhook = uploadcare.webhooks_api.create(\n {\n \"event\": \"file.uploaded\",\n \"target_url\": \"https://yourwebhook.com\",\n \"is_active\": True,\n }\n)\nprint(webhook)\n" - lang: Ruby label: Ruby source: "require 'uploadcare'\nUploadcare.config.public_key = 'YOUR_PUBLIC_KEY'\nUploadcare.config.secret_key = 'YOUR_SECRET_KEY'\n\noptions = {\n target_url: 'https://yourwebhook.com',\n event: 'file.uploaded',\n is_active: true\n}\nUploadcare::Webhook.create(**options)\n" - lang: Swift label: Swift source: 'import Uploadcare let uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY") let url = URL(string: "https://yourwebhook.com")! let webhook = try await uploadcare.createWebhook(targetUrl: url, event: .fileUploaded, isActive: true, signingSecret: "sign-secret") print(webhook) ' - lang: Kotlin label: Kotlin source: "import com.uploadcare.android.library.api.UploadcareClient\n\nval uploadcare = UploadcareClient(publicKey = \"YOUR_PUBLIC_KEY\", secretKey = \"YOUR_SECRET_KEY\")\n\nval url = URI(\"https://yourwebhook.com\")\nval webhook = uploadcare.createWebhook(\n targetUrl = url,\n event = EventType.UPLOADED,\n isActive = true,\n signingSecret = \"sign-secret\"\n)\nLog.d(\"TAG\", webhook.toString())\n" /webhooks/{id}/: put: summary: Update webhook description: Update webhook attributes. operationId: updateWebhook tags: - Webhook parameters: - $ref: '#/components/parameters/acceptHeader' - in: path name: id description: Webhook ID. schema: type: integer example: 143 required: true requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object properties: target_url: $ref: '#/components/schemas/webhook_target' event: $ref: '#/components/schemas/webhook_event' is_active: $ref: '#/components/schemas/webhook_is_active' signing_secret: $ref: '#/components/schemas/webhook_signing_secret' responses: '200': description: Webhook attributes successfully updated. content: application/json: schema: $ref: '#/components/schemas/webhook' '401': $ref: '#/components/responses/authorizationProblemsResponse' '404': description: Webhook with ID {id} not found. content: application/json: schema: type: object properties: detail: type: string description: Not found. example: Not found. '406': $ref: '#/components/responses/invalidAcceptHeader' '429': $ref: '#/components/responses/requestWasThrottledError' x-codeSamples: - lang: JavaScript label: JS source: "import {\n updateWebhook,\n UploadcareSimpleAuthSchema,\n} from '@uploadcare/rest-client';\n\nconst uploadcareSimpleAuthSchema = new UploadcareSimpleAuthSchema({\n publicKey: 'YOUR_PUBLIC_KEY',\n secretKey: 'YOUR_SECRET_KEY',\n});\n\nconst result = await updateWebhook(\n {\n id: 1473151,\n targetUrl: 'https://yourwebhook.com',\n event: 'file.uploaded',\n isActive: true,\n signingSecret: 'webhook-secret',\n },\n { authSchema: uploadcareSimpleAuthSchema }\n)\n" - lang: PHP label: PHP source: "webhook();\n$webhook = $api->updateWebhook(1473151, [\n 'target_url' => 'https://yourwebhook.com',\n 'event' => 'file.uploaded',\n 'is_active' => true,\n 'signing_secret' => 'webhook-secret',\n]);\n\\sprintf(\"Webhook with url %s is %s\\n\", $webhook->getTargetUrl(), $webhook->isActive() ? 'active' : 'not active');\n" - lang: Python label: Python source: 'from pyuploadcare import Uploadcare, Webhook uploadcare = Uploadcare(public_key=''YOUR_PUBLIC_KEY'', secret_key=''YOUR_SECRET_KEY'') webhook_id = 1473151 webhook = uploadcare.webhooks_api.update(webhook_id, {"is_active": False}) ' - lang: Ruby label: Ruby source: "require 'uploadcare'\nUploadcare.config.public_key = 'YOUR_PUBLIC_KEY'\nUploadcare.config.secret_key = 'YOUR_SECRET_KEY'\n\nwebhook_id = 1_473_151\noptions = {\n target_url: 'https://yourwebhook.com',\n event: 'file.uploaded',\n is_active: true,\n signing_secret: 'webhook-secret'\n}\nUploadcare::Webhook.update(webhook_id, options)\n" - lang: Swift label: Swift source: 'import Uploadcare let uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY") let url = URL(string: "https://yourwebhook.com")! let webhook = try await uploadcare.updateWebhook(id: 1473151, targetUrl: url, event: .fileInfoUpdated, isActive: true, signingSecret: "webhook-secret") print(webhook) ' - lang: Kotlin label: Kotlin source: "import com.uploadcare.android.library.api.UploadcareClient\n\nval uploadcare = UploadcareClient(publicKey = \"YOUR_PUBLIC_KEY\", secretKey = \"YOUR_SECRET_KEY\")\n\nval url = URI(\"https://yourwebhook.com\")\nval webhook = uploadcare.updateWebhook(\n webhookId = 1473151,\n targetUrl = url,\n event = EventType.UPLOADED,\n isActive = true,\n signingSecret = \"\",\n)\nLog.d(\"TAG\", webhook.toString())\n" /webhooks/unsubscribe/: delete: summary: Delete webhook description: Unsubscribe and delete a webhook. tags: - Webhook operationId: webhookUnsubscribe parameters: - $ref: '#/components/parameters/acceptHeader' requestBody: required: true content: application/x-www-form-urlencoded: schema: required: - target_url type: object properties: target_url: $ref: '#/components/schemas/webhook_target' responses: '204': description: Webhook successfully deleted. '400': description: Simple HTTP Auth or webhook permission or endpoint errors. content: application/json: schema: oneOf: - $ref: '#/components/schemas/simpleAuthHTTPForbidden' - $ref: '#/components/schemas/cantUseWebhooksError' - $ref: '#/components/schemas/webhookTargetUrlError' examples: Authentication Error: $ref: '#/components/examples/simpleAuthHTTPForbidden' Permission Error: $ref: '#/components/examples/cantUseWebhooksError' Target URL Error: $ref: '#/components/examples/webhookTargetUrlError' '401': $ref: '#/components/responses/authorizationProblemsResponse' '406': $ref: '#/components/responses/invalidAcceptHeader' '429': $ref: '#/components/responses/requestWasThrottledError' x-codeSamples: - lang: JavaScript label: JS source: "import {\n deleteWebhook,\n UploadcareSimpleAuthSchema,\n} from '@uploadcare/rest-client';\n\nconst uploadcareSimpleAuthSchema = new UploadcareSimpleAuthSchema({\n publicKey: 'YOUR_PUBLIC_KEY',\n secretKey: 'YOUR_SECRET_KEY',\n});\n\nconst result = await deleteWebhook(\n {\n targetUrl: 'https://yourwebhook.com',\n },\n { authSchema: uploadcareSimpleAuthSchema }\n)\n" - lang: PHP label: PHP source: 'webhook(); $result = $api->deleteWebhook(''https://yourwebhook.com''); echo $result ? ''Webhook has been deleted'' : ''Webhook is not deleted, something went wrong''; ' - lang: Python label: Python source: 'from pyuploadcare import Uploadcare, Webhook uploadcare = Uploadcare(public_key=''YOUR_PUBLIC_KEY'', secret_key=''YOUR_SECRET_KEY'') webhook_id = 1473151 uploadcare.delete_webhook(webhook_id) ' - lang: Ruby label: Ruby source: 'require ''uploadcare'' Uploadcare.config.public_key = ''YOUR_PUBLIC_KEY'' Uploadcare.config.secret_key = ''YOUR_SECRET_KEY'' puts Uploadcare::Webhook.delete(''https://yourwebhook.com'') ' - lang: Swift label: Swift source: 'import Uploadcare let uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY") let url = URL(string: "https://yourwebhook.com")! try await uploadcare.deleteWebhook(forTargetUrl: url) ' - lang: Kotlin label: Kotlin source: 'import com.uploadcare.android.library.api.UploadcareClient val uploadcare = UploadcareClient(publicKey = "YOUR_PUBLIC_KEY", secretKey = "YOUR_SECRET_KEY") val url = URI("https://yourwebhook.com") uploadcare.deleteWebhook(url) ' components: schemas: contentInfo: type: object nullable: true description: Information about file content. properties: mime: type: object description: MIME type. required: - mime - type - subtype properties: mime: type: string description: Full MIME type. example: image/jpeg type: type: string description: Type of MIME type. example: image subtype: type: string description: Subtype of MIME type. example: jpeg image: $ref: '#/components/schemas/imageInfo' video: $ref: '#/components/schemas/videoInfo' webhook_version_of_request: type: string description: Webhook payload's version. enum: - '0.7' example: '0.7' default: '0.7' webhook_is_active: type: boolean description: Marks a subscription as either active or not, defaults to `true`, otherwise `false`. default: true example: false webhook_event: type: string description: An event you subscribe to. enum: - file.uploaded - file.infected - file.stored - file.deleted - file.info_updated example: file.uploaded webhook_signing_secret: type: string format: password maxLength: 32 example: 7kMVZivndx0ErgvhRKAr description: 'Optional [HMAC/SHA-256](https://en.wikipedia.org/wiki/HMAC) secret that, if set, will be used to calculate signatures for the webhook payloads sent to the `target_url`. Calculated signature will be sent to the `target_url` as a value of the `X-Uc-Signature` HTTP header. The header will have the following format: `X-Uc-Signature: v1=`. See [Secure Webhooks](https://uploadcare.com/docs/webhooks/#signed-webhooks) for details. ' webhook_updated: type: string format: date-time description: date-time when a webhook was updated. example: '2018-11-26T12:49:10.477888Z' webhook_of_list_response: description: Webhook. type: object properties: id: $ref: '#/components/schemas/webhook_id' project: $ref: '#/components/schemas/webhook_project' created: $ref: '#/components/schemas/webhook_created' updated: $ref: '#/components/schemas/webhook_updated' event: $ref: '#/components/schemas/webhook_event' target_url: $ref: '#/components/schemas/webhook_target' is_active: $ref: '#/components/schemas/webhook_is_active' version: $ref: '#/components/schemas/webhook_version_of_list_response' signing_secret: $ref: '#/components/schemas/webhook_signing_secret' example: id: 1 project: 13 created: '2016-04-27T11:49:54.948615Z' updated: '2016-04-27T12:04:57.819933Z' event: file.infected target_url: http://example.com/hooks/receiver is_active: true signing_secret: 7kMVZivndx0ErgvhRKAr version: '0.7' awsRekognitionDetectModerationLabels_v2016_06_27: allOf: - $ref: '#/components/schemas/applicationData' - type: object properties: version: type: string enum: - '2016-06-27' data: type: object description: Dictionary with a result of an aws rekognition detect moderation labels execution result. properties: ModerationModelVersion: type: string ModerationLabels: type: array items: type: object properties: Confidence: type: number Name: type: string ParentName: type: string required: - Name - ParentName - Confidence required: - ModerationLabels - ModerationModelVersion example: value: aws_rekognition_detect_moderation_labels: data: ModerationModelVersion: '6.0' ModerationLabels: - Confidence: 93.41645812988281 Name: Weapons ParentName: Violence version: '2016-06-27' datetime_created: '2023-02-21T11:25:31.259763Z' datetime_updated: '2023-02-21T11:27:33.359763Z' videoInfo: type: object description: Video metadata. required: - duration - format - bitrate - audio - video properties: duration: type: integer description: Video file's duration in milliseconds. nullable: true example: 261827 format: type: string description: Video file's format. example: mp4 bitrate: type: integer description: Video file's bitrate. nullable: true example: 393 audio: type: array items: type: object description: Audio stream's metadata. required: - bitrate - codec - sample_rate - channels properties: bitrate: type: integer description: Audio stream's bitrate. nullable: true example: 78 codec: type: string description: Audio stream's codec. nullable: true example: aac sample_rate: type: integer description: Audio stream's sample rate. nullable: true example: 44100 channels: type: integer description: Audio stream's number of channels. nullable: true example: 2 video: type: array items: type: object description: Video stream's metadata. required: - height - width - frame_rate - bitrate - codec properties: height: type: integer description: Video stream's image height. example: 360 width: type: integer description: Video stream's image width. example: 640 frame_rate: type: number description: Video stream's frame rate. example: 30 bitrate: type: integer description: Video stream's bitrate. nullable: true example: 315 codec: type: string description: Video stream's codec. nullable: true example: h264 webhookFilePayload: type: object required: - initiator - hook - data - file properties: initiator: $ref: '#/components/schemas/webhookInitiator' hook: $ref: '#/components/schemas/webhookPublicInfo' data: $ref: '#/components/schemas/file' file: description: File CDN URL. type: string format: uri webhook_project_pubkey: type: string description: Public project key the webhook belongs to. example: 2d199fbf3896699a2639 webhook: description: Webhook. type: object properties: id: $ref: '#/components/schemas/webhook_id' project: $ref: '#/components/schemas/webhook_project' created: $ref: '#/components/schemas/webhook_created' updated: $ref: '#/components/schemas/webhook_updated' event: $ref: '#/components/schemas/webhook_event' target_url: $ref: '#/components/schemas/webhook_target' is_active: $ref: '#/components/schemas/webhook_is_active' version: $ref: '#/components/schemas/webhook_version' signing_secret: $ref: '#/components/schemas/webhook_signing_secret' example: id: 1 project: 13 created: '2016-04-27T11:49:54.948615Z' updated: '2016-04-27T12:04:57.819933Z' event: file.infected target_url: http://example.com/hooks/receiver is_active: true signing_secret: 7kMVZivndx0ErgvhRKAr version: '0.7' ucClamavVirusScan: allOf: - $ref: '#/components/schemas/applicationData' - type: object properties: version: type: string enum: - 0.104.2 - 0.104.3 - 0.105.0 - 0.105.1 data: type: object description: Dictionary with a result of ClamAV execution result. properties: infected: type: boolean infected_with: type: string required: - infected example: value: uc_clamav_virus_scan: data: infected: true infected_with: Win.Test.EICAR_HDB-1 version: 0.104.2 datetime_created: '2021-09-21T11:24:33.159663Z' datetime_updated: '2021-09-21T11:24:33.159663Z' applicationDataObject: type: object nullable: true description: Dictionary of application names and data associated with these applications. properties: aws_rekognition_detect_labels: $ref: '#/components/schemas/awsRekognitionDetectLabels_v2016_06_27' aws_rekognition_detect_moderation_labels: $ref: '#/components/schemas/awsRekognitionDetectModerationLabels_v2016_06_27' remove_bg: $ref: '#/components/schemas/removeBg_v1_0' uc_clamav_virus_scan: $ref: '#/components/schemas/ucClamavVirusScan' cantUseWebhooksError: type: object properties: detail: type: string default: You can't use webhooks example: detail: You can't use webhooks webhookPublicInfo: description: Public Webhook information (does not include secret data like `signing_secret`) type: object required: - id - project_id - created_at - updated_at - event - target - is_active - version properties: id: $ref: '#/components/schemas/webhook_id' project: $ref: '#/components/schemas/webhook_project' project_pub_key: $ref: '#/components/schemas/webhook_project_pubkey' created_at: $ref: '#/components/schemas/webhook_created' updated_at: $ref: '#/components/schemas/webhook_updated' event: $ref: '#/components/schemas/webhook_event' target: $ref: '#/components/schemas/webhook_target' is_active: $ref: '#/components/schemas/webhook_is_active' version: $ref: '#/components/schemas/webhook_version' example: id: 1 project_id: 13 project_pub_key: 2d199fbf3896699a2639 created_at: '2016-04-27T11:49:54.948615Z' updated_at: '2016-04-27T12:04:57.819933Z' event: file.uploaded target: http://example.com/hooks/receiver is_active: true version: '0.7' removeBg_v1_0: allOf: - $ref: '#/components/schemas/applicationData' - type: object properties: version: type: string enum: - '1.0' data: type: object description: Dictionary with a result of an remove.bg information about an image. properties: foreground_type: type: string description: foreground classification type (present if type_level was set) example: value: remove_bg: data: foreground_type: person version: '1.0' datetime_created: '2021-07-25T12:24:33.159663Z' datetime_updated: '2021-07-25T12:24:33.159663Z' webhook_id: type: integer description: Webhook's ID. example: 1234 awsRekognitionDetectLabels_v2016_06_27: allOf: - $ref: '#/components/schemas/applicationData' - type: object properties: version: type: string enum: - '2016-06-27' data: type: object description: Dictionary with a result of an aws rekognition detect labels execution result. properties: LabelModelVersion: type: string Labels: type: array items: type: object properties: Confidence: type: number Instances: type: array items: type: object properties: BoundingBox: type: object properties: Height: type: number Left: type: number Top: type: number Width: type: number Confidence: type: number Name: type: string Parents: type: array items: type: object properties: Name: type: string required: - Name - Parents - Instances - Confidence required: - Labels - LabelModelVersion example: value: aws_rekognition_detect_labels: data: LabelModelVersion: '2.0' Labels: - Confidence: 93.41645812988281 Instances: [] Name: Home Decor Parents: [] - Confidence: 70.75951385498047 Instances: [] Name: Linen Parents: - Name: Home Decor - Confidence: 64.7123794555664 Instances: [] Name: Sunlight Parents: [] - Confidence: 56.264793395996094 Instances: [] Name: Flare Parents: - Name: Light - Confidence: 50.47153854370117 Instances: [] Name: Tree Parents: - Name: Plant version: '2016-06-27' datetime_created: '2021-09-21T11:25:31.259763Z' datetime_updated: '2021-09-21T11:27:33.359763Z' webhook_version_of_list_response: type: string description: Webhook payload's version. enum: - '' - '0.5' - '0.6' - '0.7' example: '0.7' webhook_version: type: string description: Webhook payload's version. enum: - '0.7' example: '0.7' metadata: type: object nullable: true description: Arbitrary metadata associated with a file. webhookTargetUrlError: type: object properties: detail: type: string description: '`target_url` is missing.' default: '`target_url` is missing.' example: detail: '`target_url` is missing.' webhookFileInfoUpdatedPayload: type: object required: - initiator - hook - data - file - previous_values properties: initiator: $ref: '#/components/schemas/webhookInitiator' hook: $ref: '#/components/schemas/webhookPublicInfo' data: $ref: '#/components/schemas/file' file: description: File CDN URL. type: string format: uri previous_values: type: object description: Object containing the values of the updated file data attributes and their values prior to the event. properties: appdata: $ref: '#/components/schemas/applicationDataObject' metadata: $ref: '#/components/schemas/metadata' webhook_project: type: integer description: Project ID the webhook belongs to. example: 39123 file: type: object required: - datetime_removed - datetime_stored - datetime_uploaded - is_image - is_ready - mime_type - original_file_url - original_filename - size - url - uuid - variations - content_info - metadata properties: datetime_removed: type: string format: date-time nullable: true description: Date and time when a file was removed, if any. datetime_stored: type: string format: date-time nullable: true description: Date and time of the last store request, if any. datetime_uploaded: type: string format: date-time description: Date and time when a file was uploaded. is_image: type: boolean description: Is file is image. example: true is_ready: type: boolean description: Is file is ready to be used after upload. example: true mime_type: type: string description: File MIME-type. example: image/jpeg original_file_url: type: string format: uri description: Publicly available file CDN URL. Available if a file is not deleted. nullable: true example: https://ucarecdn.com/e575ed4e8-f4e8-4c14-a58b-1527b6d9ee46/EU_4.jpg original_filename: type: string description: Original file name taken from uploaded file. example: EU_4.jpg size: type: integer description: File size in bytes. example: 145212 url: type: string format: uri description: API resource URL for a particular file. example: https://api.uploadcare.com/files/e10ce759-42c3-4185-bae5-e22a9143d68f/ uuid: type: string format: uuid description: File UUID. example: 575ed4e8-f4e8-4c14-a58b-1527b6d9ee46 appdata: $ref: '#/components/schemas/applicationDataObject' variations: type: object nullable: true description: 'Dictionary of other files that were created using this file as a source. It''s used for video processing and document conversion jobs. E.g., `: `.' content_info: $ref: '#/components/schemas/contentInfo' metadata: $ref: '#/components/schemas/metadata' example: datetime_removed: null datetime_stored: '2018-11-26T12:49:10.477888Z' datetime_uploaded: '2018-11-26T12:49:09.945335Z' variations: null is_image: true is_ready: true mime_type: image/jpeg original_file_url: https://ucarecdn.com/22240276-2f06-41f8-9411-755c8ce926ed/pineapple.jpg original_filename: pineapple.jpg size: 642 url: https://api.uploadcare.com/files/22240276-2f06-41f8-9411-755c8ce926ed/ uuid: 22240276-2f06-41f8-9411-755c8ce926ed content_info: mime: mime: image/jpeg type: image subtype: jpeg image: format: JPEG width: 500 height: 500 sequence: false color_mode: RGB orientation: 6 geo_location: latitude: 55.62013611111111 longitude: 37.66299166666666 datetime_original: '2018-08-20T08:59:50' dpi: - 72 - 72 metadata: subsystem: uploader pet: cat appdata: aws_rekognition_detect_labels: data: LabelModelVersion: '2.0' Labels: - Confidence: 93.41645812988281 Instances: [] Name: Home Decor Parents: [] - Confidence: 70.75951385498047 Instances: [] Name: Linen Parents: - Name: Home Decor - Confidence: 64.7123794555664 Instances: [] Name: Sunlight Parents: [] - Confidence: 56.264793395996094 Instances: [] Name: Flare Parents: - Name: Light - Confidence: 50.47153854370117 Instances: [] Name: Tree Parents: - Name: Plant version: '2016-06-27' datetime_created: '2021-09-21T11:25:31.259763Z' datetime_updated: '2021-09-21T11:27:33.359763Z' aws_rekognition_detect_moderation_labels: data: ModerationModelVersion: '6.0' ModerationLabels: - Confidence: 93.41645812988281 Name: Weapons ParentName: Violence version: '2016-06-27' datetime_created: '2023-02-21T11:25:31.259763Z' datetime_updated: '2023-02-21T11:27:33.359763Z' remove_bg: data: foreground_type: person version: '1.0' datetime_created: '2021-07-25T12:24:33.159663Z' datetime_updated: '2021-07-25T12:24:33.159663Z' uc_clamav_virus_scan: data: infected: true infected_with: Win.Test.EICAR_HDB-1 version: 0.104.2 datetime_created: '2021-09-21T11:24:33.159663Z' datetime_updated: '2021-09-21T11:24:33.159663Z' webhookInitiator: description: Webhook event initiator. type: object required: - type - detail properties: type: type: string description: Initiator type name. enum: - api - system - addon detail: type: object required: - request_id - addon_name properties: request_id: type: string format: uuid description: Request ID. example: 972654bd-a2ad-485a-bd27-c86126c1ed8c nullable: true addon_name: type: string description: Add-On name. enum: - aws_rekognition_detect_labels - aws_rekognition_detect_moderation_labels - uc_clamav_virus_scan - remove_bg - zamzar_convert_document - zencoder_convert_video example: aws_rekognition_detect_labels nullable: true source_file_uuid: type: string format: uuid description: Source file UUID if the current is derivative. example: 972654bd-a2ad-485a-bd27-c86126c1ed8c webhook_created: type: string format: date-time description: date-time when a webhook was created. example: '2018-11-26T12:49:10.477888Z' imageInfo: type: object description: Image metadata. required: - color_mode - orientation - format - height - width - geo_location - datetime_original - dpi - sequence properties: color_mode: type: string description: Image color mode. enum: - RGB - RGBA - RGBa - RGBX - L - LA - La - P - PA - CMYK - YCbCr - HSV - LAB example: RGBA orientation: type: integer description: Image orientation from EXIF. nullable: true minimum: 0 maximum: 8 example: 6 format: type: string description: Image format. example: JPEG sequence: type: boolean description: Set to true if a file contains a sequence of images (GIF for example). example: false height: type: integer description: Image height in pixels. example: 2352 width: type: integer description: Image width in pixels. example: 2935 geo_location: description: Geo-location of image from EXIF. type: object nullable: true required: - latitude - longitude properties: latitude: type: number description: Location latitude. example: -1.1884555555555556 longitude: type: number description: Location longitude. example: 52.66996666666667 datetime_original: type: string description: Image date and time from EXIF. Please be aware that this data is not always formatted and displayed exactly as it appears in the EXIF. nullable: true format: date-time example: '2018-09-13T16:23:40' dpi: type: array description: Image DPI for two dimensions. nullable: true items: type: number example: 72 minItems: 2 maxItems: 2 example: - 72 - 72 applicationData: type: object properties: version: type: string description: An application version. datetime_created: type: string format: date-time description: Date and time when an application data was created. datetime_updated: type: string format: date-time description: Date and time when an application data was updated. data: type: object description: Dictionary with a result of an application execution result. required: - version - datetime_created - datetime_updated - data simpleAuthHTTPForbidden: type: object properties: detail: type: string default: Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead. example: detail: Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead. webhook_target: type: string format: uri maxLength: 255 description: A URL that is triggered by an event, for example, a file upload. A target URL MUST be unique for each `project` — `event type` combination. example: http://example.com/hooks/receiver examples: cantUseWebhooksError: value: detail: You can't use webhooks webhookTargetUrlError: value: detail: '`target_url` is missing.' simpleAuthHTTPForbidden: value: detail: Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead. responses: invalidAcceptHeader: description: Invalid version header `Accept` for this endpoint. content: application/json: schema: type: object properties: detail: type: string example: Incorrect Accept header provided. Make sure to specify API version. Refer to REST API docs for details. default: Incorrect Accept header provided. Make sure to specify API version. Refer to REST API docs for details. requestWasThrottledError: description: Request was throttled. headers: Retry-After: description: Number of seconds to wait before the next request. schema: type: integer example: 10 content: application/json: schema: type: object properties: detail: type: string example: Request was throttled. Expected available in 10 seconds. authorizationProblemsResponse: description: Authorization errors. content: application/json: schema: type: object properties: detail: type: string enum: - Incorrect authentication credentials. - Public key {public_key} not found. - Secret key not found. - Invalid signature. Please check your Secret key. example: Incorrect authentication credentials. parameters: webhookSignature: in: header name: X-Uc-Signature description: 'Optional header with an HMAC-SHA256 signature that is sent to the `target_url`, if the webhook has a `signing_secret` associated with it. ' schema: type: string example: v1=01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b acceptHeader: in: header name: Accept description: Version header. schema: type: string nullable: true example: application/vnd.uploadcare-v0.7+json required: true