Creating Applications

Applications are containers that group related endpoints together

What is an Application?

An Application in EchoMock is a logical container for your mock API endpoints. Each application has:

  • A unique name for identification
  • A unique slug used in the URL path
  • Optional authorization headers to simulate authentication
  • Optional authorization parameters for query-based auth

💡 Pro Tip: Use applications to organize different projects, API versions, or environments (dev, staging, production).

Creating Your First Application

Step 1: Access the Application Form

  1. Log in to your EchoMock dashboard
  2. Navigate to the Applications section
  3. Click the "Create Application" or "+" button

Step 2: Configure Basic Information

Name

A descriptive name for your application. This is displayed in the dashboard and helps you identify your application.

Examples:

  • My E-commerce API
  • User Service v2
  • Mobile App Backend

Slug

A URL-friendly identifier for your application. The slug becomes part of your API URL.

⚠️ Important: Slugs must be unique and URL-safe (lowercase letters, numbers, and hyphens only).

Example:

  • Name: My E-commerce API
  • Slug: my-ecommerce-api
  • Base URL: http://echomock.test/mock/retrieve/my-ecommerce-api

💡 Quick Action: Click the refresh button next to the slug field to generate a random slug automatically.

Authorization Configuration

EchoMock supports two types of authorization: header-based and parameter-based. Use these to simulate authenticated API endpoints.

Authorization Headers

Configure HTTP headers that must be present in requests to your mock API.

Field Description Example
Header The name of the HTTP header Authorization
Value The expected value for the header Bearer my-secret-token
Is enabled? Toggle to enable/disable this authorization check ✓ Enabled

Common Authorization Headers

Header: Authorization
Value: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Header: X-API-Key
Value: my-secret-api-key-12345

Header: X-Auth-Token
Value: abc123def456

Authorization Parameters

Configure query parameters that must be present in the request URL.

Field Description Example
Parameter The query parameter name api_key
Value The expected value for the parameter my-secret-key
Is enabled? Toggle to enable/disable this authorization check ✓ Enabled

Example Request with Parameter Authorization

GET http://echomock.test/mock/retrieve/my-api/users?api_key=my-secret-key

In this example, the request must include api_key=my-secret-key as a query parameter.

Complete Example

Here's a complete example of creating an application with authorization:

Application Setup

Name: E-commerce API
Slug: ecommerce-api

Authorization Header:
  Header: Authorization
  Value: Bearer secret-token-123
  Is enabled: ✓

Authorization Parameter:
  Parameter: api_key
  Value: abc123
  Is enabled: ✓

✓ Result

Base URL: http://echomock.test/mock/retrieve/ecommerce-api

Valid Request Example:

GET /mock/retrieve/ecommerce-api/products?api_key=abc123
Headers:
  Authorization: Bearer secret-token-123

Best Practices

✓ Use Descriptive Names

Choose names that clearly describe the purpose of your application.

✓ Keep Slugs Short

Shorter slugs are easier to remember and type.

✓ Organize by Project

Create separate applications for different projects or API versions.

✓ Enable Authorization When Needed

Use authorization to simulate real-world authentication scenarios.

✓ Test Your URLs

After creating an application, test the base URL to ensure it's working correctly.

✓ Use Consistent Naming

Maintain a consistent naming convention across all your applications.

Next Steps

Now that you've created an application, you're ready to add endpoints!

Create Your First Endpoint →