Integrations and endpoints
Creates an HTTPS destination for chosen event types, returns its signing secret once, and sends test deliveries whose results are recorded.
What integrations and endpoints does
Creates an HTTPS destination for chosen event types, returns its signing secret once, and sends test deliveries whose results are recorded.
When to use integrations and endpoints
- Connecting a partner system
- Validating a new receiver
- Staging before live
Authentication
Send an API key as a bearer token. Keys are shown once, belong in a server environment, and are bound to one environment: flw_test_ keys act in test and flw_live_ keys in live.
Authorization: Bearer flw_test_••••Endpoint
POST https://api.flowyn.dev/v1/endpointsRequest
Send an Idempotency-Key so a retried request cannot create a duplicate. The body is JSON.
curl -X POST https://api.flowyn.dev/v1/endpoints \
-H "Authorization: Bearer $FLOWYN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ep-orders" \
-d '{
"name": "Orders destination",
"url": "https://hooks.example.com/orders",
"event_types": [
"order.completed"
]
}'Response
Flowyn returns HTTP 200. The response is abridged here; the OpenAPI document lists every field.
{
"id": "5f9b2d7e-3a1c-4d6f-8b0e-4c2a9e7d1f38",
"environment": "test",
"name": "Orders destination",
"url": "https://hooks.example.com/orders",
"event_types": [
"order.completed"
],
"disabled": false,
"signing_secret": "whsec_•••• (shown once)",
"signing_secret_hint": "whsec_…a1b2"
}Lifecycle
- Create the endpoint.
signing_secretis returned once; store it. POST /v1/endpoints/{id}/testsends a test delivery and records its result.- Events whose type is in
event_typesare delivered to the endpoint. - Rotate the secret with
POST /v1/endpoints/{id}/rotate-secret, or disable the endpoint to stop deliveries without deleting history.
Status values
| Status | Meaning |
|---|---|
enabled (disabled: false) | Receives deliveries. |
disabled (disabled: true) | Kept, receives no deliveries. |
Retries
Deliveries to the endpoint follow the event retry policy.
Idempotency
Send Idempotency-Key on create.
Errors
| Status | type | Meaning |
|---|---|---|
| 400 | invalid_request | The body is not valid JSON, a field has the wrong type, or the body is over 1 MiB (body_too_large). |
| 401 | unauthorized | Missing, malformed, or revoked API key. |
| 402 | billing_error | The monthly credit allowance is used (credit_limit_exceeded). Reads keep working. |
| 403 | forbidden | The key lacks the ability this call needs (ability_required). |
| 404 | not_found | The id does not exist in this environment. |
| 409 | conflict | For example idempotency_mismatch: the Idempotency-Key was used with a different body. |
| 422 | invalid_request | A field value is out of range, for example invalid_timeout. |
| 429 | rate_limited | Too many requests (rate_limit_exceeded). Wait for Retry-After seconds. |
| 5xx | server_error | Flowyn failed. The body carries an error_id to quote to support. |
Limits
- HTTPS URLs only
timeout_ms100–30,000- Optional
max_sends_per_minute1–600
Read it back
Keep the id and read the resource whenever you need its current state.
curl https://api.flowyn.dev/v1/endpoints/5f9b2d7e-3a1c-4d6f-8b0e-4c2a9e7d1f38 \
-H "Authorization: Bearer $FLOWYN_API_KEY"Related
Next step
Watch the receiver itself with Monitors.
