AgentPhone Webhooks API
The webhooks API from AgentPhone — 5 operation(s) for webhooks.
The webhooks API from AgentPhone — 5 operation(s) for webhooks.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/agentphone:agentphone-webhooks-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SMS Webhooks API
description: A simple API to provision phone numbers and receive SMS
version: 0.1.0
tags:
- name: Webhooks
paths:
/v1/webhooks:
get:
tags:
- Webhooks
summary: Get Webhook
description: Get the master webhook configuration for this account.
operationId: get_webhook_v1_webhooks_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/WebhookResponse'
- type: 'null'
title: Response Get Webhook V1 Webhooks Get
security:
- HTTPBearer: []
post:
tags:
- Webhooks
summary: Create Or Update Webhook
description: 'Register or update the webhook URL for this account.
If a webhook already exists, it will be updated.
A new secret is generated each time.
contextLimit: Number of recent messages to include in webhook payloads (0-50, default: 10).
Set to 0 to disable history in webhooks.'
operationId: create_or_update_webhook_v1_webhooks_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookCreateRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
delete:
tags:
- Webhooks
summary: Delete Webhook
description: Remove the master webhook for this account.
operationId: delete_webhook_v1_webhooks_delete
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
security:
- HTTPBearer: []
/v1/webhooks/deliveries:
get:
tags:
- Webhooks
summary: List Deliveries
description: Get paginated webhook delivery attempts for all account webhooks.
operationId: list_deliveries_v1_webhooks_deliveries_get
security:
- HTTPBearer: []
parameters:
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
default: 50
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
title: Offset
- name: hours
in: query
required: false
schema:
anyOf:
- type: integer
maximum: 168
minimum: 1
- type: 'null'
title: Hours
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedDeliveriesResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/webhooks/deliveries/stats:
get:
tags:
- Webhooks
summary: Delivery Stats
description: Aggregated delivery stats for the account's webhooks over the last N hours.
operationId: delivery_stats_v1_webhooks_deliveries_stats_get
security:
- HTTPBearer: []
parameters:
- name: hours
in: query
required: false
schema:
type: integer
maximum: 168
minimum: 1
default: 24
title: Hours
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookDeliveryStatsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/webhooks/deliveries/all-time:
get:
tags:
- Webhooks
summary: All Time Stats
description: Lightweight all-time delivery counts using indexed COUNT queries.
operationId: all_time_stats_v1_webhooks_deliveries_all_time_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AllTimeStatsResponse'
security:
- HTTPBearer: []
/v1/webhooks/test:
post:
tags:
- Webhooks
summary: Test Webhook
description: 'Send a test webhook to verify the endpoint is working.
Sends a synthetic agent.message payload (flagged `"test": true`) through
the real delivery path to the configured URL. The optional JSON body
overrides `from`, `to`, `message` and `channel` so a handler can be
exercised with the numbers it actually routes on.
Pass ?agentId=... to control which agent appears in the payload;
otherwise the first agent in the account is used.'
operationId: test_webhook_v1_webhooks_test_post
security:
- HTTPBearer: []
parameters:
- name: agentId
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Agent ID to include in the test payload
title: Agentid
description: Agent ID to include in the test payload
requestBody:
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/TestWebhookRequest'
- type: 'null'
title: Body
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
AllTimeStatsResponse:
properties:
total:
type: integer
title: Total
success:
type: integer
title: Success
failed:
type: integer
title: Failed
successRate:
type: number
title: Successrate
type: object
required:
- total
- success
- failed
- successRate
title: AllTimeStatsResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
WebhookDeliveryStatsResponse:
properties:
total:
type: integer
title: Total
success:
type: integer
title: Success
failed:
type: integer
title: Failed
pending:
type: integer
title: Pending
successRate:
type: number
title: Successrate
byEventType:
additionalProperties:
additionalProperties:
type: integer
type: object
type: object
title: Byeventtype
byHour:
items:
type: object
type: array
title: Byhour
type: object
required:
- total
- success
- failed
- pending
- successRate
- byEventType
- byHour
title: WebhookDeliveryStatsResponse
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
WebhookResponse:
properties:
id:
type: string
title: Id
url:
type: string
title: Url
secret:
type: string
title: Secret
status:
type: string
title: Status
contextLimit:
type: integer
title: Contextlimit
timeout:
type: integer
title: Timeout
createdAt:
type: string
format: date-time
title: Createdat
type: object
required:
- id
- url
- secret
- status
- contextLimit
- timeout
- createdAt
title: WebhookResponse
PaginatedDeliveriesResponse:
properties:
items:
items:
$ref: '#/components/schemas/WebhookDeliveryResponse'
type: array
title: Items
total:
type: integer
title: Total
offset:
type: integer
title: Offset
limit:
type: integer
title: Limit
type: object
required:
- items
- total
- offset
- limit
title: PaginatedDeliveriesResponse
WebhookCreateRequest:
properties:
url:
type: string
maxLength: 2083
minLength: 1
format: uri
title: Url
contextLimit:
anyOf:
- type: integer
- type: 'null'
title: Contextlimit
timeout:
anyOf:
- type: integer
- type: 'null'
title: Timeout
type: object
required:
- url
title: WebhookCreateRequest
WebhookDeliveryResponse:
properties:
id:
type: string
title: Id
messageId:
anyOf:
- type: string
- type: 'null'
title: Messageid
eventType:
anyOf:
- type: string
- type: 'null'
title: Eventtype
channel:
anyOf:
- type: string
- type: 'null'
title: Channel
status:
type: string
title: Status
httpStatus:
anyOf:
- type: integer
- type: 'null'
title: Httpstatus
errorMessage:
anyOf:
- type: string
- type: 'null'
title: Errormessage
responseBody:
anyOf:
- type: string
- type: 'null'
title: Responsebody
attemptCount:
type: integer
title: Attemptcount
lastAttemptAt:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Lastattemptat
nextRetryAt:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Nextretryat
createdAt:
type: string
format: date-time
title: Createdat
type: object
required:
- id
- messageId
- eventType
- channel
- status
- httpStatus
- errorMessage
- responseBody
- attemptCount
- lastAttemptAt
- nextRetryAt
- createdAt
title: WebhookDeliveryResponse
TestWebhookRequest:
properties:
from:
anyOf:
- type: string
- type: 'null'
title: From
description: Sender number, E.164
to:
anyOf:
- type: string
- type: 'null'
title: To
description: Recipient number, E.164
message:
anyOf:
- type: string
maxLength: 1600
- type: 'null'
title: Message
description: Message text
channel:
anyOf:
- type: string
enum:
- sms
- imessage
- mms
- whatsapp
- rcs
- type: 'null'
title: Channel
description: Channel to report in the payload (default sms)
additionalProperties: false
type: object
title: TestWebhookRequest
description: 'Optional overrides for the synthetic agent.message a test delivery carries.
Everything is optional and defaults to the historical sample values, so a
bare POST behaves exactly as before. Overrides let a handler that routes on
`to` / `from` (one webhook serving many sub-accounts) exercise its real
path without buying a number first. The event only ever goes to the
calling account''s own configured webhook, so `to` is just a string here.'
securitySchemes:
HTTPBearer:
type: http
scheme: bearer