---
updatedAt: 2026-05-28T16:23:26.000Z
agentTools:
  projectIndex: https://docs.phacetlabs.com/llms.txt
---

# Create Webhook Endpoint

Creates a new webhook endpoint to receive events.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v2/webhooks/endpoints": {
      "post": {
        "description": "Creates a new webhook endpoint to receive events.",
        "operationId": "createEndpoint",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Webhook endpoint configuration",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully created webhook endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateEndpointResponseDto"
                },
                "example": {
                  "endpointId": "ep_1234567890abcdef",
                  "secret": "abcdefgh1234567890",
                  "url": "https://hooks.zapier.com/hooks/catch/12345/abcdef/",
                  "eventTypes": [
                    "phacet.created",
                    "row.created"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Returned when the request is invalid. The response body will contain a list of validation errors",
            "content": {
              "application/json": {
                "example": {
                  "message": "The value must be a string",
                  "errorKey": "BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Returned when the request is unauthorized.",
            "content": {
              "application/json": {
                "example": {
                  "message": "Unknown API key",
                  "errorKey": "UnauthorizedError"
                }
              }
            }
          },
          "404": {
            "description": "Returned when the requested resource could not be found within your organization",
            "content": {
              "application/json": {
                "example": {
                  "message": "The resource you are trying to access does not exist or is not accessible by your organization",
                  "errorKey": "NotFoundError"
                }
              }
            }
          },
          "500": {
            "description": "Returned when an error occurs on the server.",
            "content": {
              "application/json": {
                "example": {
                  "message": "An unexpected error occurred. Please try again later.",
                  "errorKey": "InternalServerError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create Webhook Endpoint",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "info": {
    "title": "Phacet API",
    "description": "Phacet API (current version with project support)",
    "version": "2.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.phacetlabs.com",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "CreateEndpointRequestDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL where webhooks will be sent",
            "example": "https://hooks.zapier.com/hooks/catch/12345/abcdef/",
            "format": "uri"
          },
          "eventTypes": {
            "description": "Array of event types to subscribe to",
            "example": [
              "phacet.created",
              "row.created"
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "type": "array"
          },
          "tableIds": {
            "description": "Array of table IDs to associate with this endpoint",
            "example": [
              "table_123",
              "table_456"
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "type": "array"
          },
          "description": {
            "type": "string",
            "description": "Optional description for the endpoint",
            "example": "Zapier integration for project management"
          }
        },
        "required": [
          "url",
          "eventTypes",
          "tableIds",
          "description"
        ]
      },
      "CreateEndpointResponseDto": {
        "type": "object",
        "properties": {
          "endpointId": {
            "type": "string",
            "description": "The unique identifier of the created endpoint",
            "example": "ep_1234567890abcdef"
          },
          "secret": {
            "type": "string",
            "description": "The secret key for webhook signature verification",
            "example": "abcdefgh1234567890"
          },
          "url": {
            "type": "string",
            "description": "The URL where webhooks will be sent",
            "example": "https://hooks.zapier.com/hooks/catch/12345/abcdef/",
            "format": "uri"
          },
          "eventTypes": {
            "description": "Array of event types subscribed to",
            "example": [
              "phacet.created",
              "row.created"
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "type": "array"
          }
        },
        "required": [
          "endpointId",
          "secret",
          "url",
          "eventTypes"
        ]
      }
    }
  }
}
```