Question: Recently I've been working on making some API calls to a 3rd party. I couldn't find anything available to use, so I had to do it from the ground up. Now I'm wondering whether it would be okay for me to rewrite all the platform specific parts and release that as open source (I'd say that would change ~50% of the code)?

Now the API doc that the other company gave me says "proprietary and confidential", but I assume that would apply only to the doc itself. Also when I asked them for help at one point they told me they don't support the language I am using. I have not signed a NDA specific to this, I have a general one in regards to client's data and info (and these are not clients). I am a bit hesitant to ask someone from my company about this since I have 0 experience when it comes to this sort of stuff, and I don't know whether they'd view it negatively..

**edit**

Thank you all for the advice. I do know that the code I write belongs to my employer, but I thought since most of what we do is platform dependent I'd have to majorly restructure it so it can work independently, and the rest could be considered a common way to do things. As for the proprietary API to which it would become a wrapper, it has wsdl and xsd schemas which can be accessed publicly (albeit you'd have to know where to get them), based on which a person can figure out how to use it. I guess the best thing really would be to speak to someone.. I'll let you know how it goes

Answer: 
Code you wrote for work is property of your company. Publishing it, as open source or otherwise, is copyright infringement and will get you fired. It also creates a legal nightmare for anyone taking this code, assuming it is open source, when in reality it is owned by your company. 

And “adapting” the code doesn’t help you. You’re creating a derivative work. Which is copyright infringement before you even copy your derived work.
**I am not a lawyer.** But a software developer (in France), and I do contribute (professionally) to open source projects, and sometimes even develop open source software professionally.

**You need to get permission from your employer.**

Remember that source code is often protected by copyright or trade secrets, and the source code you write at your workplace belongs (unless specified in writing by some contract) to your company. In some work contracts, every code you write (even at home) belongs to your employer.

A border-case line might be to rewrite that code in some other programming language (e.g. write in Rust at home something you wrote at work in C at your office). But even for that case, you'll better ask your boss (at least by email) and get permission from him/her.

In Europe, algorithms usually cannot be protected (but their source code implementation can and often is). In the USA, I heard that even algorithms can be patented.

BTW, you don't want trouble with your boss. So you should inform and ask him anyway. He could decide to help you officially putting that code as open source, or he could remind you that you could put yourself in big trouble. If you have some (written, at least in email) approval from your boss, at least you are acting in good faith.