Signed URLs

Mint a signed render URL

Returns a URL that renders on GET without an API key - safe to put in an <img> tag or an email. The URL is bound to your account, so renders through it are admitted and counted against your organisation's billing account like any other.

A signed URL expires after 30 days unless ttl_hours says otherwise: any number of hours, or 0 for a URL that never expires, which is what an og:image tag needs. The response says when the URL expires.

Requires signing to be configured on the deployment; returns 501 otherwise.

post/v1/sign

Request

  • Base URL: https://api.ironfang.com/render
  • URL: https://api.ironfang.com/render/v1/sign
  • Auth: HTTP bearer

Request body

full_pageboolean
full_page_readiness'scroll'

Screenshot only, with full_page; as on the screenshot request. Signed into the URL.

heightinteger
kind'screenshot' | 'image' required

screenshot signs a URL capture and requires url; image signs a template render and requires template.

templatestring uuid

Required when kind is image.

ttl_hoursinteger

Hours until the URL expires. Leaving it out gives 720 (30 days); 0 never expires.

urlstring uri

Required when kind is screenshot.

varsobject
widthinteger

Example request

{
  "success_rules": {
    "fail_on_status": [
      "4xx",
      "5xx"
    ],
    "forbid_text": [
      "Sign in to continue"
    ],
    "require_selector": "#invoice"
  }
}

Response

The signed URL.

expires_atstring date-time nullable

When the URL stops rendering (UTC); null when it never expires.

pathstring

Path only, for serving behind your own domain.

urlstring uri

Absolute URL, ready to embed.

Changes

No recorded changes to this operation across all 1 revision of this API.