The fact that your company paid for its software does not mean it owns it. In Spain, code belongs to whoever writes it until they assign their rights, with one exception: what salaried employees create in the course of their duties. What the founders wrote before incorporating the company, or what a freelancer or an agency writes, needs a written assignment, and its content decides what the company can do with the code. We explain how each case works, what the assignment should say and how to put things in order before a round or a sale.
If you need a software intellectual property lawyer, request a free initial assessment.
Spain’s Intellectual Property Act (TRLPI) (in Spanish) protects computer programs as works, provided they are original. Protection arises on creation, without registration (Article 1), and covers any form of expression of the program, its preparatory design material and its successive versions (Article 96). Its author is the natural person or group of persons who created it (Article 97(1)), and in principle the exploitation rights belong to them: reproducing, transforming and distributing it (Article 99).
For software to belong to the company, one of two things is needed: either it was written by a salaried employee on the terms of Article 97(4), or its author has assigned the rights to the company.
When a salaried employee creates a program in the course of the duties entrusted to them or following the employer’s instructions, the exploitation rights in both the source code and the object code belong exclusively to the employer, unless otherwise agreed (Article 97(4)).
The caveats lie in those conditions. The rule covers what the employee writes within their duties or on the company’s instructions, not any code they write while employed. If a developer creates a tool outside their duties that the company ends up using, the rule does not settle it on its own. That is why the employment contract should describe the development duties and include an intellectual property clause for borderline cases.
This is the most common case in a startup. The founders write the first version of the product before incorporating the company, and that code is theirs, not that of a company that does not yet exist. For it to pass to the company, a written assignment is needed, on incorporation or later.
Nor should you assume that what a founder writes afterwards belongs to the company. Article 97(4) refers to salaried employees, and many founders are shareholders and directors without an employment contract. The prudent course is to document the assignment of what they write for the company too, periodically or through an agreement governing their development work, bearing in mind that the law makes void any assignment of all the works the author may create in the future (Article 43(3)).
A freelancer who develops software on commission is its author and rightholder. If the code is written by an agency’s employees, the rights belong to the agency (Article 97(4)), and it is the agency that has to assign them to the client. The development contract does not transfer the rights by itself: an assignment is needed, and the law is demanding about it.
In addition, the assignment does not extend to forms of exploitation that did not exist or were unknown when it was signed (Article 43(5)).
A well-drafted assignment does not fix what is not yours. Almost all software includes open source libraries, and their licences impose different conditions: some only require the copyright notice to be kept, while others require the source code of the program that incorporates them to be published when it is distributed. You need to know which components the product uses, under which licence and whether that licence fits the business model. It is also worth reviewing the terms of the AI coding assistants used to write part of the code and those of any third-party model the product integrates.
In a funding round or the sale of the company, the buyer wants to see the full chain of title to the software: who wrote each part, under which contract and which third-party licences it uses. Typical problems are a founder who never assigned the first version, a freelancer from the early months without a contract, an agency whose assignment does not include the source code and open source components that clash with the business model. Any of them can delay the deal or change its terms. We also cover this on our tech startup lawyer page.
It can almost always be fixed. The law prohibits assigning all of an author’s future works en bloc (Article 43(3)), but not assigning today what they have already written. An assignment can be signed now that identifies the code already delivered, with its scope, term and territory. The sooner the better: tracking down a freelancer from three years ago or negotiating with a former partner is harder with a round under way.
To strengthen the evidence, programs, their successive versions and derivative programs can be registered with the Spanish Intellectual Property Registry (Article 101), and the registered rights are presumed, unless proven otherwise, to exist and to belong to their holder (Article 145(3)).
This example is fictitious. Rutalia is a startup in Bilbao that sells route-planning software. Its two founders wrote the first version before incorporating the company, a freelancer developed the mobile app and, for the past year, two in-house developers have maintained the product. Before its seed round, Rutalia checks that what its employees write in the course of their duties belongs to the company, signs with the founders the assignment of the first version and tracks down the freelancer to sign an exclusive, worldwide assignment for the full term of the rights in the app already delivered. It also reviews the product’s open source licences and replaces a library that clashes with its licensing model.
If your product uses artificial intelligence, also review the legal requirements for launching an AI startup in Spain.
Yes, if they are a salaried employee and write it in the course of their duties or following the company’s instructions: the exploitation rights in the source code and object code belong exclusively to the employer, unless otherwise agreed (Article 97(4) of the Spanish Intellectual Property Act). Anything outside their duties should be dealt with in the contract.
Yes. The freelancer is the author and rightholder until they assign the rights, and every assignment must be made in writing (Article 45). Paying for the development is not enough: without an assignment that specifies the modes of exploitation, the company only has what necessarily follows from the contract and is indispensable for its purpose.
It is limited to five years and to the country where it is signed (Article 43(2)). And if it does not specify the modes of exploitation, it is limited to those that necessarily follow from the contract and are indispensable for its purpose. That is why the assignment should be exclusive, worldwide and for the full term of the rights, covering the modes the company will use.
Yes. The law makes void the assignment of all the works the author may create in the future (Article 43(3)), not of those already created. An assignment signed today can identify the code already delivered and put its ownership in order.
Before any transaction in which someone will review ownership of the software: a funding round, the sale of the company, a major licence agreement or the entry of a new partner. And every time an external developer delivers new code.
Code ownership is best put in order before anyone asks about it. At Innovatech we review the chain of title to software, draft assignments and licences and prepare registration where it makes sense, as part of our software intellectual property legal services. Tell us about your case and we will give you a free initial assessment.
Marta Suárez-Mansilla is Managing Partner of Innovatech Legal and a Spanish lawyer (abogada), Madrid Bar (ICAM), working in technology law. She completed Harvard Law School's Copyright course and BerkeleyX's Blockchain programme, and has advised technology companies for more than eight years.
