---
title: "Set Link OpenGraph"
method: POST
path: "/links/{link_id}/opengraph"
tags: ["Links"]
---

# Set Link OpenGraph

`POST /links/{link_id}/opengraph`

## Request

- Base URL: `https://api.rebrandly.com/v1`
- URL: `https://api.rebrandly.com/v1/links/{link_id}/opengraph`
- Auth: API key in header `apikey`

Set custom OpenGraph metadata for a link to control social media previews.

**Requires:**
- Feature: `links.opengraph`

**Blocked by:**
- Link deleted (status=3)
- Revoked workspace
- Revoked domain

**Workspace Type:** Classic or Gallery workspaces only.

## Path parameters

- `link_id` string, required

## Headers

- `Workspace` string
- `apikey` string, required

## Request body

- OpenGraphInput: Input for setting OpenGraph metadata
  - `title` string: OpenGraph title
  - `description` string: OpenGraph description
  - `image` string, uri: OpenGraph image URL

## Response `200`

OpenGraph metadata set

- OpenGraph: OpenGraph metadata for social sharing
  - `title` string: OpenGraph title
  - `description` string: OpenGraph description
  - `image` string, uri: OpenGraph image URL
  - `imageWidth` integer: Image width in pixels
  - `imageHeight` integer: Image height in pixels
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `403`: Feature not available or insufficient permissions

---

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