Get Asset

Retrieves metadata and details of a specific asset by its unique ID. Useful for fetching file info like type, size, and URLs.

GET

GET

https://api.cortado.com/v1/assets/{asset_id}

Request

No body required. The asset ID is passed as a path parameter. Authentication is required to ensure the user’s permission.

Parameters

Parameters

Type

Description

asset_id

string

Unique identifier of the asset

Based on the steps above, your code might look something like this. It brings together the key concepts covered — from setup and configuration to routing, authentication, or event handling. Feel free to adapt it to suit your specific use case.

main.ts

import axios from 'axios';

async function getAsset(assetId: string) {
  const res = await axios.get(`https://api.cortado.com/v1/assets/${assetId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
    },
  });

  return res.data;
}

main.ts

import axios from 'axios';

async function getAsset(assetId: string) {
  const res = await axios.get(`https://api.cortado.com/v1/assets/${assetId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
    },
  });

  return res.data;
}

main.ts

import axios from 'axios';

async function getAsset(assetId: string) {
  const res = await axios.get(`https://api.cortado.com/v1/assets/${assetId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
    },
  });

  return res.data;
}

Response

Returns asset metadata including type, size, URL, and timestamps. Returns an error if asset not found or unauthorized.

main.ts

{
  "id": "asset_64f1b2cc",
  "type": "image/png",
  "size": 183920,
  "url": "https://cdn.cortado.com/assets/asset_64f1b2cc.png",
  "uploadedAt": "2025-07-14T10:42:00Z"
}

main.ts

{
  "id": "asset_64f1b2cc",
  "type": "image/png",
  "size": 183920,
  "url": "https://cdn.cortado.com/assets/asset_64f1b2cc.png",
  "uploadedAt": "2025-07-14T10:42:00Z"
}

main.ts

{
  "id": "asset_64f1b2cc",
  "type": "image/png",
  "size": 183920,
  "url": "https://cdn.cortado.com/assets/asset_64f1b2cc.png",
  "uploadedAt": "2025-07-14T10:42:00Z"
}

Was this helpful?

Dismiss

Was this helpful?

Dismiss

Last updated on

Jul 16, 2025