> ## Documentation Index
> Fetch the complete documentation index at: https://agnt.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Endpoints

> Create and manage webhook endpoints to receive data from external services.

## Creating an Endpoint

<Steps>
  <Step title="Navigate to Webhooks">
    Go to **Webhooks** in the dashboard sidebar.
  </Step>

  <Step title="Click Create Endpoint">
    Click the **Create Endpoint** button.
  </Step>

  <Step title="Configure Endpoint">
    Enter a name and optional description for your endpoint.

    * **Name**: A URL-safe identifier (e.g., `stripe-events`, `github-hooks`)
    * **Description**: Optional notes about what this endpoint is for
  </Step>

  <Step title="Copy the URL">
    After creation, copy the endpoint URL to configure in your external service.
  </Step>
</Steps>

## Endpoint Naming Rules

Endpoint names must follow these rules:

* **Length**: 3-50 characters
* **Characters**: Lowercase alphanumeric and hyphens only
* **Start/End**: Must start and end with an alphanumeric character

<CardGroup cols={2}>
  <Card title="Valid Names" icon="check">
    - `stripe-events`
    - `github-push`
    - `my-webhook-1`
    - `orders`
  </Card>

  <Card title="Invalid Names" icon="xmark">
    * `ab` (too short)
    * `-webhook` (starts with hyphen)
    * `My_Webhook` (uppercase/underscore)
    * `events/stripe` (slashes)
  </Card>
</CardGroup>

## Managing Endpoints

### Viewing Endpoints

The Webhooks page in the dashboard shows all endpoints for your workspace, including:

* Endpoint name and description
* Endpoint URL for configuration
* Creation date
* Number of deliveries received

### Deleting an Endpoint

To delete an endpoint:

1. Go to **Webhooks** in the dashboard
2. Click on the endpoint you want to delete
3. Click **Delete Endpoint** and confirm

Deleting an endpoint deactivates it: the URL stops accepting new deliveries and the endpoint no longer appears in listings. Previously received deliveries are retained so you can still retrieve them via the API.

<Note>
  Because historic deliveries are preserved, endpoint names are reserved even after deletion — pick a new name if you need to recreate a similar endpoint.
</Note>

<Warning>
  Once deleted, the endpoint URL will reject new requests with `404 Webhook endpoint not found`. Re-point your upstream service before deleting.
</Warning>

## Configuring External Services

Once you have your endpoint URL, configure your external service to send webhooks to it.

### Stripe Example

1. Go to **Developers** → **Webhooks** in your Stripe dashboard
2. Click **Add endpoint**
3. Enter your agntdata webhook URL
4. Select the events you want to receive
5. Click **Add endpoint**

### GitHub Example

1. Go to your repository **Settings** → **Webhooks**
2. Click **Add webhook**
3. Enter your agntdata webhook URL as the Payload URL
4. Set Content type to `application/json`
5. Select events to trigger the webhook
6. Click **Add webhook**

### Generic Services

Most services have a webhook or callback URL setting. Enter your agntdata endpoint URL:

```
https://api.agntdata.dev/webhooks/ingest/{hookId}
```

The `hookId` is the endpoint's unique identifier, returned in the `id` and
`url` fields when you create the endpoint.

## Security Considerations

<AccordionGroup>
  <Accordion title="Endpoint URLs are Semi-Secret">
    Endpoint URLs are opaque (`/webhooks/ingest/{hookId}`) and not publicly discoverable. However, anyone with the URL can send data to it — treat it like a shared secret.
  </Accordion>

  <Accordion title="Validate Payloads">
    When processing deliveries, validate that the payload structure matches what you expect from your source service.
  </Accordion>

  <Accordion title="Use Webhook Signatures">
    Many services (Stripe, GitHub, etc.) sign their payloads. Store the signature from headers and verify it when processing.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Receiving Webhooks" icon="inbox" href="/webhooks/receiving">
    Learn about webhook payload format and structure.
  </Card>

  <Card title="Managing Deliveries" icon="list-check" href="/webhooks/deliveries">
    View and acknowledge webhook deliveries.
  </Card>
</CardGroup>
