# POST Webhook Test

Создание и отправка sandbox.webhook.test.

## POST /api/sandbox/webhooks/test

> Создает \`sandbox.webhook.test\`, подписывает payload и пытается отправить его на включенный endpoint. Если endpoint не настроен, API вернет \`409 WEBHOOK\_ENDPOINT\_REQUIRED\`.

```json
{"openapi":"3.0.3","info":{"title":"Fundora API","version":"0.3.0"},"tags":[{"name":"post-webhook-test","description":"Создание и отправка sandbox.webhook.test."}],"servers":[{"url":"https://partner.fundora.capital","description":"Production-домен партнерского API"}],"security":[{"SandboxBearer":[]}],"components":{"securitySchemes":{"SandboxBearer":{"type":"http","scheme":"bearer","bearerFormat":"sk_sandbox"}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Обязательный уникальный ключ POST-операции, обычно UUID. Повтор того же POST с тем же endpoint-ом и телом вернет сохраненный результат с idempotency_replayed=true. Тот же ключ с другим телом или endpoint-ом вернет IDEMPOTENCY_KEY_CONFLICT. Отсутствующий ключ вернет IDEMPOTENCY_KEY_REQUIRED.","schema":{"type":"string","maxLength":255}}},"schemas":{"SandboxWebhookTestResponse":{"type":"object","properties":{"request_id":{"type":"string"},"idempotency_replayed":{"type":"boolean"},"success":{"type":"boolean"},"delivery":{"type":"object","properties":{"delivery":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SandboxWebhookDelivery"}]},"dispatched":{"type":"array","items":{"$ref":"#/components/schemas/SandboxWebhookDelivery"}}}},"webhook":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SandboxWebhookEndpoint"}]},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/SandboxWebhookDelivery"}}},"required":["request_id","success","delivery","webhook","deliveries"]},"SandboxWebhookDelivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"eventId":{"type":"string","format":"uuid"},"eventType":{"$ref":"#/components/schemas/SandboxWebhookEventType"},"status":{"type":"string","enum":["pending","processing","delivered","retrying","failed"]},"attemptCount":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time","nullable":true},"lastAttemptAt":{"type":"string","format":"date-time","nullable":true},"lastStatusCode":{"type":"integer","nullable":true},"lastError":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","eventId","eventType","status","attemptCount","createdAt","updatedAt"]},"SandboxWebhookEventType":{"type":"string","enum":["sandbox.loan_application.updated","sandbox.loan.issued","sandbox.loan.updated","sandbox.repayment.updated","sandbox.repayment.settled","sandbox.collateral.returned","sandbox.partner.updated","sandbox.webhook.test"],"description":"Тип webhook event."},"SandboxWebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox"]},"url":{"type":"string","format":"uri","description":"Публичный HTTPS endpoint партнера."},"enabled":{"type":"boolean"},"events":{"type":"array","items":{"$ref":"#/components/schemas/SandboxWebhookEventType"}},"secretPreview":{"type":"string","description":"Маскированный signing secret. Полный secret возвращается только при создании/ротации."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"disabledAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","environment","url","enabled","events","secretPreview","createdAt","updatedAt","disabledAt"]},"ErrorResponse":{"type":"object","properties":{"request_id":{"type":"string","description":"Идентификатор запроса для поддержки и поиска в Logs."},"error_code":{"type":"string","description":"Формализованный код ошибки для интеграционной логики.","enum":["SANDBOX_API_KEY_REQUIRED","SANDBOX_API_KEY_INVALID","SANDBOX_API_KEY_DATABASE_REQUIRED","SANDBOX_SESSION_REQUIRED","SANDBOX_RATE_LIMIT_EXCEEDED","INVALID_REQUEST","INVALID_ACTION","INVALID_SCOPE","LOAN_NOT_FOUND","WALLET_NOT_FOUND","FLOW_CONFLICT","LIMIT_EXCEEDED","INSUFFICIENT_BALANCE","IDEMPOTENCY_KEY_REQUIRED","IDEMPOTENCY_KEY_CONFLICT","IDEMPOTENCY_KEY_IN_PROGRESS","DATABASE_UNAVAILABLE","INTERNAL_ERROR"]},"error":{"type":"string","description":"Человекочитаемое описание ошибки. Не используйте его для интеграционной логики, для этого есть error_code."}},"required":["request_id","error_code","error"]}},"responses":{"Unauthorized":{"description":"Sandbox API-ключ отсутствует или недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Conflict":{"description":"Flow нельзя продолжить из текущего состояния, не хватает баланса/лимита или конфликтует Idempotency-Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"TooManyRequests":{"description":"Превышен Sandbox API rate limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/sandbox/webhooks/test":{"post":{"operationId":"sendSandboxWebhookTest","tags":["post-webhook-test"],"summary":"POST /api/sandbox/webhooks/test","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Тестовый webhook event создан и отправлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxWebhookTestResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"description":"Создает `sandbox.webhook.test`, подписывает payload и пытается отправить его на включенный endpoint. Если endpoint не настроен, API вернет `409 WEBHOOK_ENDPOINT_REQUIRED`."}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fundora.capital/api-sandbox/post-webhook-test.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
