Skip to content
halyard
Sections menu

Halyard docsv2.4 current

Queues you talk to over HTTP

Publish, lease and acknowledge over one base URL; Halyard keeps ordering, retries and dead letters.

Search everything withK

POST/queues/orders/messages202

export API="https://api.halyard.dev/v1"

curl "$API/queues/orders/messages" \
  -H "Authorization: Bearer $HALYARD_KEY" \
  -H "Idempotency-Key: 8f14e45f" \
  -d '{"body": {"order_id": "ord_10427"}}'

# 202 Accepted
# {
#   "id": "msg_01HQ8Z3F",
#   "queue": "orders",
#   "state": "queued"
# }

Four requests

From empty account to delivered

A working consumer needs one queue, one publish, one lease and one ack.

  1. Create a queueName it, set the visibility timeout, and Halyard provisions it in the caller's region.
  2. PublishSend a JSON body with an idempotency key. A duplicate key returns the original message.
  3. LeaseAsk for up to 25 messages. They stay invisible to other consumers while the lease holds.
  4. AcknowledgeAck deletes the message. Nack returns it early instead of waiting for the timeout.
first-consumer.sh

export HALYARD_KEY="hk_live_2f9c…"
export API="https://api.halyard.dev/v1"

# 1. create
curl "$API/queues" \
  -d '{"name":"orders","visibility_timeout":"30s"}'

# 2. publish
curl "$API/queues/orders/messages" \
  -H "Idempotency-Key: 8f14e45f" \
  -d '{"body":{"order_id":"ord_10427"}}'

# 3. lease up to 25 messages, wait 20s for one to arrive
curl "$API/queues/orders/leases" -d '{"max":25,"wait":"20s"}'

# 4. acknowledge the lease you were handed
curl "$API/queues/orders/leases/lse_01HQ8Z/ack" -X POST

Still stuck?

Support answers API questions in one business day, with the engineer who owns the endpoint.

Or search everything withK