Ingestion API
Send
Deliver a payload to a single endpoint by its ID
Deliver a payload to one specific endpoint. The endpoint must already exist in the API key's workspace (and environment, if the key is environment-scoped) — create it via the Management API or the dashboard.
POST /api/ingest/{endpointId}
Request
curl -X POST https://us.api.nahook.com/api/ingest/ep_abc123 \
-H "Authorization: Bearer nhk_us_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"payload": { "orderId": "ord_123", "status": "paid" },
"idempotencyKey": "order-123-paid"
}'const result = await nahook.send("ep_abc123", {
payload: { orderId: "ord_123", status: "paid" },
idempotencyKey: "order-123-paid", // optional
});result = client.send("ep_abc123", {
"orderId": "ord_123",
"status": "paid",
}, idempotency_key="order-123-paid") # optionalresult, err := c.Send(ctx, "ep_abc123", nahook.SendOptions{
Payload: map[string]any{"orderId": "ord_123", "status": "paid"},
IdempotencyKey: "order-123-paid", // optional
})import com.nahook.types.SendOptions;
import java.util.Map;
var payload = Map.of("orderId", "ord_123", "status", "paid");
SendResult result = client.send("ep_abc123",
new SendOptions(payload, "order-123-paid")); // idempotencyKey optionalvar result = await client.SendAsync("ep_abc123", new SendOptions {
Payload = new Dictionary<string, object> {
["orderId"] = "ord_123",
["status"] = "paid"
},
IdempotencyKey = "order-123-paid" // optional
});$result = $client->send("ep_abc123", [
"payload" => ["orderId" => "ord_123", "status" => "paid"],
"idempotencyKey" => "order-123-paid", // optional
]);result = client.send("ep_abc123",
payload: { order_id: "ord_123", status: "paid" },
idempotency_key: "order-123-paid") # optionallet result = client.send("ep_abc123", SendOptions {
payload: serde_json::json!({
"orderId": "ord_123",
"status": "paid"
}),
idempotency_key: Some("order-123-paid".into()), // optional
}).await?;Body
| Field | Type | Required | Notes |
|---|---|---|---|
payload | object | yes | Arbitrary JSON. Delivered verbatim to the endpoint URL. |
idempotencyKey | string | no | Dedupes requests with the same key for 15 minutes. Without it, every call creates a new delivery. |
Response
202 Accepted
{
"deliveryId": "del_xyz789",
"idempotencyKey": "order-123-paid",
"status": "accepted"
}| Field | Type | Notes |
|---|---|---|
deliveryId | string | Internal ID of the queued delivery. Use it with the Management API to inspect status. |
idempotencyKey | string | Echoes the supplied key, or returns a Nahook-generated UUID if none was provided. |
status | string | Always "accepted". The actual webhook delivery is asynchronous. |
When the same idempotencyKey is replayed within 15 minutes, the response echoes the original deliveryId — the second request is a no-op.
Errors
| Status | Code | When |
|---|---|---|
401 | unauthorized | Missing, malformed, or revoked API key. |
404 | not_found | The endpoint doesn't exist or is in a different environment than the API key. |
413 | payload_too_large | Payload exceeded your plan's per-payload cap. |
429 | rate_limited | Workspace or per-API-key rate limit hit. |
504 | ingest_timeout | Server-side ingest exceeded 5 s. Safe to retry. |