openapi: 3.2.0 info: title: Relay External REST Webhooks API version: 1.1.0 description: REST API for programmatic access to Relay CRM resources. servers: - url: https://your-domain.com/api/v1 description: Production security: - bearerAuth: [] tags: - name: Webhooks paths: /webhooks: get: summary: List webhooks tags: - Webhooks parameters: - name: limit in: query description: Max results to return (default 50, max 100). schema: type: integer minimum: 1 maximum: 100 - name: cursor in: query description: Cursor for pagination (ISO date string). schema: type: string - name: offset in: query description: Optional offset for pagination (not used by all endpoints). schema: type: integer minimum: 0 responses: '200': description: Success content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Webhook' meta: $ref: '#/components/schemas/PaginationMeta' required: - data '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '429': description: Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' operationId: getWebhooks x-operation-id-source: derived post: summary: Create webhook tags: - Webhooks requestBody: required: true content: application/json: schema: type: object additionalProperties: true responses: '201': description: Success content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/Webhook' required: - data '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '429': description: Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' operationId: postWebhooks x-operation-id-source: derived /webhooks/{id}: get: summary: Get webhook tags: - Webhooks parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: Success content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/Webhook' required: - data '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '429': description: Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' operationId: getWebhooksById x-operation-id-source: derived patch: summary: Update webhook tags: - Webhooks parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: type: object additionalProperties: true responses: '200': description: Success content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/Webhook' required: - data '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '429': description: Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' operationId: patchWebhooksById x-operation-id-source: derived delete: summary: Delete webhook tags: - Webhooks parameters: - name: id in: path required: true schema: type: string format: uuid responses: '204': description: Deleted '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '429': description: Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' operationId: deleteWebhooksById x-operation-id-source: derived components: schemas: ErrorResponse: type: object properties: error: type: object properties: code: type: string message: type: string details: {} required: - code - message required: - error PaginationMeta: type: object properties: total: type: integer limit: type: integer next_cursor: type: - string - 'null' Webhook: type: object properties: id: type: string format: uuid event: type: string target_url: type: string additionalProperties: true securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key