create_endpoint
Create a webhook endpoint by providing a destination URL. Optionally assign to an environment or use the default.
Instructions
Create a new endpoint in the current workspace. If environment_id is omitted, the workspace's default environment is used. environment_id accepts either an env_xxx id or a slug like "production"/"staging". Returns the created endpoint with its newly-generated public id. Example: user says "create a webhook for https://example.com/hook" → call with url="https://example.com/hook". If the user explicitly names an environment ("in staging"), pass it; otherwise omit and the default is used. For the full endpoint schema, see resource nahook://schemas/endpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | destination URL the endpoint POSTs webhooks to | |
| type | No | webhook (default) or slack | |
| description | No | optional human-readable description | |
| environment_id | No | environment public id (env_xxx) or slug. If omitted, the workspace's default environment is used. Call list_environments to discover available environments. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | Yes | the endpoint |