SwaggerHub integration
SwaggerHub (SmartBear, now sold as Swagger Studio) hosts OpenAPI and AsyncAPI definitions for teams. Search the public and private registry, read any API, domain or template definition as JSON or YAML, create or update definitions and their versions, fork, clone, rename and delete them, publish or unpublish a version, make it public or private, set the default version, validate a definition, read standardization errors, discuss a version through comments and replies, group definitions into organization projects, and configure and run API integrations (source control sync, API gateways, webhooks, auto-mocking). The per-type search routes (they only redirect to the combined registry search), the duplicate swagger.json and domain.json reads, the Spectral ruleset ZIP upload and download, and organization member management (a separate User Management API) are not exposed. Authentication is a SwaggerHub API key (Settings, API Keys) sent as is in the Authorization header; reading public definitions also works without one.
Say what should happen.
The workflow builds itself.
What you can do with SwaggerHub
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Comment, 9 operations
add_api_commentAdd api commentPOSTAdds a comment to an API version, optionally anchored to a range of the definition, and returns the created comment with its id.add_domain_commentAdd domain commentPOSTAdds a comment to a domain version, optionally anchored to a range of the definition, and returns the created comment with its id.delete_api_commentDelete api commentDELETEDeletes one comment, with its replies, from an API version.delete_domain_commentDelete domain commentDELETEDeletes one comment, with its replies, from a domain version.list_api_commentsList api commentsGETLists the comments on an API version, each with its author, Markdown body, status (OPEN or RESOLVED), anchor range and replies.list_domain_commentsList domain commentsGETLists the comments on a domain version, each with its author, Markdown body, status (OPEN or RESOLVED), anchor range and replies.list_template_commentsList template commentsGETLists the comments on a template version, each with its author, Markdown body, status and replies.update_api_commentUpdate api commentPATCHEdits the text or anchor range of one comment on an API version and returns the updated comment.update_domain_commentUpdate domain commentPATCHEdits the text or anchor range of one comment on a domain version and returns the updated comment.
Apis, 6 operations
delete_apiDelete apiDELETEDeletes an API with all of its versions. An API that still has published versions is refused (unpublish them first). This cannot be undone.delete_api_versionDelete api versionDELETEDeletes one version of an API. A published version, or the only version of the API, cannot be deleted.get_api_definitionGet api definitionGETReturns the full definition of one API version as a JSON object. Set resolved=true to inline every external $ref.list_api_versionsList api versionsGETLists every version of one API in APIs.json format; each entry's properties carry the version, its publish state and visibility, and the URL that returns that version's definition.list_owner_apisList owner apisGETLists the APIs of one user or organization in APIs.json format, one entry per API with its metadata (default version, visibility, publish state, OpenAPI version), sorted and paged. Private APIs appear only to members with access.save_api_definitionSave api definitionPOSTCreates an API, or a new or updated version of one, from a complete OpenAPI or AsyncAPI definition (version parameter, else info.version). A published version cannot be overwritten; a new version is not made default (use set_api_default_version).
Domain, 6 operations
delete_domainDelete domainDELETEDeletes a domain with all of its versions. A domain that still has published versions is refused (unpublish them first). A domain referenced from other definitions needs force=true. This cannot be undone.delete_domain_versionDelete domain versionDELETEDeletes one version of a domain. A published version, or the only version of the domain, cannot be deleted. A version referenced from other definitions needs force=true.get_domain_definitionGet domain definitionGETReturns the full definition of one domain version as a JSON object. Set resolved=true to inline every external $ref.list_domain_versionsList domain versionsGETLists every version of one domain in APIs.json format; each entry's properties carry the version, its publish state and visibility, and the URL that returns that version's definition.list_owner_domainsList owner domainsGETLists the domains of one user or organization in APIs.json format, one entry per domain with its metadata (default version, visibility, publish state, OpenAPI version), sorted and paged. Private domains appear only to members with access.save_domain_definitionSave domain definitionPOSTCreates a domain (reusable components referenced from APIs), or a new or updated version of one, from a complete domain definition (version parameter, else info.version). A published version cannot be overwritten.
Integration, 6 operations
create_api_integrationCreate api integrationPOSTConfigures a new integration on an API version (source control sync, API gateway, webhook or auto-mocking) and returns its generated id. Repository details and access tokens are not checked at this point.delete_api_integrationDelete api integrationDELETEDeletes one integration from an API version.get_api_integrationGet api integrationGETReturns the settings of one integration on an API version. Access tokens and passwords are never returned.list_api_integrationsList api integrationsGETLists the integrations configured on an API version with their id, name, type (configType) and enabled flag. Amazon API Gateway Lambda Sync, Apigee Edge and Azure API Management integrations are not listed.replace_api_integrationReplace api integrationPUTReplaces all the settings of an existing integration: send the full integration object (same configType). To change only a few fields use update_api_integration.update_api_integrationUpdate api integrationPATCHChanges only the given settings of an existing integration, for example enables or disables it or sets a new access token; other settings are kept. configType cannot be changed.
Lifecycle, 6 operations
get_api_publish_statusGet api publish statusGETTells whether an API version is published (stable, read-only) or unpublished (a draft that can still be edited).get_domain_publish_statusGet domain publish statusGETTells whether a domain version is published (stable, read-only) or unpublished (a draft that can still be edited).get_template_publish_statusGet template publish statusGETTells whether a template version is published or unpublished.set_api_publish_statusSet api publish statusPUTPublishes (published=true, the version becomes read-only) or unpublishes (published=false) an API version.set_domain_publish_statusSet domain publish statusPUTPublishes (published=true, the version becomes read-only) or unpublishes (published=false) a domain version.set_template_publish_statusSet template publish statusPUTPublishes (published=true) or unpublishes (published=false) a template version.
Private, 6 operations
get_api_visibilityGet api visibilityGETTells whether an API version is private (visible to its owner and collaborators) or public.get_domain_visibilityGet domain visibilityGETTells whether a domain version is private (visible to its owner and collaborators) or public.get_template_visibilityGet template visibilityGETTells whether a template version is private or public.set_api_visibilitySet api visibilityPUTMakes an API version private (private=true) or public (private=false).set_domain_visibilitySet domain visibilityPUTMakes a domain version private (private=true) or public (private=false).set_template_visibilitySet template visibilityPUTMakes a template version private (private=true) or public (private=false).
Project, 6 operations
add_definition_to_projectAdd definition to projectPUTAdds one API (specType=apis) or domain (specType=domains) of the organization to a project.create_projectCreate projectPOSTCreates a project in an organization, optionally listing the APIs and domains (of that same organization) it contains.delete_projectDelete projectDELETEDeletes a project. The APIs and domains it grouped are not deleted.get_projectGet projectGETReturns one project of an organization: its name, description and the names of its APIs and domains.list_projectsList projectsGETLists the projects of an organization with the names of the APIs and domains each contains (or only names and descriptions with nameOnly=true). Projects depend on the organization's plan.update_projectUpdate projectPUTUpdates a project's name, description and contents. The apis and domains lists REPLACE the current ones, so send existing and new names together; to add one definition use add_definition_to_project.
Reply, 6 operations
add_api_comment_replyAdd api comment replyPOSTReplies to a comment on an API version and returns the created reply.add_domain_comment_replyAdd domain comment replyPOSTReplies to a comment on a domain version and returns the created reply.delete_api_comment_replyDelete api comment replyDELETEDeletes one reply to a comment on an API version.delete_domain_comment_replyDelete domain comment replyDELETEDeletes one reply to a comment on a domain version.update_api_comment_replyUpdate api comment replyPATCHEdits the text of one reply to a comment on an API version and returns the updated reply.update_domain_comment_replyUpdate domain comment replyPATCHEdits the text of one reply to a comment on a domain version and returns the updated reply.
Template, 6 operations
delete_templateDelete templateDELETEDeletes a template with all of its versions. A template that still has published versions is refused.delete_template_versionDelete template versionDELETEDeletes one version of a template.get_template_definitionGet template definitionGETReturns the full definition of one template version as a JSON object.list_templatesList templatesGETLists the templates (starting points for new API definitions) available to an owner, including SwaggerHub's built-in ones, with their title, specification and default version.list_template_versionsList template versionsGETLists every version of one template in APIs.json format, with each version's metadata.save_template_definitionSave template definitionPOSTCreates or updates a template from a complete API definition. The owner must be the account the API key belongs to, and the version saved is the version parameter, else the definition's info.version.
Default, 4 operations
get_api_default_versionGet api default versionGETReturns the identifier of the API's default version, such as 1.0.0. Use get_api_definition to read that version.get_domain_default_versionGet domain default versionGETReturns the identifier of the domain's default version, such as 1.0.0. Use get_domain_definition to read that version.set_api_default_versionSet api default versionPUTSets which existing version of the API is its default version.set_domain_default_versionSet domain default versionPUTSets which existing version of the domain is its default version.
Batch, 3 operations
batch_update_api_commentsBatch update api commentsPOSTApplies several comment changes on an API version in one call: add comments, edit or delete comments, change statuses, and add, edit or delete replies. Every field is optional.batch_update_domain_commentsBatch update domain commentsPOSTApplies several comment changes on a domain version in one call: add comments, edit or delete comments, change statuses, and add, edit or delete replies. Every field is optional.batch_update_template_commentsBatch update template commentsPOSTApplies several comment changes on a template version in one call: add comments, edit or delete comments, change statuses, and add, edit or delete replies. Every field is optional.
Fork, 3 operations
fork_apiFork apiPOSTForks an API version into an account you can write to, either as a new API or as a new version of an existing one (name plus a version that does not exist there yet).fork_domainFork domainPOSTForks a domain version into an account you can write to, either as a new domain or as a new version of an existing one (name plus a version that does not exist there yet).fork_templateFork templatePOSTForks a template version into an account you can write to, as a new template or as a new version of an existing one.
Rename, 3 operations
rename_apiRename apiPOSTRenames an API. newName must be 3 to 60 characters of letters, digits, dots, hyphens and underscores, starting and ending with a letter or digit.rename_domainRename domainPOSTRenames a domain. newName must be 3 to 60 characters of letters, digits, dots, hyphens and underscores, starting and ending with a letter or digit. A domain referenced from other definitions needs force=true.rename_templateRename templatePOSTRenames a template. newName must be 3 to 60 characters of letters, digits, dots, hyphens and underscores, starting and ending with a letter or digit.
Clone, 2 operations
clone_api_versionClone api versionPOSTCopies an API version into a new version of the same API with an updated info.version. Comments and integrations are not copied, and the default version does not change.clone_domain_versionClone domain versionPOSTCopies a domain version into a new version of the same domain with an updated info.version. Comments and integrations are not copied, and the default version does not change.
Status, 2 operations
set_api_comment_statusSet api comment statusPUTResolves (RESOLVED) or reopens (OPEN) one comment on an API version.set_domain_comment_statusSet domain comment statusPUTResolves (RESOLVED) or reopens (OPEN) one comment on a domain version.
Domain yaml, 1 operation
get_domain_definition_yamlGet domain definition yamlGETReturns the full definition of one domain version as YAML text. Set resolved=true to inline every external $ref.
Execute, 1 operation
run_api_integrationRun api integrationPOSTRuns an existing integration now. A source control integration pushes the generated code or definition to its repository and branch (with an optional commit message); webhooks cannot be run this way.
Spec, 1 operation
search_registrySearch registryGETSearches the SwaggerHub registry (public definitions plus private ones you can access) for APIs, domains and templates by free text, type, owner, visibility and publish state. Returns APIs.json entries whose properties carry each definition's URL.
Standardization, 1 operation
get_api_standardization_errorsGet api standardization errorsGETReturns the standardization (style rule) violations of an API version according to its organization's rules: line number, description and severity of each.
Swagger yaml, 1 operation
get_api_definition_yamlGet api definition yamlGETReturns the full definition of one API version as YAML text. Set resolved=true to inline every external $ref.
Validate, 1 operation
validate_definitionValidate definitionPOSTChecks that a complete OpenAPI or AsyncAPI definition (YAML or JSON text) is structurally valid and returns its detected type and version, error and warning counts and each finding with line and column. Standardization rules are not applied.
Use SwaggerHub from Claude Code, Cursor or Codex
Connect SwaggerHub in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its SwaggerHub operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect SwaggerHub
- Create your workspace
Sign up free. Nothing to install.
- Connect SwaggerHub once
Add your SwaggerHub connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
SwaggerHub integration FAQ
What can you do with the SwaggerHub integration?
LiveContext exposes 80 operations on SwaggerHub, covering comment, apis, domain and integration.
