---
title: "Migrate Media URL"
method: POST
path: "/media/migrate-url"
tags: ["media"]
---

# Migrate Media URL

`POST /media/migrate-url`

## Request

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

Converts a legacy `storage.googleapis.com` attachment URL to the new Periskope media URL format. Also accepts an existing Periskope media URL to refresh its access token (e.g. after the link has expired).

The media object must belong to the organization of the API key used.

## Request body

- object
  - `url` string, required: The media URL to migrate. Either a legacy `storage.googleapis.com` attachment URL or an existing Periskope media URL.
  - `access` 'private' | 'public': Access mode for the returned URL. `private` returns a tokenized link that expires; `public` returns a bare link. If omitted, follows your organization's Media Privacy setting.
  - `expires_in_seconds` number: Validity of the returned link in seconds. Only valid for private links. Clamped between 60 seconds and 7 days. Defaults to your organization's configured link expiry.

## Response `200`

200 OK

- object
  - `url` string: The migrated Periskope media URL. Includes an access token when access is private.
  - `access` 'private' | 'public': The access mode applied to the returned URL.
  - `expires_in_seconds` number: Validity of the returned link in seconds. Only present for private links.

## Changes

- **2026-11-03** `874b0dbfbf3e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/periskope/apis/api-local/changes/media/migrate-url/post.md)

---

[API](https://skmtc.dev/periskope/apis/api-local.md) - [All operations](https://skmtc.dev/periskope/apis/api-local/llms.txt) - [OpenAPI document](https://skmtc.dev/periskope/apis/api-local/revisions/874b0dbfbf3e?raw)
