{
  "service": "tinyurl",
  "displayName": "TinyURL",
  "categories": [
    "Marketing"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Token",
      "placeholder": "tinyurl_api_token",
      "description": "TinyURL API token passed with the Authorization: Bearer <token> header. Create it from Profile > API in TinyURL."
    }
  ],
  "homepageUrl": "https://tinyurl.com",
  "actions": [
    {
      "id": "tinyurl.create_short_url",
      "service": "tinyurl",
      "name": "create_short_url",
      "description": "Create a TinyURL short link for a destination URL.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The full URL to shorten, including the http:// or https:// protocol.",
            "format": "uri"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "description": "A custom alias for the short URL. It must be unique for the selected domain."
          },
          "domain": {
            "type": "string",
            "minLength": 1,
            "description": "The domain to use when TinyURL creates the short link."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Tags to associate with the created TinyURL.",
            "minItems": 1
          },
          "expires_at": {
            "type": "string",
            "description": "The ISO 8601 timestamp when the created TinyURL should expire.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "description": "The input payload for creating a TinyURL short link."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "tiny_url": {
            "type": "string",
            "description": "The TinyURL short link that was created.",
            "format": "uri"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "description": "The alias used by the created TinyURL."
          },
          "domain": {
            "type": "string",
            "minLength": 1,
            "description": "The domain used by the created TinyURL."
          },
          "url": {
            "type": "string",
            "description": "The original destination URL.",
            "format": "uri"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "The tags associated with the created TinyURL."
          },
          "expires_at": {
            "type": "string",
            "description": "An ISO 8601 timestamp returned by TinyURL.",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "description": "An ISO 8601 timestamp returned by TinyURL.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "tiny_url",
          "alias"
        ],
        "description": "The created TinyURL returned by the TinyURL API."
      }
    },
    {
      "id": "tinyurl.list_urls",
      "service": "tinyurl",
      "name": "list_urls",
      "description": "List TinyURLs from the TinyURL account by availability status.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "available",
              "archived"
            ],
            "description": "Whether to list available TinyURLs or archived TinyURLs."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "The 1-based page number of the TinyURL results to fetch."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "The maximum number of TinyURLs to fetch per page, from 1 to 100."
          }
        },
        "additionalProperties": false,
        "required": [
          "type"
        ],
        "description": "The input payload for listing TinyURLs from the TinyURL API."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The TinyURL response code."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tiny_url": {
                  "type": "string",
                  "description": "The TinyURL short link.",
                  "format": "uri"
                },
                "alias": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The alias used by the TinyURL."
                },
                "domain": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The domain used by the TinyURL."
                },
                "url": {
                  "type": "string",
                  "description": "The original destination URL, when returned by TinyURL.",
                  "format": "uri"
                },
                "archived": {
                  "type": "boolean",
                  "description": "Whether the TinyURL is archived."
                },
                "created_at": {
                  "type": "string",
                  "description": "An ISO 8601 timestamp returned by TinyURL.",
                  "format": "date-time"
                }
              },
              "additionalProperties": false,
              "required": [
                "tiny_url",
                "alias",
                "domain",
                "archived",
                "created_at"
              ],
              "description": "A single TinyURL item returned by the TinyURL listing API."
            },
            "description": "The TinyURLs returned for the selected page."
          },
          "page": {
            "type": "integer",
            "description": "The current TinyURL results page, when returned by TinyURL."
          },
          "limit": {
            "type": "integer",
            "description": "The number of TinyURLs returned per page, when returned by TinyURL."
          },
          "total": {
            "type": "integer",
            "description": "The total number of TinyURLs matching the selected type, when returned by TinyURL."
          }
        },
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "description": "The paginated TinyURL listing returned by the TinyURL API."
      }
    }
  ]
}
