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")  # optional
result, 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 optional
var 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") # optional
let 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

FieldTypeRequiredNotes
payloadobjectyesArbitrary JSON. Delivered verbatim to the endpoint URL.
idempotencyKeystringnoDedupes 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"
}
FieldTypeNotes
deliveryIdstringInternal ID of the queued delivery. Use it with the Management API to inspect status.
idempotencyKeystringEchoes the supplied key, or returns a Nahook-generated UUID if none was provided.
statusstringAlways "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

StatusCodeWhen
401unauthorizedMissing, malformed, or revoked API key.
404not_foundThe endpoint doesn't exist or is in a different environment than the API key.
413payload_too_largePayload exceeded your plan's per-payload cap.
429rate_limitedWorkspace or per-API-key rate limit hit.
504ingest_timeoutServer-side ingest exceeded 5 s. Safe to retry.