GunSpec

Webhooks

Signed delivery of catalog changes to your own endpoint. An endpoint subscribes to events (firearm.updated, catalog.resynced and the rest) and receives the same payload GET /v1/firearms/{id} returns, so a mirror can apply a delivery without re-fetching. Every request carries a signature made with the secret create() returns once. Failed deliveries are retried on a schedule, so a brief outage at your end costs nothing.

Authentifizierung erforderlichExplorer+

The account's endpoints with their subscribed events and delivery health.

list(params?: ListWebhookEndpointsParams): Promise<PaginatedResponse<WebhookEndpoint>>
GET/v1/me/webhooks

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • integerstandard1

    Page number, from 1 to 10,000

    Bereich
    1 – 10000
    Beispiel
  • integerstandard20

    Items per page (max 100)

    Bereich
    1 – 100
    Beispiel

  • WebhookEndpoint[]

    One page of results

  • string

    Opaque endpoint id. Address it at /v1/me/webhooks/{endpointId}.

  • string

    Absolute, directly fetchable URL.

  • string[]

    Event types this endpoint is subscribed to. The full list is on the POST operation.

  • string | null

    Prose summary of the record, where one has been written.

  • boolean

    False while the endpoint is paused. A paused endpoint receives nothing and is not retried.

  • string

    When the record was first added, YYYY-MM-DD HH:MM:SS in UTC.

  • string

    When the endpoint was last changed, ISO 8601.

  • number

    Current page number

  • number

    Items per page

  • number

    Total matching records (Builder and above)

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Mindeststufe
Explorer+
Monatskontingent
200/mo
Anfragerate
10/min
Tageslimit
50

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Authentifizierung erforderlichExplorer+

The response is the only one that carries the signing secret; store it.

create(params: CreateWebhookEndpointParams): Promise<APIResponse<WebhookEndpointCreated>>
POST/v1/me/webhooks

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Where deliveries are POSTed. A public https hostname on port 443: no IP address, no credentials in the URL, and not a gunspec.io or workers.dev host. Redirects are not followed, so register the final URL. At most 2,048 characters.

  • string[]erforderlich

    Event types this endpoint is subscribed to. The full list is on the POST operation.

  • string

    Prose summary of the record, where one has been written.

  • WebhookEndpointCreated

    The response payload

  • string

    Opaque endpoint id. Address it at /v1/me/webhooks/{endpointId}.

  • string

    Absolute, directly fetchable URL.

  • string[]

    Event types this endpoint is subscribed to. The full list is on the POST operation.

  • string | null

    Prose summary of the record, where one has been written.

  • boolean

    False while the endpoint is paused. A paused endpoint receives nothing and is not retried.

  • string

    When the record was first added, YYYY-MM-DD HH:MM:SS in UTC.

  • string

    When the endpoint was last changed, ISO 8601.

  • string

    HMAC signing secret. Returned only here, on creation. No other endpoint will show it again.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 413PAYLOAD_TOO_LARGERequest body too large
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Mindeststufe
Explorer+
Monatskontingent
200/mo
Anfragerate
10/min
Tageslimit
50

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Authentifizierung erforderlichExplorer+

One endpoint, with its recent delivery state.

get(id: string): Promise<APIResponse<WebhookEndpoint>>
GET/v1/me/webhooks/{endpointId}

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Webhook endpoint id

    Beispiel

  • WebhookEndpoint

    The response payload

  • string

    Opaque endpoint id. Address it at /v1/me/webhooks/{endpointId}.

  • string

    Absolute, directly fetchable URL.

  • string[]

    Event types this endpoint is subscribed to. The full list is on the POST operation.

  • string | null

    Prose summary of the record, where one has been written.

  • boolean

    False while the endpoint is paused. A paused endpoint receives nothing and is not retried.

  • string

    When the record was first added, YYYY-MM-DD HH:MM:SS in UTC.

  • string

    When the endpoint was last changed, ISO 8601.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Mindeststufe
Explorer+
Monatskontingent
200/mo
Anfragerate
10/min
Tageslimit
50

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Authentifizierung erforderlichExplorer+

Change an endpoint's URL, event list or enabled flag.

update(id: string, params: UpdateWebhookEndpointParams): Promise<APIResponse<WebhookEndpoint>>
PUT/v1/me/webhooks/{endpointId}

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Webhook endpoint id

    Beispiel

  • string

    Where deliveries are POSTed. A public https hostname on port 443: no IP address, no credentials in the URL, and not a gunspec.io or workers.dev host. Redirects are not followed, so register the final URL. At most 2,048 characters.

  • string[]

    Event types this endpoint is subscribed to. The full list is on the POST operation.

  • string

    Prose summary of the record, where one has been written.

  • boolean

    False while the endpoint is paused. A paused endpoint receives nothing and is not retried.

  • WebhookEndpoint

    The response payload

  • string

    Opaque endpoint id. Address it at /v1/me/webhooks/{endpointId}.

  • string

    Absolute, directly fetchable URL.

  • string[]

    Event types this endpoint is subscribed to. The full list is on the POST operation.

  • string | null

    Prose summary of the record, where one has been written.

  • boolean

    False while the endpoint is paused. A paused endpoint receives nothing and is not retried.

  • string

    When the record was first added, YYYY-MM-DD HH:MM:SS in UTC.

  • string

    When the endpoint was last changed, ISO 8601.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 413PAYLOAD_TOO_LARGERequest body too large
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Mindeststufe
Explorer+
Monatskontingent
200/mo
Anfragerate
10/min
Tageslimit
50

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Authentifizierung erforderlichExplorer+

Delete an endpoint. Undelivered retries for it are dropped with it.

delete(id: string): Promise<APIResponse<{ deleted: boolean }>>
DELETE/v1/me/webhooks/{endpointId}

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Webhook endpoint id

    Beispiel

  • object

    The response payload.

  • boolean

    Always true: the endpoint is gone once this returns.

  • string

    Id of the deleted endpoint.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Mindeststufe
Explorer+
Monatskontingent
200/mo
Anfragerate
10/min
Tageslimit
50

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.

Authentifizierung erforderlichExplorer+

Send a signed test delivery, so a new endpoint can be verified before an event depends on it.

test(id: string): Promise<APIResponse<WebhookTestResult>>
POST/v1/me/webhooks/{endpointId}/test

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Webhook endpoint id

    Beispiel

  • object

    The response payload.

  • boolean

    Whether your endpoint answered with a 2xx.

  • integer | null

    The status your endpoint returned. Null when the request never got a response: DNS failure, timeout, TLS error.

  • string | null

    Why the calculation could not be completed, or null when it succeeded.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Mindeststufe
Explorer+
Monatskontingent
200/mo
Anfragerate
10/min
Tageslimit
50

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.