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

# Get Assistant Webhook

Retrieves detailed information about a specific webhook configured for an assistant using the Rapida API.

<Info>
  For more authentication options, see: [https://doc.rapida.ai/api-reference/authentication](https://doc.rapida.ai/api-reference/authentication)
</Info>

### Parameters

<ParamField body="connectionConfig" type="ConnectionConfig" required>
  Configuration for the client connection.
</ParamField>

<ParamField body="request" type="GetAssistantWebhookRequest" required>
  <Expandable>
    <ParamField body="id" type="uint64" required>
      The unique identifier of the webhook to retrieve.
    </ParamField>

    <ParamField body="assistantId" type="uint64" required>
      The unique identifier of the assistant that owns the webhook.
    </ParamField>
  </Expandable>
</ParamField>

### Usage

<CodeGroup>
  ```python Python theme={null}
  from rapida import (
      ConnectionConfig,
      GetAssistantWebhookRequest,
      get_assistant_webhook,
  )
  from pprint import pprint
  connection_config = ConnectionConfig.default_connection_config(
      ConnectionConfig.with_sdk(
          "{rapida-api-key}"
      )
  )
  response = get_assistant_webhook(
      client_cfg=connection_config,
      request=GetAssistantWebhookRequest(
          id="{assistant_webhook_id}", assistantId="{assistant_id}"
      ),
  )
  pprint(response)

  ```

  ```go Go theme={null}
  package main
  import (
  	"context"
  	"fmt"
  	"os"

  	clients "github.com/rapidaai/rapida-go/rapida/clients"
  	rapida_proto "github.com/rapidaai/rapida-go/rapida/clients/protos"
  	connections "github.com/rapidaai/rapida-go/rapida/connections"
  )

  func main() {
  	// Configure client connection using RAPIDA_PROJECT_CREDENTIAL environment variable
  	connectionConfig := connections.
  		DefaultconnectionConfig(connections.WithSDK(os.Getenv("RAPIDA_PROJECT_CREDENTIAL")))

  	// Retrieve webhook information
  	response, err := clients.GetAssistantWebhook(context.Background(), connectionConfig, &rapida_proto.GetAssistantWebhookRequest{
  		AssistantId: 3456789876541212,
  		Id:          567898765456788765,
  	})

  	if err != nil {
  		fmt.Printf("Error while making call using rapida: %+v\n", err)
  		return
  	}

  	// Print the response
  	fmt.Printf("Rapida calling response: %+v\n", response)
  }
  ```

  ```typescript NodeJs theme={null}
  import {
    ConnectionConfig,
    GetAssistantWebhook,
    GetAssistantWebhookRequest,
  } from "@rapidaai/nodejs";

  (async () => {
    const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
      ConnectionConfig.WithSDK({
        ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
      })
    );
    getAssistantWebhook(45678903456789, 12345676543211);
  })();

  async function getAssistantWebhook(connectionCfg, assistantId, webhookId) {
    const request = new GetAssistantWebhookRequest();
    request.setAssistantId(assistantId);
    request.setId(webhookId);

    try {
      const response = await GetAssistantWebhook(connectionCfg, request);
      console.log("Assistant Webhook Response:", response.toObject());
    } catch (error) {
      console.error("Error with GetAssistantWebhook call:", error);
    }
  }

  ```
</CodeGroup>

### Response

<ParamField body="code" type="int32">
  Numeric status code for the operation.
</ParamField>

<ParamField body="success" type="boolean">
  Indicates whether the operation was successful.
</ParamField>

<ParamField body="data" type="AssistantWebhook">
  Detailed information about the assistant webhook.

  <Expandable>
    <ParamField body="id" type="uint64">
      Unique identifier for the webhook.
    </ParamField>

    <ParamField body="assistantEvents" type="string[]">
      Array of call, WebRTC, or conversation event names that trigger this webhook.
    </ParamField>

    <ParamField body="description" type="string">
      Description of the webhook's purpose and functionality.
    </ParamField>

    <ParamField body="provider" type="string">
      Webhook provider. HTTP webhooks use `http`.
    </ParamField>

    <ParamField body="options" type="Metadata[]">
      Delivery options for the webhook.

      <Expandable>
        <ResponseField name="http_method" type="string">
          HTTP method used for delivery. Supported values are `POST`, `PUT`, and `PATCH`.
        </ResponseField>

        <ResponseField name="http_url" type="string">
          Target URL where webhook requests are sent.
        </ResponseField>

        <ResponseField name="http_headers" type="string">
          JSON object containing HTTP headers included with each request.
        </ResponseField>

        <ResponseField name="retry_status_codes" type="string">
          JSON array of response status entries used by the delivery retry policy.
        </ResponseField>

        <ResponseField name="max_retry_count" type="string">
          Maximum number of retry attempts after a retryable failure.
        </ResponseField>

        <ResponseField name="timeout_seconds" type="string">
          Maximum time in seconds to wait for the webhook endpoint to respond.
        </ResponseField>
      </Expandable>
    </ParamField>

    <ParamField body="executionPriority" type="uint32">
      Priority level for webhook execution when multiple webhooks are triggered.
    </ParamField>

    <ParamField body="assistantId" type="uint64">
      Identifier of the assistant that owns this webhook.
    </ParamField>

    <ParamField body="status" type="string">
      Current status of the webhook (e.g., "active", "inactive").
    </ParamField>

    <ParamField body="createdBy" type="uint64">
      Identifier of the user who created the webhook.
    </ParamField>

    <ParamField body="createdUser" type="User">
      User object representing the creator of the webhook.
    </ParamField>

    <ParamField body="updatedBy" type="uint64">
      Identifier of the user who last updated the webhook.
    </ParamField>

    <ParamField body="updatedUser" type="User">
      User object representing the last updater of the webhook.
    </ParamField>

    <ParamField body="createdDate" type="timestamp">
      Timestamp when the webhook was created.
    </ParamField>

    <ParamField body="updatedDate" type="timestamp">
      Timestamp when the webhook was last updated.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="error" type="object">
  Error information, if applicable.

  <Expandable>
    <ResponseField name="errorCode" type="uint64">
      Numeric error code for machine-readable error handling.
    </ResponseField>

    <ResponseField name="errorMessage" type="string">
      Technical error message for debugging purposes.
    </ResponseField>

    <ResponseField name="humanMessage" type="string">
      Human-readable error message for user display.
    </ResponseField>
  </Expandable>
</ParamField>
