# Publish OpenAPI specifications for the APIs

**URL:** <https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657>\
**Category:** HubSpot Ideas\
**Tags:** integrations\
**Created:** [December 11, 2019, 10:59am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657 "2019-12-11T10:59:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars-Erik](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lars-erik/32/28171_2.png) [@Lars-Erik](https://community.hubspot.com/u/Lars-Erik)\
**Post date:** [December 11, 2019, 10:59am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/1 "2019-12-11T10:59:08Z")

</div>

Hi,

I’m not the first to suggest this, and I know there are reasons it’s not concrete in a roadmap. See:  
[https://community.hubspot.com/t5/APIs-Integrations/Public-Hubspot-API-specs-schema-Swagger-like/m-p/297729](https://community.hubspot.com/t5/APIs-Integrations/Public-Hubspot-API-specs-schema-Swagger-like/m-p/297729)  
[https://community.hubspot.com/t5/APIs-Integrations/Swagger-documentation-wanted/m-p/293967](https://community.hubspot.com/t5/APIs-Integrations/Swagger-documentation-wanted/m-p/293967)

However, I would really like to log this as an idea for voting and visibility.

I would really like to be able to point to both OpenAPI 2 (swagger) and OpenAPI 3 versions of the specification.

Regarding the one endpoint that takes an input stream and makes it “impossible” today - just leave it out of the specs for now. Publish all compliant endpoints.

Even publish it without the one inputstream parameter.

Having OpenAPI specs will make it a breeze to integrate with for instance Azure Logic Apps, or use tools to autogenerate clients. (Like the “good old days” of WSDL)

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 30, 2016, 9:27am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/2 "2016-11-30T09:27:16Z")

</div>

If it is Open API (pka swagger) spec where can I find the definition(s) for the services. Sorry if this is a dumb question but I can’t seem to find any schema and the term Open Api is used throughout Hubspots own description and documentation.

Cheers

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [November 30, 2016, 1:31pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/3 "2016-11-30T13:31:40Z")

</div>

[@amatomike](https://community.hubspot.com/u/amatomike) We use the term Open API in the sense of a programmable interface that is open for developers of HubSpot customers to push and pull information from our platform. At the moment I do not believe we are part of the “Open API Initiative” and have not based our specs on the swagger specification standard.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 18, 2018, 11:12am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/4 "2018-09-18T11:12:42Z")

</div>

Hello,  
any news on this ? I m searching some yaml swagger open api def for Hubspot API !  
br  
Xavier

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [September 21, 2018, 9:28pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/5 "2018-09-21T21:28:47Z")

</div>

Hi [@xavier.rouhaud](https://community.hubspot.com/u/xavier.rouhaud),

This is something the team is very interested in; check out the current in-preview version of the Ecommerce Bridge API docs:

> **[Swagger UI](https://petstore.swagger.io/?url=https:%2F%2Fapi.hubapi.com%2Fapi-catalog%2Fv0%2Fapis%2Fextensions%2Fv1%2Fecomm%2F)**

---

<div class="post-metadata">

**Author:** ![thomashaines](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/thomashaines/32/27089_2.png) [@thomashaines](https://community.hubspot.com/u/thomashaines)\
**Post date:** [May 21, 2020, 8:11pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/6 "2020-05-21T20:11:23Z")

</div>

The official clients are generated from an OpenAPI file.

Just see github PHP client or node, e.g.

> <https://github.com/HubSpot/hubspot-api-nodejs/commit/b47a37492e14d31d62c16f7c35bfa6c0460564b7>
>
> Changes:
> - codegen data replaced with code generated by openapi-generator 4.2.3…
> - removed handling of \[\[typescript-node\]\[BUG\] create getter/setter for \`defaultHeaders\` property #4894\](https://github.com/OpenAPITools/openapi-generator/issues/4894) & \[\[typescript-node\]\[BUG\] all supported authentication method (not configured) applied to request #4895\](https://github.com/OpenAPITools/openapi-generator/issues/4895) issues from client code
> - removed redundant docker files from oauth-sample since docker files for building oauth-sample-app were added to project root folder
> - fixed default headers handling for requests created by apiRequest method

Not sure why the api model spec file being used in both projects is not made available? It would make developer experience much better, even if you just provided on a “use at own risk” type basis.

---

<div class="post-metadata">

**Author:** ![MindfulMike](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mindfulmike/32/102945_2.png) [@MindfulMike](https://community.hubspot.com/u/MindfulMike)\
**Post date:** [October 2, 2020, 1:19am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/7 "2020-10-02T01:19:02Z")

</div>

It’s 2020. It would be embarrassing in 2015 to not publish Swagger. Twice as embarrassing if you already have the Swagger and are not publishing it. That’s ok, HubSpot, each developer can reimplement every call for you by hand over and over.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 1, 2019, 8:38pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/8 "2019-10-01T20:38:09Z")

</div>

Hi, @wiebren.

Unfortunately, we aren’t able to generate a detailed Swagger spec for that endpoint at this time. One day, we hope for all of our docs to be [OpenAPI Specification (OAS)](https://swagger.io/specification/) compliant, however I can’t offer a concrete timeline right now.

In light of this, can I personally help clarify anything about that endpoint?

---

<div class="post-metadata">

**Author:** ![wiebren](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wiebren/32/5125_2.png) [@wiebren](https://community.hubspot.com/u/wiebren)\
**Post date:** [October 7, 2019, 7:18am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/9 "2019-10-07T07:18:41Z")

</div>

Hi Isaac,

Thanks for replying. Judging from your answer, if I would need the Swagger spec for this specific endpoint, I would need it to construct it myself? If that is at all possible, of course.

I did find this link, however:

[API Docs | HubSpot CRM | Cloud Elements API Docs](https://cloud-elements.github.io/docs/elements/hubspot-crm/ko/api-documentation.html?elementId=168#!/contacts/createContact). It does look like the kind of content that can be generated based on Swagger. I was wondering who is responsible for the content placed on Github?

Thanks, Wiebren

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 8, 2019, 3:13pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/10 "2019-10-08T15:13:02Z")

</div>

Hi, @wiebren.

My understanding is that we can programmatically generate Swagger specifications for many of our endpoints but _not_ the contact `createOrUpdate` endpoint at this time because it takes a raw `InputStream`. Because this is just a generic stream of input bytes, our tooling doesn’t define it in Swagger and the specification is incomplete. It is possible to create a Swagger spec for this endpoint manually.

Cloud Elements created and manages those specs. As a company which normalizes APIs into standard formats, they built their own API on top of HubSpot and produced Swagger specs for it.

---

<div class="post-metadata">

**Author:** ![Lars-Erik](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lars-erik/32/28171_2.png) [@Lars-Erik](https://community.hubspot.com/u/Lars-Erik)\
**Post date:** [December 11, 2019, 11:02am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/11 "2019-12-11T11:02:55Z")

</div>

Hi all,

I logged this to the idea forum for voting.

[https://community.hubspot.com/t5/HubSpot-Ideas/Publish-OpenAPI-specifications-for-the-APIs/idi-p/306…](https://community.hubspot.com/t5/HubSpot-Ideas/Publish-OpenAPI-specifications-for-the-APIs/idi-p/306942)

Lars-Erik

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [December 11, 2019, 12:59pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/12 "2019-12-11T12:59:46Z")

</div>

Thanks for sharing, @Lars-Erik. I’ve upvoted the idea!

---

<div class="post-metadata">

**Author:** ![maelle](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/maelle/32/76463_2.png) [@maelle](https://community.hubspot.com/u/maelle)\
**Post date:** [October 21, 2019, 9:33am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/13 "2019-10-21T09:33:56Z")

</div>

Hello here! I’m working on an [R client for the Hubspot API](https://github.com/lockedata/hubspot). I’m wondering whether there’s any public machine-readable schema available for the API?

For all methods it’d contain what’s in the docs HTTP method, format, authentication, rate limiting info, headers, product, required scope, optional and necessary parameters, output structure, e.g. in a big JSON.

The reason I’m asking is that I’d like to use such a machine readable schema to scaffold the functions in the R client (we want to add wrappers for each GET method at the moment).

Thank you!

Related posts I found

[https://community.hubspot.com/t5/APIs-Integrations/Swagger-documentation-wanted/m-p/294289/highlight/true#M27543](https://community.hubspot.com/t5/APIs-Integrations/Swagger-documentation-wanted/m-p/294289/highlight/true#M27543) _“One day, we hope for all of our docs to be [OpenAPI Specification (OAS)](https://swagger.io/specification/) compliant, however I can’t offer a concrete timeline right now.”_ Interesting, but I guess there’s already some sort of machine readable version of the API schema used to e.g. generate the docs, but maybe not public then?

[https://community.hubspot.com/t5/APIs-Integrations/Are-hubspots-API-s-open-api-spec-or-actually-just-api-s-that-are/m-p/222421/highlight/true#M1317](https://community.hubspot.com/t5/APIs-Integrations/Are-hubspots-API-s-open-api-spec-or-actually-just-api-s-that-are/m-p/222421/highlight/true#M1317) Not sure whether I could get the JSON for all methods, and if so how.

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [October 22, 2019, 2:33am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/14 "2019-10-22T02:33:39Z")

</div>

Hi @maelle,

Currently, our API public documentation isn’t any type of Swagger/[OpenAPI Specification (OAS)](https://swagger.io/specification/), it’s HubSpot form of documentation. Moving forward, the team is definitely looking to be OAS compliant however I can’t provide a specific date.

That said, do let me know if there’s any endpoint that I can help to clarify on.

---

<div class="post-metadata">

**Author:** ![maelle](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/maelle/32/76463_2.png) [@maelle](https://community.hubspot.com/u/maelle)\
**Post date:** [October 22, 2019, 5:29am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/15 "2019-10-22T05:29:37Z")

</div>

Thank you @WendyGoh!  
 ![16x16_woman-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/1/f165dd58251af40d1f169ec63d026d8f4a764bc0.png)  
I’m looking forward to using the machine readable schema when it exists, too bad there’s none at the moment!  
 ![16x16_smiley-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/2/22d5e40d253def47f5f4ea7f0e3e70be19010689.png)

---

<div class="post-metadata">

**Author:** ![thomashaines](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/thomashaines/32/27089_2.png) [@thomashaines](https://community.hubspot.com/u/thomashaines)\
**Post date:** [May 21, 2020, 7:34pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/16 "2020-05-21T19:34:48Z")

</div>

Hi Wendy

I do not believe this advice can be correct as of Jan 3 onwards.

The entire hubspot-api-php client is being generated from an OpenAPI definitions file. This is publicly evident / even in the commit at hotspot’s github account:

> <https://github.com/HubSpot/hubspot-api-php/commit/cadc319407fce0ef52a9501fcdefc218fe474d2d>

You can see PHP client in every file says \* Generated by: [https://openapi-generator.tech](https://openapi-generator.tech) / version: 3.3.4.

Given the choice of pre-built api clients is very limited, if you could make available the file used to call the OpenAPI Generator, it would allow developers to call from strongly typed languages such as Rust or Java. Any reason not to make file available? The (currently) unavailable file is being relied on for the official client, so any reason not to make it available?

---

<div class="post-metadata">

**Author:** ![Lars-Erik](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lars-erik/32/28171_2.png) [@Lars-Erik](https://community.hubspot.com/u/Lars-Erik)\
**Post date:** [December 11, 2019, 11:01am UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/17 "2019-12-11T11:01:49Z")

</div>

Hi all,

I logged this to the idea forum for voting.

[https://community.hubspot.com/t5/HubSpot-Ideas/Publish-OpenAPI-specifications-for-the-APIs/idi-p/306942](https://community.hubspot.com/t5/HubSpot-Ideas/Publish-OpenAPI-specifications-for-the-APIs/idi-p/306942)

Lars-Erik

---

<div class="post-metadata">

**Author:** ![hashtagdotnet](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hashtagdotnet/32/34870_2.png) [@hashtagdotnet](https://community.hubspot.com/u/hashtagdotnet)\
**Post date:** [January 22, 2020, 4:21pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/18 "2020-01-22T16:21:44Z")

</div>

I too would like to see OpenAPI documentation. The API docs are great, but having OpenAPI would significantly help in our integrations.

---

<div class="post-metadata">

**Author:** ![jgauffin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jgauffin/32/39641_2.png) [@jgauffin](https://community.hubspot.com/u/jgauffin)\
**Post date:** [May 27, 2020, 5:32pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/19 "2020-05-27T17:32:16Z")

</div>

Since the PHP client seems to be generated, why not just expose it? You can mark it as beta or whatever.

---

<div class="post-metadata">

**Author:** ![JoeMayall](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/joemayall/32/83822_2.png) [@JoeMayall](https://community.hubspot.com/u/JoeMayall)\
**Post date:** [June 1, 2020, 3:08pm UTC](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657/20 "2020-06-01T15:08:45Z")

</div>

Hi folks!

I’m happy to say that our Product team is exploring this idea. Stay tuned to this thread for more info!

Best,

Joe

Ideas Forum Manager

[Next page](https://community.hubspot.com/t/publish-openapi-specifications-for-the-apis/17657.md?page=2)
