Skip to content
LPR Studio
FREN
Contact us

IntegrationCustom softwareRequirementsBudget

Custom API development: when to build your own API, and how to scope it

11 min read

Build a custom API when other programs need reliable access to your data or processes: your own mobile app, a partner's system, a customer portal, or your internal tools. If all you need is for two off-the-shelf products to talk to each other, an existing connector or an integration platform is often enough. A custom API is a product in its own right: it has to be designed, documented, secured and maintained.

If "API" is still a fuzzy term, start with our plain-English explanation of APIs. This guide is for buyers who already have a project and want to know what to ask a development partner for.

Three situations where a custom API pays off

Opening your data to partners or customers

A distributor wants live stock levels. A key account wants to push orders straight from its ERP instead of emailing spreadsheets. A referral partner wants to track the files it sends you. In each case, an API replaces file transfers, double entry and phone calls. It is also a commercial asset: a customer whose systems are wired into yours is far less likely to switch suppliers.

Powering your own app or portal

A mobile app, a customer portal or an admin back office should not read the database directly. They go through an API, which centralises business rules and permissions so every screen applies the same ones. That is the standard architecture of modern business software, and what lets you add a new front end later without rewriting everything.

Connecting internal systems that were never meant to talk

Your legacy ERP only exposes a database, your scheduling tool only imports CSV files, your CRM has an API but not the fields you need. An intermediate API built for you becomes the single point of exchange: it translates, validates and logs. Our guide to integrating a custom app with an existing ERP covers this case in depth.

Private, partner or public: decide the audience first

The audience changes the effort far more than the technology does.

AudienceWho calls itWhat it demands
PrivateYour own apps and internal toolsClean design, tests, internal documentation
PartnerA known list of companiesContracts, per-partner keys, sandbox, support
PublicAnyone who signs upSelf-service onboarding, quotas, abuse handling

Most businesses need a private API first and a partner API second. A truly public API is rarely the right first step for a company whose core product is not the API itself.

When you do not need one

  • A native connector already exists, maintained by one of the vendors: start there.
  • The flows are few and simple: an automation platform such as n8n, Make, Zapier or Power Automate is often enough. Our n8n vs custom code comparison shows where those tools break.
  • A daily file exchange does the job: a well-built scheduled export is more robust than a poorly designed API.
  • Nobody will call it yet: an API built "for later" without a first consumer produces a contract nobody has validated.

What a production-grade API includes

An API that works in a demo is not an API ready to be opened to others. Here is what makes the difference.

ComponentWhat it is for
OpenAPI contractDescribes every endpoint, its parameters and its responses
AuthenticationKnowing who is calling: API keys, OAuth 2.0 for third parties
Object-level authorizationChecking the caller may see THIS order, not just orders
VersioningEvolving the API without breaking existing integrations
Rate limitingProtecting the service from greedy or malicious callers
Pagination and filteringNever returning a hundred thousand rows in one response
IdempotencyAn order sent twice is only created once
WebhooksTelling partners something changed instead of them polling
Explicit errorsA clear message and a stable code for every failure case
LoggingKnowing who called what, when, and with what result
Sandbox environmentLetting partners build without touching production
Public documentationExamples, a getting-started guide, announced changes

The OpenAPI contract deserves a special mention. It is an open standard whose version 3.2.0 was published on September 19, 2025 (official specification). Written before the code, it acts as the technical specification: partners can review it, tools generate documentation and tests from it, and it is easy to hand to another provider if you change.

REST, GraphQL, webhooks or files

Exchange styleWhen to choose it
RESTThe default: clear resources, varied partners
GraphQLMany different screens with very different read needs
WebhooksNotifying a third party that an event happened
Scheduled filesLarge volumes, legacy systems, nothing urgent
Message queuesHigh-volume internal flows that need retry on failure

Real APIs usually combine several: REST to read and create, webhooks to notify, a file export for history.

Security: the flaws that keep coming back

OWASP, the reference foundation for application security, publishes an API Security Top 10 (2023 edition). The first five, in business terms:

  1. Broken object-level authorization: a partner changes a number in the URL and reads another customer's order.
  2. Broken authentication: tokens that never expire, passwords that can be guessed endlessly.
  3. Broken object property-level authorization: the API returns fields that should stay internal (margins, private notes) or accepts changes to fields that should be read-only.
  4. Unrestricted resource consumption: one caller saturates the service or blows up your hosting bill.
  5. Broken function-level authorization: a read-only account manages to delete records.

None of these show up in a demo. They are prevented by design (permissions checked on every request, responses limited to what is needed), by automated tests, and by a penetration test before third parties get access. For the rest of the application, see our security essentials for business applications.

APIs and personal data

As soon as an API carries names, emails or addresses, data protection law applies to every exchange: the GDPR in Europe and the UK, and equivalent rules elsewhere. Three habits reduce the risk: expose only the fields each partner needs, log access so you can answer a request or investigate an incident, and put a data processing agreement in place with every partner that receives personal data. Our GDPR checklist for business applications goes further.

What drives the cost of a custom API

Price ranges published online diverge widely because they are not describing the same thing. Cost depends on six factors:

  • the number of resources and operations (reading stock levels is not creating an order with its validation rules);
  • the complexity of the business rules the API enforces;
  • how many systems sit behind it, and their condition;
  • the security level required: external partners, sensitive data, penetration testing;
  • documentation and partner onboarding;
  • availability requirements: an API taking orders overnight is not monitored like an internal lookup service.

On top of the build cost comes the running cost: hosting, monitoring, security updates, new versions. For how estimates are built, read what a custom business application costs.

An API lives on after delivery

Once third parties build on your API, you have made a de facto commitment. Three workstreams continue after go-live.

  • Monitoring: response times, error rates, call volume per partner. An alert should fire before a partner has to call you.
  • Security updates to the components it relies on, as vulnerabilities are published, without waiting for the next feature release.
  • Evolution: new fields, new operations, successive versions. Every breaking change is announced, dated, and paired with a period during which the previous version remains available.

Budget this from day one, as for any software in production. Our guide to business application maintenance explains what it covers.

Questions to ask your development partner

  1. Do you write the OpenAPI contract before the code, and will I review it?
  2. How do you check object-level permissions on every request?
  3. What versioning and deprecation policy do you propose?
  4. Which automated tests ship with the API?
  5. Who monitors the API in production, and how am I told about incidents?
  6. What do we receive if we change provider: code, specification, deployment scripts, access? Rights are defined case by case in the contract, so read that clause carefully.

Common mistakes

  • Mirroring the database. Exposing tables as they are freezes your internal structure: you can no longer change it without breaking partners. The API should reflect the business (an order, a case file), not the storage.
  • Opening without a sandbox. Partners then test in production, on your real data.
  • Ignoring failure cases. What happens when a partner orders an item that was discontinued yesterday? Quality is decided there, not on the happy path.
  • Undocumented changes. A field renamed without notice breaks an integration on a Friday evening.
  • Building alone. The first partner or app consuming the API should help design the contract.

Where to start

  1. Name the first consumer: which app or partner will call the API, and to do what.
  2. List the operations that first use case needs, and nothing more.
  3. Have the OpenAPI contract written and reviewed by that first consumer.
  4. Build, test, open to that one consumer, then widen access.

When the API powers a portal, a mobile app or an admin panel, the safest move is to see the screens that will use it before building it. We create a free visual prototype, presented on a video call within 5 business days: it reveals the data each screen needs, and therefore the API contract.

Frequently asked questions

What is the difference between API development and API integration?

API integration connects your software to an API another vendor already provides. API development means building your own API, so other programs such as your mobile app, a partner or a customer can use your data and processes. Once you build one, you own its security, its documentation and its stability over time.

Should a business API use REST or GraphQL?

REST suits the vast majority of business APIs: every developer knows it, it is documented with the OpenAPI standard and it caches well. GraphQL earns its place when many different screens query the same data in very different ways. For an API opened to external partners, REST remains the simplest and most widely supported choice.

How do you secure an API that partners can call?

Authenticate every caller, check on every request that the caller may access the specific object requested, and rate-limit usage. The OWASP API Security Top 10, 2023 edition, ranks broken object-level authorization as the number one risk. Add access logging, automated security tests and a penetration test before opening the API to third parties.

Who owns the code of a custom-built API?

Rights to the code, documentation and interface specification are defined case by case in the development contract. Before signing, check what you receive if you change provider: the source code, the OpenAPI specification, deployment scripts and environment access. Without those, taking over or extending the API later becomes slow and expensive for any new team.

When should an API be versioned?

From the moment any program you do not control calls it. A version number in the URL or a header lets the API evolve without breaking existing integrations. Announce every breaking change in advance, keep the previous version running for a stated period so partners can migrate, and only then retire it.