Short Menu
Short Menu · Acciones GPT
Short Menu API
POST /linkscreateLinkCreates a new Short Link.
Esquema original API
{
"openapi": "3.1.0",
"paths": {
"/links": {
"post": {
"operationId": "createLink",
"description": "Creates a new Short Link.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateLinkDTO"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LinkDTO"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDTO"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDTO"
}
}
}
},
"404": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDTO"
}
}
}
}
}
}
}
},
"info": {
"title": "Short Menu API",
"description": "",
"version": "0.0.1",
"contact": {}
},
"tags": [],
"servers": [
{
"url": "https://api.shortmenu.com",
"description": "Default"
}
],
"components": {
"schemas": {
"DomainDTO": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the domain."
},
"name": {
"type": "string",
"description": "Name of the domain, e.g. `shrtm.nu`."
}
},
"required": [
"id",
"name"
]
},
"TagDTO": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"LinkDTO": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the short link."
},
"createdAt": {
"format": "date-time",
"type": "string",
"description": "Reference date and time when the short link was created."
},
"destinationUrl": {
"type": "string",
"description": "Destination URL of the short link."
},
"title": {
"type": "string",
"description": "Title of the destination URL (website), if available."
},
"slug": {
"type": "string",
"description": "Slug of the short link, e.g. `ios`."
},
"domain": {
"$ref": "#/components/schemas/DomainDTO"
},
"shortUrl": {
"type": "string",
"description": "Full short URL of the short link, e.g. `https://shrtm.nu/ios`."
},
"clickCount": {
"type": "number",
"description": "Number of times the short link has been clicked."
},
"tags": {
"type": "array",
"description": "Zero or more tags assigned to the short link.",
"items": {
"$ref": "#/components/schemas/TagDTO"
}
}
},
"required": [
"id",
"createdAt",
"destinationUrl",
"slug",
"domain",
"shortUrl",
"tags"
]
},
"ErrorResponseDTO": {
"type": "object",
"properties": {
"code": {
"enum": [
"LINK_LIMIT_REACHED"
],
"type": "string"
},
"errorDescription": {
"type": "string"
}
},
"required": [
"errorDescription"
]
},
"CreateLinkDTO": {
"type": "object",
"properties": {
"destinationUrl": {
"type": "string",
"description": "Destination URL of the new short link. Must be a valid URL starting with a scheme such as `https`."
},
"domain": {
"type": "string",
"description": "Name of the short link domain, e.g. `shrtm.nu`. If your account is set up with custom domains, you can pass their names instead."
},
"slug": {
"type": "string",
"description": "Optional slug for the new short link. If empty, a random slug will be generated. Must be unique within the domain."
},
"tags": {
"type": "array",
"description": "Zero or more tags to assign to the new short link. If a tag with the same name already exists, it will be reused automatically. Do not pass tag `id` values, unless they already exist in your account.",
"items": {
"$ref": "#/components/schemas/TagDTO"
}
}
},
"required": [
"destinationUrl",
"domain",
"tags"
]
}
}
}
}