Getting started
Essentials
Calls
Contact Custom Fields
Contacts
Conversations
Phone Numbers
Webhooks
Create a new webhook for messages
Creates a new webhook that triggers on events from messages.
POST
/
v1
/
webhooks
/
messages
Copy
Ask AI
curl --request POST \
--url https://api.openphone.com/v1/webhooks/messages \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"events": [
"message.received"
],
"label": "my webhook label",
"resourceIds": [
"<string>"
],
"status": "enabled",
"url": "https://example.com",
"userId": "US123abc"
}'
Copy
Ask AI
{
"data": {
"id": "WHabcd1234",
"userId": "US123abc",
"orgId": "OR1223abc",
"label": "my webhook label",
"status": "enabled",
"url": "https://example.com/",
"key": "example-key",
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"deletedAt": "2022-01-01T00:00:00Z",
"events": [
"message.received"
],
"resourceIds": [
"<string>"
]
}
}
Authorizations
Body
application/json
Response
201
application/json
Success
The response is of type object
.
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://api.openphone.com/v1/webhooks/messages \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"events": [
"message.received"
],
"label": "my webhook label",
"resourceIds": [
"<string>"
],
"status": "enabled",
"url": "https://example.com",
"userId": "US123abc"
}'
Copy
Ask AI
{
"data": {
"id": "WHabcd1234",
"userId": "US123abc",
"orgId": "OR1223abc",
"label": "my webhook label",
"status": "enabled",
"url": "https://example.com/",
"key": "example-key",
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"deletedAt": "2022-01-01T00:00:00Z",
"events": [
"message.received"
],
"resourceIds": [
"<string>"
]
}
}
Assistant
Responses are generated using AI and may contain mistakes.