Interactive Links

Add clickable links to text and image elements in your PDF output using the .href parameter.

Orshot PDFs support interactive hyperlinks. Use the .href parameter to make any text or image element clickable — perfect for invoices with payment links, certificates with verification URLs, or reports with external references.

Basic Usage#

Append .href to any parameterized element to attach a clickable link:

{
  "templateId": "<YOUR_TEMPLATE_ID>",
  "modifications": {
    "cta_button": "Visit Our Website",
    "cta_button.href": "https://example.com"
  },
  "response": {
    "format": "pdf",
    "type": "url"
  }
}

When the user clicks on the "Visit Our Website" text in the PDF, it opens the URL.

Make any text element clickable:

{
  "modifications": {
    "company_name": "Acme Corp",
    "company_name.href": "https://acme.com",

    "support_email": "support@acme.com",
    "support_email.href": "mailto:support@acme.com",

    "cta": "Sign Up Now",
    "cta.href": "https://acme.com/signup"
  },
  "response": {
    "format": "pdf"
  }
}

Make images clickable by attaching a link:

{
  "modifications": {
    "logo": "https://example.com/logo.png",
    "logo.href": "https://example.com",

    "banner": "https://example.com/promo-banner.jpg",
    "banner.href": "https://example.com/promo"
  },
  "response": {
    "format": "pdf"
  }
}

Apply visual styling alongside links:

{
  "modifications": {
    "cta_button": "Get Started",
    "cta_button.href": "https://example.com/signup",
    "cta_button.fontSize": "24px",
    "cta_button.color": "#2563eb",
    "cta_button.fontWeight": "700",
    "cta_button.backgroundColor": "#eff6ff",
    "cta_button.backgroundRadius": "8px"
  },
  "response": {
    "format": "pdf"
  }
}

In multi-page templates, add different links per page:

{
  "modifications": {
    "page1@cta": "Read Chapter 1",
    "page1@cta.href": "https://example.com/chapter-1",

    "page2@cta": "Read Chapter 2",
    "page2@cta.href": "https://example.com/chapter-2",

    "page3@cta": "Read Chapter 3",
    "page3@cta.href": "https://example.com/chapter-3"
  },
  "response": {
    "format": "pdf"
  }
}

URL Requirements#

All URLs must meet these requirements:

RuleExample
Must use http:// or https://https://example.com
Must have a valid domainexample.com, not just example
Must be a parseable URLNo spaces or invalid characters
Must not be emptyProvide a real URL

Invalid URLs are silently ignored — the element renders normally without a link.

const response = await fetch("https://api.orshot.com/v1/studio/render", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <YOUR_API_KEY>",
  },
  body: JSON.stringify({
    templateId: "<INVOICE_TEMPLATE>",
    modifications: {
      invoice_number: "INV-2026-0042",
      client: "Acme Corp",
      total: "$3,200.00",
      due_date: "April 15, 2026",

      // Clickable payment button
      pay_button: "Pay Now",
      "pay_button.href": "https://pay.stripe.com/inv-0042",

      // Clickable company logo
      logo: "https://example.com/logo.png",
      "logo.href": "https://example.com",

      // Clickable support link
      support: "Need help? Contact support",
      "support.href": "mailto:billing@example.com",
    },
    response: {
      format: "pdf",
      type: "url",
      fileName: "invoice-acme-0042",
    },
  }),
});

Example: Certificate with Verification#

const certId = "CERT-2026-001";

await fetch("https://api.orshot.com/v1/studio/render", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <YOUR_API_KEY>",
  },
  body: JSON.stringify({
    templateId: "<CERTIFICATE_TEMPLATE>",
    modifications: {
      recipient: "Jane Smith",
      course: "Data Science Bootcamp",
      verify_link: "Verify this certificate",
      "verify_link.href": `https://example.com/verify/${certId}`,
    },
    response: {
      format: "pdf",
      type: "url",
    },
    pdfOptions: {
      dpi: 300,
    },
  }),
});

All Set? Let's Start Automating

Get Your API Key →
  • Image, PDF and Video Generation via API
  • Canva like editor with AI and smart features
  • No-Code Integrations (Zapier, Make, n8n etc.)
  • Embed Orshot Studio in your app
  • Start Free. No credit card required. Cancel anytime.