Adding Endpoints

Endpoints are the core of your API reference. Each endpoint documents a single API operation with its method, path, parameters, and example requests and responses.

Create an Endpoint

From your project dashboard, navigate to Endpoints and click Add Endpoint.

Every endpoint needs three things:

  • Method
    GET, POST, PUT, PATCH, or DELETE

  • Path
    The URL path using curly braces for path parameters
    Example: /users/{id}

  • Title
    A short, descriptive name
    Example: "Get User by ID"

Add a description to explain what the endpoint does, when to use it, and any important behavior your users should know about.

Define Parameters

Padle supports three types of parameters:

Path Parameters

Variables in the URL path, like {id} in /users/{id}.
Define the type, a description, and whether the parameter is required.

Query Parameters

Key-value pairs appended to the URL, like: ?page=1&limit=20

For each parameter, specify:

  • Name
  • Type
  • Description
  • Default value
  • Whether it is required or optional

Request Body

The JSON payload for POST, PUT, and PATCH requests.
Define each field with:

  • Name
  • Type
  • Description
  • Whether it is required

Add Request Examples

Request examples show your users exactly what to send. Provide a sample request body as JSON, and Padle automatically generates code examples in cURL, JavaScript, Python, and more.

You can add multiple examples if an endpoint accepts different payloads depending on the use case.

Add Response Examples

Document what your API returns by adding response examples for each status code:

  • 200
    Successful response with the expected payload

  • 201
    Resource created successfully

  • 400
    Validation errors or malformed requests

  • 401
    Authentication required or invalid credentials

  • 404
    Resource not found

For each status code, provide a description and a sample response body. This helps your users handle every scenario in their integration.

Authentication

Toggle Requires Authentication to indicate whether the endpoint needs an API key or token.

When enabled:

  • The endpoint displays an authentication badge in your docs
  • The API Playground prompts users to enter credentials before sending a request

The authentication type and header name are configured in Project Settings.

Draft and Publish

New endpoints are saved as drafts by default. Drafts are visible in your dashboard but do not appear in your published docs.

When your endpoint is ready, set its status to Published. You can switch an endpoint back to draft at any time to hide it from your live docs while you make changes.

Tips

  • Be specific with descriptions
    Do not just say "Creates a user." Explain required fields, validations, and the success response.

  • Include error responses
    Documenting 400 and 404 cases saves users time debugging.

  • Use realistic examples
    Sample data like [email protected] is more helpful than generic placeholders.

  • Group related endpoints
    If your API has resources like Users, Orders, and Products, grouping helps users quickly find what they need through navigation.

Adding Endpoints - Padle Documentation | Padle