EmailWebhookPayload
Gmail webhook payload model
Properties
| Property | Type | Required | Description |
|---|---|---|---|
sender | string | β Yes | Email sender address |
subject | string | β Yes | Email subject line |
body | string | β Yes | Email body content |
message_id | string | β Yes | Gmail message ID |
thread_id | string | β Yes | Gmail thread ID |
timestamp | object | β No | - |
Example
{
"sender": "example",
"subject": "example",
"body": "example",
"message_id": "example",
"thread_id": "example",
"timestamp": {}
}Used In
Code Examples
TypeScript
interface EmailWebhookPayload {
sender: string;
subject: string;
body: string;
message_id: string;
thread_id: string;
timestamp?: any;
}
// Usage example
const data: EmailWebhookPayload = {
"sender": "example",
"subject": "example",
"body": "example",
"message_id": "example",
"thread_id": "example",
"timestamp": {}
};Python
from data_layer.schemas import EmailWebhookPayload
# Create instance
data = EmailWebhookPayload(
# Add your field values here
)cURL
curl -X POST "https://altsportsleagues-backend-2qcdjegnaa-uc.a.run.app/api/endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{ "sender": "example", "subject": "example", "body": "example", "message_id": "example", "thread_id": "example", "timestamp": {} }'Validation Rules
Required Fields: sender, subject, body, message_id, thread_id
Additional Information
- Type: object
- Source: Generated from Pydantic models in
data_layer/schemas/ - Auto-validated: All fields are validated by FastAPI
This documentation is auto-generated from the OpenAPI specification.