media

Migrate Media URLs (Batch)

Changed on

Converts up to 1000 legacy storage.googleapis.com attachment URLs (or existing Periskope media URLs) to the new Periskope media URL format in a single request.

Each URL succeeds or fails independently — results[i] corresponds to urls[i] in the request.

post/media/migrate-url/batch

Request

  • Base URL
    https://api.periskope.app/v1
  • URL
    https://api.periskope.app/v1/media/migrate-url/batch
  • Auth
    HTTP bearer

Request body

urlsstring[] required

The media URLs to migrate. Maximum 1000 URLs per request.

access'private' | 'public'

Access mode for the returned URLs. private returns tokenized links that expire; public returns bare links. If omitted, follows your organization's Media Privacy setting.

expires_in_secondsnumber

Validity of the returned links in seconds. Only valid for private links. Clamped between 60 seconds and 7 days. Defaults to your organization's configured link expiry.

Example request

{
  "urls": [
    "https://storage.googleapis.com/periskope-attachments/2997dd64-89bf-48d3-9a22-b314fca017e5/919876543210/msg_ABCDEF123/file.jpg",
    "https://storage.googleapis.com/periskope-attachments/2997dd64-89bf-48d3-9a22-b314fca017e5/919876543210/msg_ABCDEF123/file-2.pdf"
  ],
  "expires_in_seconds": 86400
}

Response

200 OK

migrated_countnumber

Number of URLs migrated successfully.

failed_countnumber

Number of URLs that failed to migrate.

access'private' | 'public'

The access mode applied to the returned URLs.

expires_in_secondsnumber

Validity of the returned links in seconds. Only present for private links.

Changes