Snippets
Create Snippet
Creates a new custom snippet for this portal. Custom snippets can be used to display static content, documentation, or other information to developers. Title and Description properties may be provided in the frontmatter section of content. If you set values in both the POST request and in the frontmatter, the values in the frontmatter will take precedence.
post/v3/portals/{portalId}/snippets
Path parameters
portalIdstring uuid required
Example:f32d905a-ed33-46a3-a093-d8f536af9a8a
ID of the portal.
Request body
Example request
{
"name": "my-snippet",
"title": "My Snippet",
"content": "# Welcome to My Snippet",
"visibility": "public",
"status": "published",
"description": "A custom page about developer portals"
}Response
Details about a snippet in a portal.
Example response
{
"id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
"name": "my-snippet",
"title": "My Snippet",
"content": "# Welcome to My Snippet",
"visibility": "public",
"status": "published",
"description": "A custom page about developer portals",
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z"
}