Skip to main content
Mock API Builder
Learning Center/Choosing a Protocol
ProtocolsNew

Choosing a Protocol

Mock API Builder supports REST, GraphQL, gRPC, and SOAP. Each project uses exactly one protocol — pick the one that matches the API you are mocking.

Supported protocols

Choose the protocol your client or backend contract already uses. You do not mix protocols inside a single project.

REST

HTTP resources with paths, methods, and JSON bodies. Define fields manually, paste JSON, or import OpenAPI/Swagger.

Best for: web and mobile apps that call REST APIs.

Try it live
GraphQL

Import a GraphQL SDL. Queries and mutations become mock operations served at a single endpoint.

Best for: apps that already speak GraphQL.

GraphQL guide Try it live
gRPC

Import a .proto file. Services and RPC methods become mock endpoints (unary and streaming).

Best for: microservice and mobile clients using protobuf.

gRPC guide Try it live
SOAP

Import a WSDL. Operations are mocked with SOAP envelope XML responses (SOAP 1.1 and 1.2 clients).

Best for: enterprise integrations that still use SOAP.

SOAP guide Try it live

Creating a project with a protocol

On the create-project form, REST is the default. To use another protocol:

  1. Open New Project (dashboard, projects page, or builder).
  2. Click Using GraphQL, gRPC, or SOAP? to expand the protocol picker.
  3. Select REST, GraphQL, gRPC, or SOAP.
  4. For REST, define a data structure or paste a spec. For GraphQL, gRPC, or SOAP, the project starts empty — you import the schema after creation.
  5. Create the project, then use Import on the project page to upload your SDL, .proto, or WSDL.

You can also create a blank project and let the first import lock the protocol. Once any endpoint exists, the project is locked to that protocol.

Protocol lock

Each project uses exactly one protocol. That rule is enforced on the server:

  • A brand-new project with no endpoints is unlocked until the first endpoint is created (manual add or import).
  • The first endpoint locks the project to that protocol (REST, GraphQL, gRPC, or SOAP).
  • Importing or adding an endpoint of a different protocol is rejected with HTTP 409 and a message like:
text

Need both REST and GraphQL? Create two projects — one per protocol — and point each client at the matching base URL.

Call URLs by protocol

Each protocol has its own request path. Using the wrong path is a common mistake when switching protocols.

REST
text
GraphQL
text
gRPC
text

Example: /api/grpc/users.v1.UserService/ListUsers

SOAP
text

Testing in the app

The project page opens a protocol-aware tester:

  • REST — method, path, headers, and JSON body
  • GraphQL — query editor against /api/graphql/{slug}
  • gRPC — method path and JSON payload (application/grpc+json)
  • SOAP — operation and XML envelope against /api/soap/{slug}

See Testing & Debugging APIs for details.

Interactive examples

Prefer a hands-on demo? Each protocol has a sample page with a sample schema and request:

REST & OpenAPIGraphQLgRPCSOAP

Next steps

GraphQL guideQuick Start (REST)Projects & Organization
One protocol per project keeps mocks predictable and easy to share.
Previous: Mock Data GenerationNext: GraphQL Mock APIs
Mock API Builder

Built for developers, by developers

DocumentationContactPrivacy PolicyTerms of Service

© 2026 Mock API Builder. All rights reserved.

Double-click for what's new
Learning Center
Learning Center