Create a server response
Creates a server response. Server responses let you simulate 5xx server-level responses, such as 500 or 503.
Server-level responses are agnostic to application-level logic. Server responses let you simulate this behavior on a mock server. You do not need to define each error for all exposed paths on the mock server.
If you set a server response as active, then all the calls to the mock server return with that active server response.
**Note:**
You can create multiple server responses for a mock server, but only one mock server can be set as active.
Authentication
x-api-keystring
API Key authentication via header
Path parameters
mockId
The mock's ID.
Request
This endpoint expects an object.
serverResponse
Response
Successful Response
createdAt
The date and time at which the server response was created.
updatedAt
The date and time at which the server response was last updated.
id
The server response's ID.
name
The server response's name.
statusCode
The server response's 5xx HTTP response code.
headers
The server response’s request headers key-value pairs, such as Content-Type, Accept, encoding, and other information.
language
The server response's body language type.
body
The server response's body that returns when calling the mock server.
createdBy
The user ID of the user who created the server response.
updatedBy
The user ID of the user who last updated the server response.
mock
The associated mock server's ID.
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error