Skip to main content
POST
/
v1
/
mock-apis
Create a new mock API
curl --request POST \
  --url https://wmc.wiremockapi.cloud/v1/mock-apis \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "mockApi": {
    "name": "<string>",
    "description": "<string>",
    "apiTemplateId": "<string>",
    "type": "openapi",
    "hostname": "<string>"
  }
}
'
{
  "mockApi": {
    "id": "<string>",
    "name": "<string>",
    "state": "<string>",
    "adminSecurityEnabled": true,
    "createdDate": "<string>",
    "links": {
      "self": "<string>",
      "requests": "<string>",
      "mappings": "<string>",
      "scenarios": "<string>",
      "recordings": {
        "start": "<string>",
        "stop": "<string>",
        "status": "<string>",
        "snapshot": "<string>"
      },
      "imports": "<string>",
      "organisation": "<string>",
      "invitations": "<string>",
      "acl": "<string>",
      "versionHistoryCommits": "<string>",
      "securitySettings": "<string>",
      "exports": {
        "wiremock": "<string>"
      }
    },
    "domainNames": [
      {
        "domainName": "<string>",
        "urls": [
          {
            "url": "<string>"
          }
        ]
      }
    ],
    "baseUrl": "<string>",
    "domains": [
      "<string>"
    ],
    "description": "<string>",
    "type": "openapi",
    "aclObject": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Your API key prefixed by 'Token '

Body

application/json
mockApi
object

Response

201 Created response

mockApi
object
required