# Add photos by address

> Downloads photos from https addresses and adds them to a listing of your company, through the same pipeline as uploads (shrunk, stored, a small copy made). Up to 8 a listing, 15 MB each, JPEG, PNG, WebP or HEIC. Addresses on private networks are refused.


`POST https://dev.siteswap.pro/api/v1/listings/{id}/photos`

Downloads photos from https addresses and adds them to a listing of your company, through the same pipeline as uploads (shrunk, stored, a small copy made). Up to 8 a listing, 15 MB each, JPEG, PNG, WebP or HEIC. Addresses on private networks are refused.

Needs the `listings:write` scope.

## Parameters

- `id` (path, string, required): The listing's id

## Body

- `urls` (string[], required): https addresses of the photos

```json
{
  "urls": [
    "https://example.com/photos/pile.jpg"
  ]
}
```

## Responses

- 200: OK
- 400: bad_request, key_in_url or invalid_json: the request could not be read
- 401: missing_key or invalid_key: no key, or a key that is not valid or was revoked
- 403: key_pending, key_declined, scope_missing, terms_required or account_unavailable: see Errors
- 404: not_found: nothing here that you may see
- 413: too_large: the body is over 256 KB
- 429: rate_limited or daily_quota: wait for Retry-After seconds

## Response fields

- `added` (integer)
- `photos` (integer): Photos the listing has now

```json
{
  "data": {
    "added": 1,
    "photos": 3
  },
  "meta": {
    "request_id": "3f9a1c0b7d2e",
    "api_version": "v1"
  }
}
```

## Example

```bash
curl -X POST "https://dev.siteswap.pro/api/v1/listings/1042/photos" \
  -H "Authorization: Bearer ssk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com/photos/pile.jpg"]}'
```