Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Anyhook Net Connect API
version: 1.0.0
description: 'Operations tagged Connect across 2 of this provider''s published API definitions: openapi.json, anyhook-net-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://anyhook.net
description: Management API
- url: https://in.anyhook.net
description: Ingress (webhook receiver)
security:
- ApiKeyAuth: []
tags:
- name: Connect
paths:
/api/v1/connect:
post:
operationId: connectProvider
summary: Connect Stripe or GitHub with one key
description: 'Registers an app''s inbound URL as a webhook at Stripe or GitHub using the provider''s own key, saves the signing secret the provider yields, and turns on signature verification at the edge. The provider is read from the key prefix (sk_/rk_ for Stripe, github_pat_/ghp_ for GitHub). The key is used for these calls only and is not stored. Without `app`, a new app is created for the provider (and removed again if the provider refuses the key). Re-running replaces the registration instead of duplicating it. Least privilege: a Stripe restricted key with Webhook Endpoints = Write, or a fine-grained GitHub token with Webhooks = Read and write.'
security:
- ApiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- key
properties:
key:
type: string
description: Stripe secret or restricted key, or GitHub token. Not stored.
app:
type: string
description: Slug of an existing app to connect. Omit to create a new app.
target:
type: string
description: 'GitHub only: "owner/repo", or an organization name for an org-wide hook. Optional when the token administers exactly one repository.'
responses:
'200':
description: Existing app connected
'201':
description: 'New app created and connected. Body: { connected, provider, inboundUrl, app, stripe: { endpointId, livemode, enabledEvents, replaced } | github: { target, hookId, updated }, note }'
'400':
description: Key not recognised, publishable key, invalid target, or GitHub target required (body lists `candidates`)
'401':
description: 'Unauthorized, or the provider rejected the key (`error: invalid_key`)'
'403':
description: 'Read-only AnyHook key, the provider key lacks the webhook permission (`error: missing_permission`), or the plan''s app limit is reached (`error: app_limit_reached`)'
'404':
description: App not found
'502':
description: The provider call failed
tags:
- Connect
servers:
- url: https://anyhook.net
description: Management API
- url: https://in.anyhook.net
description: Ingress (webhook receiver)
components:
securitySchemes:
ApiKeyAuth:
type: http
scheme: bearer
bearerFormat: ahk_live_xxx
description: 'API key from Dashboard Settings > API Keys. Format: ahk_live_<32 alphanumeric chars>. Example header: Authorization: Bearer ahk_live_a1b2c3...'
x-refined-from:
- openapi.json
- anyhook-net-openapi.json