Source: Jolli-sample-repos/url-shortener Last Updated: 4/8/2026
import MethodEndpoint from “@theme/ApiExplorer/MethodEndpoint”; import ParamsDetails from “@theme/ParamsDetails”; import RequestSchema from “@theme/RequestSchema”; import StatusCodes from “@theme/StatusCodes”; import OperationTabs from “@theme/OperationTabs”; import TabItem from “@theme/TabItem”; import Heading from “@theme/Heading”;
<Heading as={“h1”} className={“openapi__heading”} children={“Create a short URL”}
</Heading>
<MethodEndpoint method={“post”} path={“/api/v1/urls”} context={“endpoint”}
</MethodEndpoint>
Create a short URL
<Heading id={“request”} as={“h2”} className={“openapi-tabs__heading”} children={“Request”}
</Heading>
<ParamsDetails parameters={undefined}
</ParamsDetails>
<RequestSchema title={“Body”} body={{“required”:true,“content”:{“application/json”:{“schema”:{“type”:“object”,“required”:[“longUrl”],“properties”:{“longUrl”:{“type”:“string”,“format”:“uri”},“customCode”:{“type”:“string”},“expiresAt”:{“type”:“string”,“format”:“date-time”}}}}}}}
</RequestSchema>
<StatusCodes id={undefined} label={undefined} responses={{“201”:{“description”:“Short URL created”},“400”:{“description”:“Validation error”}}}
</StatusCodes>