Add an external link to a site's navigation
Creates an external navigation link at the site root or in a section group. On a site with root variants and no sections, creating the first external link enables sections and moves those variants into a default section. Links cannot be placed inside a section. The destination must be an absolute HTTP or HTTPS URL. Draft links and links whose adaptive condition does not match are omitted from published structure responses. Use the generic structure sort operation after creation to change sibling order.
A unique entity identifier
^[a-zA-Z0-9_-]+$The unique id of the site
Title of the site section
Description of the site section
Name of the icon
gearAbsolute HTTP or HTTPS destination URL
ID of the section group to create the link in. Omit to place it at the site root.
Whether the external link should be created in draft mode
Adaptive condition controlling whether visitors see the link
External link added to the site
The parent group is invalid, or the site has no sections or root variants
Unexpected Error
POST /v1/orgs/{organizationId}/sites/{siteId}/external-links HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 237
{
"title": "text",
"localizedTitle": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"description": "text",
"localizedDescription": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"icon": "gear",
"url": "https://example.com",
"parent": "text",
"draft": true,
"condition": "text"
}{
"object": "site-external-link",
"id": "text",
"title": "text",
"localizedTitle": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"description": "text",
"localizedDescription": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"icon": "gear",
"url": "https://example.com",
"sectionGroup": "text",
"draft": true,
"condition": "text"
}Last updated
Was this helpful?