API reference

Webhook endpoints

A webhook endpoint is a URL of yours that receives your Sublaunch's events as they happen. A Sublaunch has 10 at most. Read Webhooks for the events, their payloads and how to verify a signature.

The webhook endpoint object

A URL of yours that Sublaunch sends events to. See Webhooks for the events and how to verify them.

Attributes

  • idstring
    Unique identifier for the endpoint.
  • objectstring
    Always webhook_endpoint.
  • urlstring
    The HTTPS URL events are sent to.
  • descriptionstring or null
    Your note about the endpoint.
  • eventsarray of strings
    The event types sent to it.
    member.joinedmember.leftsubscription.canceledpayment.succeededlead.createdpost.publishedcomment.createdaffiliate.joined
  • statusstring
    Whether events are sent to it.
    enableddisabled
  • filtersobject
    Which events it gets, by tier.
  • disabled_reasonstring or null
    Why it is disabled. manual when you turned it off, failing when Sublaunch did after 3 days of failures and at least 8 failed attempts, creator_revoked when the key, the AI app or the team member that made it lost its access. null while enabled.
    manualfailingcreator_revoked
  • secretstring
    The signing secret, whsec_ and 24 characters. Only in the answers of create and roll secret.
  • created_atstring
    When the endpoint was created, ISO 8601.
  • updated_atstring
    When the endpoint last changed, ISO 8601.
Webhook endpoint object
{
  "id": "wh3LpX9dKe",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/sublaunch",
  "description": "CRM sync",
  "events": ["member.joined", "payment.succeeded"],
  "status": "enabled",
  "filters": {
    "tier_ids": ["tier1"]
  },
  "disabled_reason": null,
  "created_at": "2026-11-16T08:11:05.000Z",
  "updated_at": "2026-11-16T08:11:05.000Z"
}

List webhook endpoints

GET/v1/webhook_endpointsread scope

Returns the Sublaunch's webhook endpoints, without their secrets.

Query parameters

  • limitinteger
    How many objects to return, from 1 to 100. 25 by default.
  • cursorstring
    The next_cursor of the previous page, to get the page after it. Keep the other parameters the same. See Pagination.

Returns

A list of webhook endpoint objects.

Errors

GET/v1/webhook_endpoints
curl https://api.sublaunch.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "object": "list",
  "data": [
    {
      "id": "wh3LpX9dKe",
      "object": "webhook_endpoint",
      "url": "https://example.com/webhooks/sublaunch",
      "description": "CRM sync",
      "events": ["member.joined", "payment.succeeded"],
      "status": "enabled",
      "filters": {
        "tier_ids": ["tier1"]
      },
      "disabled_reason": null,
      "created_at": "2026-11-16T08:11:05.000Z",
      "updated_at": "2026-11-16T08:11:05.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create a webhook endpoint

POST/v1/webhook_endpointswrite scope

Registers a URL for one or more event types. Store the secret of the answer, it is the only time you see it.

Body parameters

  • urlstringRequired
    An HTTPS URL that answers on the public internet, on port 443 or 8443.
  • eventsarray of stringsRequired
    The event types to send, from 1 to 20.
    member.joinedmember.leftsubscription.canceledpayment.succeededlead.createdpost.publishedcomment.createdaffiliate.joined
  • descriptionstring
    A note for yourself, 500 characters at most.
  • filtersobject
    Which events to send, by tier.

Returns

The new webhook endpoint object with its secret.

Errors

POST/v1/webhook_endpoints
curl -X POST https://api.sublaunch.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks/sublaunch",
    "events": ["member.joined", "payment.succeeded"],
    "description": "CRM sync",
    "filters": {
      "tier_ids": ["tier1"]
    }
  }'
Response200
{
  "id": "wh3LpX9dKe",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/sublaunch",
  "description": "CRM sync",
  "events": ["member.joined", "payment.succeeded"],
  "status": "enabled",
  "filters": {
    "tier_ids": ["tier1"]
  },
  "disabled_reason": null,
  "created_at": "2026-11-16T08:11:05.000Z",
  "updated_at": "2026-11-16T08:11:05.000Z",
  "secret": "whsec_…"
}

Retrieve a webhook endpoint

GET/v1/webhook_endpoints/:idread scope

Returns one webhook endpoint, without its secret.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Returns

A webhook endpoint object.

Errors

GET/v1/webhook_endpoints/:id
curl \
  https://api.sublaunch.com/v1/webhook_endpoints/wh3LpX9dKe \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "id": "wh3LpX9dKe",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/sublaunch",
  "description": "CRM sync",
  "events": ["member.joined", "payment.succeeded"],
  "status": "enabled",
  "filters": {
    "tier_ids": ["tier1"]
  },
  "disabled_reason": null,
  "created_at": "2026-11-16T08:11:05.000Z",
  "updated_at": "2026-11-16T08:11:05.000Z"
}

Update a webhook endpoint

PATCH/v1/webhook_endpoints/:idwrite scope

Changes an endpoint. Set status to enabled to turn back on an endpoint Sublaunch disabled. A new url starts its failure count again.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Body parameters

  • urlstring
    A new HTTPS URL. It starts the endpoint's failure count again.
  • eventsarray of strings
    The event types to send, from 1 to 20.
    member.joinedmember.leftsubscription.canceledpayment.succeededlead.createdpost.publishedcomment.createdaffiliate.joined
  • descriptionstring
    A note for yourself, 500 characters at most.
  • statusstring
    Turns the endpoint on or off.
    enableddisabled
  • filtersobject
    Which events to send, by tier.

Returns

The updated webhook endpoint object.

Errors

  • No webhook endpoint with this ID in the key's Sublaunch.
  • A parameter has a value the API does not accept. param names it.
  • The body has a field this endpoint does not take.
  • The URL is not HTTPS, has credentials in it, uses a port other than 443 or 8443, or points to a private address.
  • More than 30 endpoint changes in the hour on the Sublaunch.
PATCH/v1/webhook_endpoints/:id
curl -X PATCH \
  https://api.sublaunch.com/v1/webhook_endpoints/wh3LpX9dKe \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "enabled"
  }'
Response200
{
  "id": "wh3LpX9dKe",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/sublaunch",
  "description": "CRM sync",
  "events": ["member.joined", "payment.succeeded"],
  "status": "enabled",
  "filters": {
    "tier_ids": ["tier1"]
  },
  "disabled_reason": null,
  "created_at": "2026-11-16T08:11:05.000Z",
  "updated_at": "2026-11-16T08:11:05.000Z"
}

Delete a webhook endpoint

DELETE/v1/webhook_endpoints/:idwrite scope

Deletes an endpoint. Deliveries still waiting for a retry are dropped.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Returns

An object with the endpoint's id and deleted set to true.

Errors

DELETE/v1/webhook_endpoints/:id
curl -X DELETE \
  https://api.sublaunch.com/v1/webhook_endpoints/wh3LpX9dKe \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "id": "wh3LpX9dKe",
  "object": "webhook_endpoint",
  "deleted": true
}

Roll the signing secret

POST/v1/webhook_endpoints/:id/roll_secretwrite scope

Replaces the endpoint's secret at once, the old one stops working. Deliveries that fail meanwhile are retried, signed with the new secret.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Returns

The webhook endpoint object with its new secret.

Errors

POST/v1/webhook_endpoints/:id/roll_secret
curl -X POST \
  https://api.sublaunch.com/v1/webhook_endpoints/wh3LpX9dKe/roll_secret \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "id": "wh3LpX9dKe",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/sublaunch",
  "description": "CRM sync",
  "events": ["member.joined", "payment.succeeded"],
  "status": "enabled",
  "filters": {
    "tier_ids": ["tier1"]
  },
  "disabled_reason": null,
  "created_at": "2026-11-16T08:11:05.000Z",
  "updated_at": "2026-11-16T08:11:05.000Z",
  "secret": "whsec_…"
}

Send a test event

POST/v1/webhook_endpoints/:id/testwrite scope

Sends a sample event of the endpoint's first event type, with data.test set to true and IDs starting with test_. One attempt, no retry, and it never counts as a failure of the endpoint.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Returns

A webhook delivery object with the status and status_code your endpoint answered.

Errors

POST/v1/webhook_endpoints/:id/test
curl -X POST \
  https://api.sublaunch.com/v1/webhook_endpoints/wh3LpX9dKe/test \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "id": "dl7Kq2XmP9aB",
  "object": "webhook_delivery",
  "endpoint_id": "wh3LpX9dKe",
  "event_id": "evt_4hX9kQ2mLp7RtV3nB8cZ1yWd",
  "event_type": "member.joined",
  "status": "succeeded",
  "attempts": 1,
  "status_code": 200,
  "error": null,
  "test": true,
  "next_attempt_at": null,
  "last_attempt_at": "2026-11-17T09:30:00.000Z",
  "created_at": "2026-11-17T09:30:00.000Z"
}

The webhook delivery object

One event sent to one endpoint, with its attempts and your server's last answer.

Attributes

  • idstring
    Unique identifier for the delivery.
  • objectstring
    Always webhook_delivery.
  • endpoint_idstring
    The endpoint it was sent to.
  • event_idstring
    The event sent, the id your server received.
  • event_typestring or null
    The event's type.
    member.joinedmember.leftsubscription.canceledpayment.succeededlead.createdpost.publishedcomment.createdaffiliate.joined
  • statusstring
    pending while attempts are left, then succeeded or failed.
    pendingsucceededfailed
  • attemptsinteger
    Attempts made so far, 8 at most.
  • status_codeinteger or null
    The HTTP status of your last answer. null when there was none, after a timeout or a connection error.
  • errorstring or null
    What went wrong on the last attempt, like the status and the start of your answer, or a timeout.
  • testboolean
    true for a test event.
  • next_attempt_atstring or null
    When the next attempt is due, while pending.
  • last_attempt_atstring or null
    When the last attempt was made.
  • created_atstring or null
    When the delivery was created, ISO 8601.
  • requestobject
    Only from Retrieve a delivery. The request Sublaunch sent, its method, url and headers, the signature named but not shown.
  • payloadobject or null
    Only from Retrieve a delivery. The event as it was posted.
Webhook delivery object
{
  "id": "dl2Rm8QkX4pC",
  "object": "webhook_delivery",
  "endpoint_id": "wh3LpX9dKe",
  "event_id": "evt_8kQ2vXr4LmT9wPz1Hc6YbN3d",
  "event_type": "payment.succeeded",
  "status": "pending",
  "attempts": 2,
  "status_code": 503,
  "error": "HTTP 503 Service Unavailable",
  "test": false,
  "next_attempt_at": "2026-11-17T10:06:00.000Z",
  "last_attempt_at": "2026-11-17T10:01:00.000Z",
  "created_at": "2026-11-17T10:00:00.000Z"
}

List deliveries

GET/v1/webhook_endpoints/:id/deliveriesread scope

Returns the endpoint's latest deliveries, newest first, test events included. Deliveries are kept 30 days.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Query parameters

  • limitinteger
    How many deliveries to return, from 1 to 100. 25 by default.

Returns

A list of webhook delivery objects. This list has no next_cursor, raise limit to see more.

Errors

GET/v1/webhook_endpoints/:id/deliveries
curl -G \
  https://api.sublaunch.com/v1/webhook_endpoints/wh3LpX9dKe/deliveries \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -d limit=10
Response200
{
  "object": "list",
  "data": [
    {
      "id": "dl2Rm8QkX4pC",
      "object": "webhook_delivery",
      "endpoint_id": "wh3LpX9dKe",
      "event_id": "evt_8kQ2vXr4LmT9wPz1Hc6YbN3d",
      "event_type": "payment.succeeded",
      "status": "pending",
      "attempts": 2,
      "status_code": 503,
      "error": "HTTP 503 Service Unavailable",
      "test": false,
      "next_attempt_at": "2026-11-17T10:06:00.000Z",
      "last_attempt_at": "2026-11-17T10:01:00.000Z",
      "created_at": "2026-11-17T10:00:00.000Z"
    },
    {
      "id": "dl7Kq2XmP9aB",
      "object": "webhook_delivery",
      "endpoint_id": "wh3LpX9dKe",
      "event_id": "evt_4hX9kQ2mLp7RtV3nB8cZ1yWd",
      "event_type": "member.joined",
      "status": "succeeded",
      "attempts": 1,
      "status_code": 200,
      "error": null,
      "test": true,
      "next_attempt_at": null,
      "last_attempt_at": "2026-11-17T09:30:00.000Z",
      "created_at": "2026-11-17T09:30:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Retrieve a delivery

GET/v1/webhook_endpoints/:id/deliveries/:delivery_idread scope

Returns one delivery with what it sent, the request's headers and the event's body as posted.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.
  • delivery_idstringRequired
    The delivery's ID.

Returns

A webhook delivery object with its request and payload.

Errors

GET/v1/webhook_endpoints/:id/deliveries/:delivery_id
curl \
  https://api.sublaunch.com/v1/webhook_endpoints/wh3LpX9dKe/deliveries/dl2Rm8QkX4pC \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "id": "dl2Rm8QkX4pC",
  "object": "webhook_delivery",
  "endpoint_id": "wh3LpX9dKe",
  "event_id": "evt_8kQ2vXr4LmT9wPz1Hc6YbN3d",
  "event_type": "payment.succeeded",
  "status": "pending",
  "attempts": 2,
  "status_code": 503,
  "error": "HTTP 503 Service Unavailable",
  "test": false,
  "next_attempt_at": "2026-11-17T10:06:00.000Z",
  "last_attempt_at": "2026-11-17T10:01:00.000Z",
  "created_at": "2026-11-17T10:00:00.000Z",
  "request": {
    "method": "POST",
    "url": "https://example.com/webhooks/sublaunch",
    "headers": {
      "Content-Type": "application/json; charset=utf-8",
      "User-Agent": "Sublaunch-Webhooks/1.0",
      "Sublaunch-Event-Id": "evt_8kQ2vXr4LmT9wPz1Hc6YbN3d",
      "Sublaunch-Event-Type": "payment.succeeded",
      "Sublaunch-Signature": "t=<timestamp>,v1=<signature>"
    }
  },
  "payload": {
    "id": "evt_8kQ2vXr4LmT9wPz1Hc6YbN3d",
    "object": "event",
    "type": "payment.succeeded",
    "created_at": "2026-11-17T10:00:00.000Z",
    "sublaunch_id": "q7RkX2LmPv",
    "data": {
      "object": {
        "id": "In7pQ2xKLm",
        "object": "payment",
        "amount": 29,
        "currency": "usd",
        "amount_creator": 26.1,
        "status": "paid",
        "type": "subscription",
        "member_id": "Ms8kL2QpXz",
        "email": "sam@example.com",
        "tier_id": "tier1",
        "affiliate_id": null,
        "paid_at": "2026-11-02T18:41:09.000Z"
      }
    }
  }
}