Pular para o conteúdo principal

Submit photos to the public library

Images you upload are private to your account. If your users want to share their photos with everyone using TheDogAPI, you can ask for an image to be added to the public library. Our team reviews each request and you hear back by webhook or by checking its status.

Before you start

Upload the image first with POST /images/upload, and wait until its review_status is clean or labelled. Only images that pass content review can be submitted.

1. Submit a request​

curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: application/json" \
-d '{"request_message": "Shared by the owner from our adoption gallery"}' \
https://api.thedogapi.com/v1/images/{image_id}/public-requests
{
"id": "4f1c2b7e-…",
"image_id": "{image_id}",
"account_id": "…",
"status": "pending",
"request_message": "Shared by the owner from our adoption gallery",
"admin_message": null,
"actioned_at": null,
"created_at": "2026-10-06T03:30:00.000Z",
"updated_at": "2026-10-06T03:30:00.000Z"
}

request_message is optional, up to 500 characters, and tells the reviewer anything useful about the photo.

Only ask for this with the owner's agreement. A public image can be seen and used by anyone with an API key.

2. Track it​

curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/images/{image_id}/public-requests/status

status moves from pending to approved or denied. If there has never been a request, you get {"status": "none"}. When a request is decided, admin_message may explain why.

Rather than polling, subscribe to these webhook events:

EventWhen
image.public_request.submittedYou submitted a request
image.public_request.approvedThe image is now public
image.public_request.deniedThe request was turned down

3. Cancel a pending request​

curl -X DELETE -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/images/{image_id}/public-requests

Returns 204. You can submit again later, up to three cancellations per image.

Rules​

SituationResponse
The image belongs to another account403
The image hasn't passed content review yet400
The image is already public400
A request is already pending or approved409
The image was denied before403: a denied image can't be resubmitted
Three cancellations already403