> ## Documentation Index
> Fetch the complete documentation index at: https://conductorone-docs-mcp-bridge-private-server.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Test

> Send a sample event to the webhook URL to verify that the endpoint is reachable and responding correctly.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/webhooks/{id}/test
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/webhooks/{id}/test:
    post:
      tags:
        - Webhook
      summary: Test
      description: >-
        Send a sample event to the webhook URL to verify that the endpoint is
        reachable and responding correctly.
      operationId: c1.api.webhooks.v1.WebhooksService.Test
      parameters:
        - in: path
          name: id
          required: true
          schema:
            description: The ID of the webhook to send a test event to.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/c1.api.webhooks.v1.WebhooksServiceTestRequestInput
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.webhooks.v1.WebhooksServiceTestResponse
          description: Successful response
      x-codeSamples:
        - lang: go
          label: Test
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/shared\"\n\tconductoronesdkgo \"github.com/conductorone/conductorone-sdk-go\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := conductoronesdkgo.New(\n        conductoronesdkgo.WithSecurity(shared.Security{\n            BearerAuth: \"<YOUR_BEARER_TOKEN_HERE>\",\n            Oauth: \"<YOUR_OAUTH_HERE>\",\n        }),\n    )\n\n    res, err := s.Webhooks.Test(ctx, operations.C1APIWebhooksV1WebhooksServiceTestRequest{\n        ID: \"<id>\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.WebhooksServiceTestResponse != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: >-
            import { ConductoroneSDKTypescript } from
            "conductorone-sdk-typescript";


            const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
              security: {
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
                oauth: "<YOUR_OAUTH_HERE>",
              },
            });


            async function run() {
              const result = await conductoroneSDKTypescript.webhooks.test({
                id: "<id>",
              });

              console.log(result);
            }


            run();
components:
  schemas:
    c1.api.webhooks.v1.WebhooksServiceTestRequestInput:
      description: The WebhooksServiceTestRequest message.
      title: Webhooks Service Test Request
      type: object
      x-speakeasy-name-override: WebhooksServiceTestRequest
    c1.api.webhooks.v1.WebhooksServiceTestResponse:
      description: The WebhooksServiceTestResponse message.
      properties:
        webhook:
          oneOf:
            - $ref: '#/components/schemas/c1.api.webhooks.v1.WebhookInstance'
            - type: 'null'
      title: Webhooks Service Test Response
      type: object
      x-speakeasy-name-override: WebhooksServiceTestResponse
    c1.api.webhooks.v1.WebhookInstance:
      description: The WebhookInstance message.
      properties:
        attempts:
          description: The attempts field.
          format: int32
          type:
            - integer
            - 'null'
        completedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        expiresAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        id:
          description: The id field.
          type:
            - string
            - 'null'
        lastAttemptedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        source:
          oneOf:
            - $ref: '#/components/schemas/c1.api.webhooks.v1.WebhookSource'
            - type: 'null'
        spec:
          oneOf:
            - $ref: '#/components/schemas/c1.api.webhooks.v1.WebhookSpec'
            - type: 'null'
        state:
          description: The state field.
          enum:
            - WEBHOOK_STATE_UNSPECIFIED
            - WEBHOOK_STATE_PENDING
            - WEBHOOK_STATE_RUNNING
            - WEBHOOK_STATE_ERROR
            - WEBHOOK_STATE_WAITING_CALLBACK
            - WEBHOOK_STATE_PROCESS_RESPONSE
            - WEBHOOK_STATE_SUCCESS
            - WEBHOOK_STATE_FATAL_ERROR
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
        updatedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        webhookId:
          description: The webhookId field.
          type:
            - string
            - 'null'
      title: Webhook Instance
      type: object
      x-speakeasy-name-override: WebhookInstance
    c1.api.webhooks.v1.WebhookSource:
      description: >
        The WebhookSource message.


        This message contains a oneof named source. Only a single field of the
        following list may be set at a time:
          - test
          - policyPostAction
          - approvalStep
          - provisionStep
          - workflowStep
      properties:
        approvalStep:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.webhooks.v1.WebhookSource.WebhookSourceApprovalStep
            - type: 'null'
        policyPostAction:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.webhooks.v1.WebhookSource.WebhookSourcePolicyPostAction
            - type: 'null'
        provisionStep:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.webhooks.v1.WebhookSource.WebhookSourceProvisionStep
            - type: 'null'
        test:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.webhooks.v1.WebhookSource.WebhookSourceTest
            - type: 'null'
        workflowStep:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.webhooks.v1.WebhookSource.WebhookSourceWorkflowStep
            - type: 'null'
      title: Webhook Source
      type: object
      x-speakeasy-name-override: WebhookSource
    c1.api.webhooks.v1.WebhookSpec:
      description: The WebhookSpec message.
      properties:
        destination:
          description: The destination field.
          type:
            - string
            - 'null'
      title: Webhook Spec
      type: object
      x-speakeasy-name-override: WebhookSpec
    c1.api.webhooks.v1.WebhookSource.WebhookSourceApprovalStep:
      description: The WebhookSourceApprovalStep message.
      properties:
        ticketId:
          description: The ticketId field.
          type:
            - string
            - 'null'
      title: Webhook Source Approval Step
      type: object
      x-speakeasy-name-override: WebhookSourceApprovalStep
    c1.api.webhooks.v1.WebhookSource.WebhookSourcePolicyPostAction:
      description: The WebhookSourcePolicyPostAction message.
      properties:
        ticketId:
          description: The ticketId field.
          type:
            - string
            - 'null'
      title: Webhook Source Policy Post Action
      type: object
      x-speakeasy-name-override: WebhookSourcePolicyPostAction
    c1.api.webhooks.v1.WebhookSource.WebhookSourceProvisionStep:
      description: The WebhookSourceProvisionStep message.
      properties:
        ticketId:
          description: The ticketId field.
          type:
            - string
            - 'null'
      title: Webhook Source Provision Step
      type: object
      x-speakeasy-name-override: WebhookSourceProvisionStep
    c1.api.webhooks.v1.WebhookSource.WebhookSourceTest:
      description: The WebhookSourceTest message.
      title: Webhook Source Test
      type: object
      x-speakeasy-name-override: WebhookSourceTest
    c1.api.webhooks.v1.WebhookSource.WebhookSourceWorkflowStep:
      description: The WebhookSourceWorkflowStep message.
      properties:
        workflowExecutionId:
          description: The workflowExecutionId field.
          format: int64
          type:
            - string
            - 'null'
        workflowStepId:
          description: The workflowStepId field.
          type:
            - string
            - 'null'
      title: Webhook Source Workflow Step
      type: object
      x-speakeasy-name-override: WebhookSourceWorkflowStep
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        This API uses OAuth2 with the Client Credential flow.

        Client Credentials must be sent in the BODY, not the headers.

        For an example of how to implement this, refer to the
        [c1TokenSource.Token()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````