create_mock
Create a hosted mock from an OpenAPI 3.0/3.1 or Swagger 2.0 document (YAML or JSON), from TypeScript types (interfaces, types, enums: CRUD routes derived, or a route map type keyed like "GET /users") or from a Postman v2 collection, an Insomnia export (v4 JSON or v5 YAML), a Bruno collection (JSON export, or .bru files one after the other), a HAR file (headers and cookies are dropped, data is generated), a json-server db.json (records served as they are), curl commands, or a GraphQL schema (SDL or introspection JSON; Pro plan: queries, mutations and introspection answered on POST /graphql). OpenAPI 3.2 is read too. Give the document in spec, or its public address in url (then the mock re-reads it every six hours and follows changes). Returns the URL, the route list and an ownerToken to keep for later changes. Data is realistic and coherent, generated once. Without an account the mock lives seven days.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public URL of the document, instead of spec | |
| auto | No | With url: re-read every six hours (default true) | |
| seed | No | Data seed, for reproducible data sets | |
| slug | No | Desired subdomain (Pro plan) | |
| spec | No | The full document, verbatim: OpenAPI, Swagger, TypeScript types, a Postman, Insomnia or Bruno collection, a HAR file, a db.json or curl commands | |
| locale | No | Language of names, addresses, texts and error messages (default: the request's language, else English) |