Forge API

Core concepts

Projects

Projects organise related mock API endpoints under one public project key. You can create separate projects for different applications, clients, environments or development workflows.

Estimated time: 4 minutesDifficulty: Beginner

A project can contain many endpoints

Create one project for an application, then add all related endpoints inside it. For example, an online store project could contain product, customer, order and payment endpoints.

What is a project?

A project is a container for a group of related mock API endpoints.

Every project has:

Project name

A private name used to identify the project in your Forge API dashboard.

Description

An optional explanation of what the project represents or how it should be used.

Public project key

A unique value included in every public endpoint URL belonging to the project.

Mock endpoints

The GET, POST, PUT, PATCH, DELETE and other supported routes created inside the project.

A typical project may represent:

  • A frontend application under development
  • A mobile application prototype
  • A client demonstration
  • A QA or automated testing environment
  • An API contract shared between teams

Create a project

Create a new project from the dashboard before adding its endpoints.

  1. 1

    Open the Projects dashboard.

  2. 2

    Select New project.

  3. 3

    Enter a recognisable name such as Online Store.

  4. 4

    Optionally add a description explaining the purpose of the project.

  5. 5

    Save the project and begin adding endpoints.

Use clear project names

Names such as “Storefront Demo”, “Mobile App QA” or “Client Portal Prototype” make projects easier to identify than generic names such as “Test 1”.

Public project keys

Forge API assigns every project a unique public key.

The project key appears between the Forge API domain and the endpoint path:

URL
https://apis.getforgeapi.com/abc12/products
API domain
https://apis.getforgeapi.com
Project key
abc12
Endpoint path
/products

The project key is public

A project key identifies the project, but it is not a password. Anyone who knows a public endpoint URL may be able to call it unless you configure required request-header protection.

Organise related endpoints

Keep endpoints that belong to the same application inside one project.

For example, an online store project might include:

text
/products
/products/featured
/products/categories
/orders
/orders/latest
/users/profile

Every endpoint uses the same project key:

URL
https://apis.getforgeapi.com/abc12/products
https://apis.getforgeapi.com/abc12/orders
https://apis.getforgeapi.com/abc12/users/profile

Separate unrelated applications

Create a different project when endpoints belong to a different application, customer or test environment. This keeps URLs, settings and usage easier to manage.

Set a default project

The default project is used when generating an endpoint from the Forge API homepage.

When you use the homepage API generator, Forge API needs to know which project should receive the new endpoint. You can mark one existing project as your default.

  1. 1

    Open the project from your dashboard.

  2. 2

    Find the Project settings section.

  3. 3

    Select Make default.

You can change the default project later without changing any existing endpoint URLs.

Protect every endpoint in a project

Paid plans can require a secret request header across an entire project.

Project-level request-header protection is useful when many endpoints should require the same shared secret. Instead of configuring the same header on every endpoint, configure it once in the project settings.

Header name
x-project-key
Required value
your-secret-value

A caller must include the correct header:

bash
curl \
  -H "x-project-key: your-secret-value" \
  https://apis.getforgeapi.com/abc12/products

Requests with a missing or incorrect value receive an unauthorized response instead of the configured endpoint JSON.

Project and endpoint headers work together

An endpoint may also define its own required request headers. When both project-level and endpoint-level headers are configured, the caller must provide every required header before the request is accepted.

Do not expose secrets in frontend code

A shared secret placed directly in browser JavaScript can be viewed by users. Request-header protection is best suited to controlled clients, server-side applications, internal tools and test environments. It is not a replacement for a complete production authentication system.

Request-header protection is available on supported paid plans. View plans and pricing.

Edit project details

Update the project name and description without changing its endpoints.

Open the project and use the Project settings section to update:

  • Project name
  • Project description
  • Default-project selection
  • Required project request headers, when available

Existing URLs remain unchanged

Renaming a project or changing its description does not change its public project key or existing endpoint URLs.

Delete a project

Deleting a project permanently removes the project and its endpoints.

Only delete a project when you no longer need its endpoints. After deletion, applications using those URLs will receive a not-found response.

Deletion is permanent

Before deleting a project, save any JSON responses or configuration you may need later. Do not delete a project that is still used by an application, demonstration or automated test.

Project limits

The number of projects available depends on your Forge API plan.

Your dashboard displays the number of projects currently used and the maximum allowed by your plan. When the limit is reached, you can delete an unused project or upgrade your plan.

Create a project and start building

Organise your mock endpoints, share consistent API URLs and protect access with required request headers on supported plans.