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

# Активиране на входящ webhook за асистент

> Активиране на уведомления чрез входящ webhook за конкретен асистент

Този endpoint активира уведомленията чрез входящ webhook за асистент, позволявайки ви да получавате актуализации в реално време относно завършването на входящи обаждания и данните.

### Request Body

<ParamField body="assistant_id" type="integer" required>
  ID-то на асистента, за който да се активира webhook-ът
</ParamField>

<ParamField body="webhook_url" type="string" required>
  URL-то, където ще се изпращат webhook уведомленията
</ParamField>

### Response

<ResponseField name="message" type="string">
  Съобщение за успех, потвърждаващо че webhook-ът е активиран
</ResponseField>

<ResponseField name="data" type="array">
  Празен масив (запазен за бъдеща употреба)
</ResponseField>

### Error Responses

<ResponseField name="404 Not Found">
  <Expandable title="Error Response">
    <ResponseField name="message" type="string">
      Съобщение за грешка, когато асистентът не е намерен или не принадлежи на автентикирания потребител
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="422 Validation Error">
  <Expandable title="Error Response">
    <ResponseField name="message" type="string">
      Съобщение за грешка, указващо неуспешна валидация
    </ResponseField>

    <ResponseField name="errors" type="object">
      Подробни грешки от валидацията за всяко поле
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 Success Response theme={null}
  {
    "message": "Webhook enabled successfully",
    "data": []
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "message": "Assistant not found"
  }
  ```

  ```json 422 Validation Error theme={null}
  {
    "message": "The given data was invalid.",
    "errors": {
      "assistant_id": [
        "The assistant id field is required."
      ],
      "webhook_url": [
        "The webhook url field is required."
      ]
    }
  }
  ```
</ResponseExample>
