Skip to main content
POST
Usa esta referencia para inspeccionar las cargas útiles de webhook que YCloud envía a tu aplicación. Selecciona un ejemplo con nombre en el generador de solicitudes para ver sus campos. La referencia usa https://example.com como un marcador de posición reservado. Para tus propias pruebas, reemplázalo con la URL de webhook de tu aplicación en la solicitud generada. Tu aplicación aloja este endpoint; YCloud no aloja /webhooks/ycloud.
Enviar una carga útil de muestra prueba tu receptor. No activa una entrega de webhook desde YCloud. El ejemplo YCloud-Signature es un valor de muestra; no es una firma válida para una carga útil editada o para el secreto de tu endpoint.
Valida el encabezado YCloud-Signature antes de procesar un evento. Consulta Configurar webhooks para obtener orientación sobre configuración y entrega.

Respuesta del receptor

Devuelve cualquier estado 2xx después de haber autenticado y aceptado de forma duradera el evento. Procesa el trabajo lento de forma asíncrona para que YCloud no reintente una entrega que tu aplicación ya haya recibido.

Configurar webhooks

Crea un endpoint, valida firmas y gestiona reintentos.

Explorar ejemplos comentados

Comprende los activadores de eventos y el manejo específico de cada escenario.

Encabezados

YCloud-Signature
string
Ejemplo:

"t=1654084800,s=8eb70f2acb056c2119acbee8fdd98a889021d9c268bc9ad248a4182c40e31119"

Cuerpo

application/json

Represents a webhook event payload. Every event contains certain common properties: id, type, apiVersion, createTime. Each event may also contain some properties unique to the event. For example, sms is returned when type is sms.message.updated.

type
enum<string>
requerido

Type of event.

Opciones disponibles:
whatsapp.echo_message.created,
whatsapp.echo_message.updated
whatsappMessage
object
requerido

Included when type is whatsapp.message.updated, whatsapp.smb.message.created, or when type is whatsapp.smb.history for an outbound history message. Also included for whatsapp.echo_message.created and whatsapp.echo_message.updated, where the Agent echo subset applies. It is omitted for a metadata-only history chunk.

id
string
requerido

Unique ID for the event.

Required string length: 6 - 128
apiVersion
string
requerido

The API version used to render this event.

Ejemplo:

"v2"

createTime
string<date-time>
requerido

The time at which this event was created, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Ejemplo:

"2022-06-01T12:00:00.000Z"

phase
integer<int32>

Included when type is whatsapp.smb.history and the event was generated from a Meta history chunk. Identifies the chunk's synchronization phase.

Ejemplo:

1

progress
integer<int32>

Included when type is whatsapp.smb.history and the event was generated from a Meta history chunk. Reports the chunk's synchronization progress.

Ejemplo:

73

contactAttributesChanged
object

Included when type is contact.attributes_changed.

contactCreated
object

Included when type is contact.created.

contactDeleted
object

Included when type is contact.deleted.

contactNote
object

Included when type is contact.note.created, contact.note.updated, or contact.note.deleted.

contactUnsubscribeCreated
object

Included when type is contact.unsubscribe.created.

contactUnsubscribeDeleted
object

Included when type is contact.unsubscribe.deleted.

emailDelivery
object

Included when type is email.delivery.updated.

sms
object

Included when type is sms.message.updated.

smsInbound
object

Included when type is sms.inbound.received.

voice
object

Included when type is voice.message.updated.

whatsappBusinessAccount
object

Included when type is whatsapp.business_account.deleted, whatsapp.business_account.reviewed, or whatsapp.business_account.updated.

whatsappInboundMessage
object

Included when type is whatsapp.inbound_message.received, or when type is whatsapp.smb.history for an inbound history message. It is omitted for a metadata-only history chunk.

whatsappMetaBusinessAgent
object

Included for whatsapp.meta_business_agent.handover.updated. Currently limited to Public REST API Agents.

whatsappGroup
object

Included when type is whatsapp.group.lifecycle_update, whatsapp.group.participants_update, whatsapp.group.settings_update, whatsapp.group.status_update, or when type is whatsapp.message.updated for group message status updates.

whatsappPhoneNumber
object

Included when type is whatsapp.phone_number.deleted, whatsapp.phone_number.name_updated, whatsapp.phone_number.quality_updated, or whatsapp.phone_number.business_username_updated.

whatsappPayment
object

Included when type is whatsapp.payment.updated.

whatsappTemplate
object

Included when type is whatsapp.template.reviewed, whatsapp.template.quality_updated, whatsapp.template.category_updated, or whatsapp.template.correct_category_detection.

callingConnect
object

Included when type is whatsapp.call.connect.

callingTerminate
object

Included when type is whatsapp.call.terminate.

callingStatusUpdated
object

Included when type is whatsapp.call.status.updated.

callingRecording
object

Included when type is whatsapp.call.recording.updated.

callingTranscription
object

Included when type is whatsapp.call.transcription.updated.

flowChanges
object

Included when type is whatsapp.flow.status_change.

whatsappUserPreference
object

Included when type is whatsapp.user.preferences.

Respuesta

200

The request is successfully accepted.