- messaging
- whatsapp_templates
- conversations
- contacts
- orders
- medias
- webhooks
Connect to AI Agent
POST
https://app.trypeach.io/api/v1/events
Request
Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Body Params application/json
event_type
enum<string>
required
Allowed value:
connect_to_ai_agent
contact
object
write-onlyrequired
name
string
optional
email
string
optional
phone_number
string
required
Additional properties
string
optional
template_message
object
write-onlyrequired
whats_app_template_id
string
required
liquid_values
object
required
Additional properties
string
optional
ai_agent
object
required
id
string
required
Example
{
"event_type": "connect_to_ai_agent",
"contact": {
"name": "John Doe",
"email": "johndoe@example.com",
"phone_number": "+919988776655"
},
"template_message": {
"whats_app_template_id": "wat_1234abcd",
"liquid_values": {
"account_name": "Foo",
"cta1": "Bar"
}
},
"ai_agent": {
"id": "aiflw_1234abcd"
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://app.trypeach.io/api/v1/events' \
--header 'Content-Type: application/json' \
--header 'Authorization;' \
--data-raw '{
"event_type": "connect_to_ai_agent",
"contact": {
"name": "John Doe",
"email": "johndoe@example.com",
"phone_number": "+919988776655"
},
"template_message": {
"whats_app_template_id": "wat_1234abcd",
"liquid_values": {
"account_name": "Foo",
"cta1": "Bar"
}
},
"ai_agent": {
"id": "aiflw_1234abcd"
}
}'
Responses
🟢200Success
application/json
Body
status
string
required
event_id
string
required
Example
{
"status": "success",
"event_id": "string"
}
Modified at 2025-06-09 11:43:40