Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

8.0 KB
Raw Blame
{
  "openapi": "3.1.0",
  "info": {
    "title": "unfurl_service",
    "description": "",
    "termsOfService": "https://macro.com/terms",
    "license": {
      "name": ""
    },
    "version": "0.1.0"
  },
  "paths": {
    "/proxy": {
      "get": {
        "tags": ["proxy"],
        "operationId": "proxy_request_handler",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "description": "The url to proxy from",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {}
      }
    },
    "/unfurl": {
      "get": {
        "tags": ["unfurl"],
        "summary": "Unfurl the URL passed via the `url` query parameter and return its\nextracted metadata (title, description, image, favicon).",
        "description": "On success returns `200` with a [`GetUnfurlResponse`] body. On any\nfailure returns `500` with a JSON `null` body — the response type is an\n`Option<GetUnfurlResponse>` so this contract is reflected in the\nsignature and OpenAPI spec.",
        "operationId": "get_unfurl",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "description": "The URL to unfurl.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unfurled metadata for the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUnfurlResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unfurl failed; response body is JSON null.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/GetUnfurlResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/unfurl/bulk": {
      "post": {
        "tags": ["unfurl"],
        "operationId": "get_unfurl_bulk",
        "requestBody": {
          "description": "JSON list of URLs",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetUnfurlBulkBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUnfurlBulkResponse"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GetUnfurlBulkBody": {
        "type": "object",
        "required": ["url_list"],
        "properties": {
          "url_list": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GetUnfurlBulkResponse": {
        "type": "object",
        "required": ["responses"],
        "properties": {
          "responses": {
            "$ref": "#/components/schemas/Vec"
          }
        }
      },
      "GetUnfurlQueryParams": {
        "type": "object",
        "description": "Query parameters for `GET /unfurl`.",
        "required": ["url"],
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL to unfurl."
          }
        }
      },
      "GetUnfurlResponse": {
        "type": "object",
        "description": "Unfurl response for a single URL: the URL itself plus any metadata that\nwas extracted from the page's `<head>` (title, description, image,\nfavicon).",
        "required": ["url", "title"],
        "properties": {
          "description": {
            "type": ["string", "null"],
            "description": "The page description (from `og:description`), if any."
          },
          "embed_type": {
            "$ref": "#/components/schemas/UnfurlEmbedType",
            "description": "The type of embeddable content, if the URL supports iframe embedding."
          },
          "embed_url": {
            "type": ["string", "null"],
            "description": "The iframe-embeddable URL for services like Loom or Supercut."
          },
          "favicon_url": {
            "type": ["string", "null"],
            "description": "The page's favicon URL, if any."
          },
          "image_url": {
            "type": ["string", "null"],
            "description": "The page's preview image URL (from `og:image`), if any."
          },
          "title": {
            "type": "string",
            "description": "The page title (from custom URL parser, Open Graph, or `<title>`)."
          },
          "url": {
            "type": "string",
            "description": "The URL that was unfurled."
          }
        }
      },
      "ProxyParams": {
        "type": "object",
        "required": ["url"],
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "UnfurlEmbedType": {
        "type": "string",
        "description": "The type of embeddable content for services that support iframe embedding.",
        "enum": ["None", "Video"]
      },
      "Vec": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "type": "object",
              "description": "Unfurl response for a single URL: the URL itself plus any metadata that\nwas extracted from the page's `<head>` (title, description, image,\nfavicon).",
              "required": ["url", "title"],
              "properties": {
                "description": {
                  "type": ["string", "null"],
                  "description": "The page description (from `og:description`), if any."
                },
                "embed_type": {
                  "$ref": "#/components/schemas/UnfurlEmbedType",
                  "description": "The type of embeddable content, if the URL supports iframe embedding."
                },
                "embed_url": {
                  "type": ["string", "null"],
                  "description": "The iframe-embeddable URL for services like Loom or Supercut."
                },
                "favicon_url": {
                  "type": ["string", "null"],
                  "description": "The page's favicon URL, if any."
                },
                "image_url": {
                  "type": ["string", "null"],
                  "description": "The page's preview image URL (from `og:image`), if any."
                },
                "title": {
                  "type": "string",
                  "description": "The page title (from custom URL parser, Open Graph, or `<title>`)."
                },
                "url": {
                  "type": "string",
                  "description": "The URL that was unfurled."
                }
              }
            }
          ]
        }
      }
    }
  },
  "tags": [
    {
      "name": "macro unfurl service",
      "description": "Unfurl Service"
    }
  ]
}