SEO Meta Endpoint
Fetch metadata for a booking page to render rich previews in search engines, social media, and messaging apps.
Endpoint
GET /api/public/seo/{userSlug}/{eventSlug}Authentication: None required
Path Parameters
| Parameter | Type | Description |
|---|---|---|
userSlug | string | The user’s unique URL slug |
eventSlug | string | The event type’s URL slug |
Response
Returns 200 OK with metadata suitable for Open Graph and Twitter Card tags.
{
"title": "30 Minute Call with Jane Doe",
"description": "A quick 30-minute introductory call. Book a time that works for you.",
"ogImage": "https://app.proximity.io/api/public/seo/jane-doe/30min-call/og-image",
"canonicalUrl": "https://app.proximity.io/schedule/jane-doe/30min-call",
"hostName": "Jane Doe",
"hostAvatar": "https://storage.proximity.io/avatars/jane.jpg",
"eventName": "30 Minute Call",
"duration": 30,
"locationType": "GoogleMeet"
}Response Fields
| Field | Type | Description |
|---|---|---|
title | string | Page title for <title> and og:title |
description | string | Meta description for og:description |
ogImage | string | URL to the auto-generated Open Graph image |
canonicalUrl | string | Canonical URL for the booking page |
hostName | string | Host’s display name |
hostAvatar | string | null | Host’s avatar URL |
eventName | string | Event type name |
duration | number | Duration in minutes |
locationType | string | Meeting location type |
Open Graph Image
The ogImage URL returns a dynamically generated 1200×630px image optimized for social sharing. The image includes the host’s name, avatar, event type name, and duration.
GET /api/public/seo/{userSlug}/{eventSlug}/og-imageReturns a image/png response. No authentication required.
Usage in HTML
Render the metadata in your page’s <head>:
<head>
<title>30 Minute Call with Jane Doe</title>
<meta name="description" content="A quick 30-minute introductory call." />
<!-- Open Graph -->
<meta property="og:title" content="30 Minute Call with Jane Doe" />
<meta property="og:description" content="A quick 30-minute introductory call." />
<meta property="og:image" content="https://app.proximity.io/api/public/seo/jane-doe/30min-call/og-image" />
<meta property="og:url" content="https://app.proximity.io/schedule/jane-doe/30min-call" />
<meta property="og:type" content="website" />
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="30 Minute Call with Jane Doe" />
<meta name="twitter:description" content="A quick 30-minute introductory call." />
<meta name="twitter:image" content="https://app.proximity.io/api/public/seo/jane-doe/30min-call/og-image" />
<link rel="canonical" href="https://app.proximity.io/schedule/jane-doe/30min-call" />
</head>Server-Side Rendering Example
If you’re embedding the Proximity booking experience in your own Next.js app, you can fetch the metadata at build time or on the server:
// app/book/[user]/[event]/page.js
export async function generateMetadata({ params }) {
const res = await fetch(
`https://app.proximity.io/api/public/seo/${params.user}/${params.event}`
);
const meta = await res.json();
return {
title: meta.title,
description: meta.description,
openGraph: {
title: meta.title,
description: meta.description,
images: [{ url: meta.ogImage, width: 1200, height: 630 }],
url: meta.canonicalUrl,
},
twitter: {
card: 'summary_large_image',
title: meta.title,
description: meta.description,
images: [meta.ogImage],
},
alternates: {
canonical: meta.canonicalUrl,
},
};
}Errors
| Status | Description |
|---|---|
404 | User or event type not found |
Last updated on