Skip to Content
Wirebird Docs

Conversation

One thread, opened by id or by a contact's phone number.

import { Conversation } from '@wirebird/react';

<Conversation contact={{ phone: '+15125550123', firstName: 'Dana', lastName: 'Lee' }} />;

Use Conversation to put a single thread next to a record in your app, such as a customer or a job. Pass either an existing conversationId or a contact; with a contact, Wirebird opens that person's thread, creating it if needed.

Props

PropTypeDescription
conversationIdstringAn existing thread.
contactConversationContactOr open the thread with this person.
consentProvidedByPlatformbooleanSet to true only if your product already collected this person's agreement to receive texts. Skips the consent question before the first text.
onOpened(conversationId: string) => voidThe thread's id once it's open. Store it to reopen the thread by id later.
heightnumber | stringFixed height, default 640.

ConversationContact

FieldTypeDescription
phonestringRequired. Their number, with country code (+15125550123).
firstNamestring
lastNamestring
externalIdstringYour id for this person.
namestringDeprecated. One full name, split at the first space. Use firstName and lastName.

Business texting rules require a record of how each person agreed to receive texts. Before the first text to a new contact, staff pick how the person agreed. Only pass consentProvidedByPlatform when that is true in your product (for example, your booking form has an unticked opt-in box the person checked).

On this page