Models API Reference
Message Models
Message models for WhatsApp SDK.
These models represent all message types supported by WhatsApp Business API. Includes both request models (what users send) and response models (what API returns).
- class whatsapp_sdk.models.messages.TextMessage(*, body, preview_url=False)[source]
Bases:
BaseModelText message request model.
Used to send plain text or text with URL preview.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.ImageMessage(*, id=None, link=None, caption=None)[source]
Bases:
BaseModelImage message request model.
Send images via media ID or URL.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.DocumentMessage(*, id=None, link=None, caption=None, filename=None)[source]
Bases:
BaseModelDocument message request model.
Send documents/files via media ID or URL.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.AudioMessage(*, id=None, link=None)[source]
Bases:
BaseModelAudio message request model.
Send audio files via media ID or URL.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.VideoMessage(*, id=None, link=None, caption=None)[source]
Bases:
BaseModelVideo message request model.
Send videos via media ID or URL.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.StickerMessage(*, id=None, link=None)[source]
Bases:
BaseModelSticker message request model.
Send stickers via media ID or URL.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.LocationMessage(*, latitude, longitude, name=None, address=None)[source]
Bases:
BaseModelLocation message request model.
Send geographic location with optional details.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.InteractiveHeader(*, type, text=None, image=None, video=None, document=None)[source]
Bases:
BaseModelHeader for interactive messages.
- image: ImageMessage | Dict[str, str] | None
- video: VideoMessage | Dict[str, str] | None
- document: DocumentMessage | Dict[str, str] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.InteractiveBody(*, text)[source]
Bases:
BaseModelBody for interactive messages.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Bases:
BaseModelFooter for interactive messages.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.Button(*, type='reply', reply)[source]
Bases:
BaseModelButton for interactive messages.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.Section(*, title=None, rows)[source]
Bases:
BaseModelSection for list messages.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.InteractiveAction(*, buttons=None, button=None, sections=None, name=None, parameters=None)[source]
Bases:
BaseModelAction for interactive messages.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.InteractiveMessage(*, type, header=None, body, footer=None, action)[source]
Bases:
BaseModelInteractive message request model.
Send messages with buttons, lists, or CTA URLs.
- header: InteractiveHeader | None
- body: InteractiveBody
- action: InteractiveAction
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.TemplateParameter(*, type, text=None, image=None, video=None, document=None, currency=None, date_time=None)[source]
Bases:
BaseModelParameter for template components.
- image: ImageMessage | Dict[str, str] | None
- video: VideoMessage | Dict[str, str] | None
- document: DocumentMessage | Dict[str, str] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.TemplateComponent(*, type, sub_type=None, index=None, parameters=<factory>)[source]
Bases:
BaseModelComponent for template messages.
- parameters: List[TemplateParameter]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.TemplateLanguage(*, code, policy='deterministic')[source]
Bases:
BaseModelLanguage settings for template messages.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.TemplateMessage(*, name, language, components=None)[source]
Bases:
BaseModelTemplate message request model.
Send pre-approved template messages with parameters.
- language: TemplateLanguage
- components: List[TemplateComponent] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.ReactionMessage(*, message_id, emoji)[source]
Bases:
BaseModelReaction message request model.
Send emoji reactions to messages.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.messages.MessageStatus(*, id, status, timestamp, recipient_id, conversation=None, pricing=None, errors=None)[source]
Bases:
BaseModelMessage status update model.
Represents status updates for sent messages.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Template Models
Template models for WhatsApp SDK.
These models handle template management including creation, listing, and deletion of message templates.
- class whatsapp_sdk.models.templates.TemplateButton(*, type, text, url=None, phone_number=None, example=None)[source]
Bases:
BaseModelTemplate button definition.
Represents buttons in template definitions.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.TemplateHeaderExample(*, header_text=None, header_handle=None)[source]
Bases:
BaseModelExample values for template header.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.TemplateBodyExample(*, body_text=None)[source]
Bases:
BaseModelExample values for template body.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.TemplateExample(*, header_text=None, body_text=None, header_handle=None)[source]
Bases:
BaseModelCombined examples for template.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.TemplateComponentDefinition(*, type, format=None, text=None, buttons=None, example=None)[source]
Bases:
BaseModelTemplate component definition for creating templates.
- buttons: List[TemplateButton] | None
- example: TemplateExample | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.Template(*, id=None, name, language, category, components, status=None, rejected_reason=None, quality_score=None)[source]
Bases:
BaseModelComplete template definition.
Represents a message template in the system.
- components: List[TemplateComponentDefinition]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.TemplateResponse(*, id, status, category=None)[source]
Bases:
BaseModelResponse after creating a template.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.TemplateListResponse(*, data, paging=None)[source]
Bases:
BaseModelResponse when listing templates.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.TemplateDeleteResponse(*, success)[source]
Bases:
BaseModelResponse after deleting a template.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.MessageTemplateUpdate(*, components)[source]
Bases:
BaseModelUpdate existing template components.
- components: List[TemplateComponentDefinition]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.templates.TemplateAnalytics(*, template_id, template_name, sent=0, delivered=0, read=0, clicked=None, start_time, end_time)[source]
Bases:
BaseModelTemplate performance analytics.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Media Models
Media models for WhatsApp SDK.
These models handle media upload, download, and management for images, videos, documents, and audio files.
- class whatsapp_sdk.models.media.MediaUploadResponse(*, id)[source]
Bases:
BaseModelResponse after uploading media.
Contains the media ID to use in messages.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.media.MediaURLResponse(*, url, mime_type, sha256, file_size, id)[source]
Bases:
BaseModelResponse when retrieving media URL.
Contains the URL and metadata for downloading media.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.media.MediaDeleteResponse(*, success)[source]
Bases:
BaseModelResponse after deleting media.
Confirms media deletion status.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.media.MediaUploadRequest(*, file_path=None, file_bytes=None, mime_type, filename=None)[source]
Bases:
BaseModelRequest to upload media.
Parameters for uploading media files.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.media.SupportedMediaTypes(*, images=<factory>, documents=<factory>, audio=<factory>, video=<factory>, stickers=<factory>)[source]
Bases:
BaseModelSupported media types and their constraints.
Reference for valid media types and size limits.
- class ImageTypes(*, jpeg='image/jpeg', png='image/png', webp='image/webp', max_size=5242880)[source]
Bases:
BaseModelSupported image formats.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DocumentTypes(*, pdf='application/pdf', doc='application/msword', docx='application/vnd.openxmlformats-officedocument.wordprocessingml.document', ppt='application/vnd.ms-powerpoint', pptx='application/vnd.openxmlformats-officedocument.presentationml.presentation', xls='application/vnd.ms-excel', xlsx='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', txt='text/plain', max_size=104857600)[source]
Bases:
BaseModelSupported document formats.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class AudioTypes(*, aac='audio/aac', mp4='audio/mp4', mpeg='audio/mpeg', amr='audio/amr', ogg='audio/ogg', opus='audio/opus', max_size=16777216)[source]
Bases:
BaseModelSupported audio formats.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class VideoTypes(*, mp4='video/mp4', threegp='video/3gpp', max_size=16777216)[source]
Bases:
BaseModelSupported video formats.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class StickerTypes(*, webp='image/webp', max_size=524288, dimensions='512x512')[source]
Bases:
BaseModelSupported sticker formats.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- images: ImageTypes
- documents: DocumentTypes
- audio: AudioTypes
- video: VideoTypes
- stickers: StickerTypes
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.media.ResumableUploadSession(*, id, upload_url, file_offset=0, file_size, expires_at)[source]
Bases:
BaseModelResumable upload session for large files.
Used for uploading files larger than 5MB.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Webhook Models
Webhook models for WhatsApp SDK.
These models handle incoming webhook events from WhatsApp, including messages, status updates, and system notifications.
- class whatsapp_sdk.models.webhooks.WebhookTextMessage(*, body)[source]
Bases:
BaseModelIncoming text message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookImageMessage(*, id, mime_type, sha256, caption=None)[source]
Bases:
BaseModelIncoming image message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookVideoMessage(*, id, mime_type, sha256, caption=None)[source]
Bases:
BaseModelIncoming video message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookAudioMessage(*, id, mime_type, sha256, voice=None)[source]
Bases:
BaseModelIncoming audio message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookDocumentMessage(*, id, mime_type, sha256, caption=None, filename=None)[source]
Bases:
BaseModelIncoming document message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookLocationMessage(*, latitude, longitude, name=None, address=None)[source]
Bases:
BaseModelIncoming location message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookStickerMessage(*, id, mime_type, sha256, animated=None)[source]
Bases:
BaseModelIncoming sticker message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookButtonReply(*, id, title)[source]
Bases:
BaseModelButton reply from interactive message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookListReply(*, id, title, description=None)[source]
Bases:
BaseModelList selection from interactive message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookInteractiveMessage(*, type, button_reply=None, list_reply=None)[source]
Bases:
BaseModelIncoming interactive message response.
- button_reply: WebhookButtonReply | None
- list_reply: WebhookListReply | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookReactionMessage(*, message_id, emoji)[source]
Bases:
BaseModelIncoming reaction message.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookContext(*, from_, id)[source]
Bases:
BaseModelMessage context (for replies).
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookMessage(*, from_, id, timestamp, type, context=None, text=None, image=None, video=None, audio=None, document=None, location=None, sticker=None, interactive=None, reaction=None, contacts=<factory>, errors=<factory>)[source]
Bases:
BaseModelComplete incoming message from webhook.
- context: WebhookContext | None
- text: WebhookTextMessage | None
- image: WebhookImageMessage | None
- video: WebhookVideoMessage | None
- audio: WebhookAudioMessage | None
- document: WebhookDocumentMessage | None
- location: WebhookLocationMessage | None
- sticker: WebhookStickerMessage | None
- interactive: WebhookInteractiveMessage | None
- reaction: WebhookReactionMessage | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookStatus(*, id, status, timestamp, recipient_id, conversation=<factory>, pricing=<factory>, errors=<factory>)[source]
Bases:
BaseModelMessage status update from webhook.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookMetadata(*, display_phone_number, phone_number_id)[source]
Bases:
BaseModelMetadata about the webhook source.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookContact(*, profile=<factory>, wa_id)[source]
Bases:
BaseModelContact information from webhook.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookValue(*, messaging_product='whatsapp', metadata, contacts=None, messages=None, statuses=None, errors=<factory>)[source]
Bases:
BaseModelMain webhook value containing messages or statuses.
- metadata: WebhookMetadata
- contacts: List[WebhookContact] | None
- messages: List[WebhookMessage] | None
- statuses: List[WebhookStatus] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookChange(*, value, field)[source]
Bases:
BaseModelWebhook change event.
- value: WebhookValue
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookEntry(*, id, changes)[source]
Bases:
BaseModelWebhook entry containing changes.
- changes: List[WebhookChange]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookEvent(*, object, entry)[source]
Bases:
BaseModelComplete webhook event from WhatsApp.
- entry: List[WebhookEntry]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.webhooks.WebhookVerification(*, hub_mode, hub_challenge, hub_verify_token)[source]
Bases:
BaseModelWebhook verification request.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Base Models
Base Pydantic models for WhatsApp SDK.
These models represent the core structures used across the SDK, matching Meta’s WhatsApp Cloud API v23.0 exactly.
- class whatsapp_sdk.models.base.BaseResponse(*, messaging_product='whatsapp', **extra_data)[source]
Bases:
BaseModelBase response model for WhatsApp API responses.
All WhatsApp API responses include these common fields.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.base.Contact(*, input, wa_id, **extra_data)[source]
Bases:
BaseModelContact information in API responses.
Represents a WhatsApp contact that was processed.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.base.Message(*, id, **extra_data)[source]
Bases:
BaseModelMessage information in API responses.
Represents a sent message confirmation.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.base.Error(*, code, title=None, message, error_data=None, error_subcode=None, error_user_title=None, error_user_msg=None, fbtrace_id=None, **extra_data)[source]
Bases:
BaseModelError model matching Meta’s error format.
WhatsApp API errors follow this structure.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.base.ErrorResponse(*, error, **extra_data)[source]
Bases:
BaseModelComplete error response from WhatsApp API.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.base.MessageResponse(*, messaging_product='whatsapp', contacts=<factory>, messages=<factory>, **extra_data)[source]
Bases:
BaseResponseStandard response after sending a message.
This is the response you get when successfully sending any message type.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.base.PaginationCursor(*, before=None, after=None)[source]
Bases:
BaseModelPagination cursor for list responses.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class whatsapp_sdk.models.base.PaginationInfo(*, cursors=None, next=None, previous=None)[source]
Bases:
BaseModelPagination information for list responses.
- cursors: PaginationCursor | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].