# Create a Conversation

## Create your first Conversation

You can create your first Conversation using the Twilio CLI or directly from your Customer details page.\
First, let's make a Conversation using the [Twilio CLI](/docs/twilio-cli/quickstart):

```bash
twilio api:conversations:v1:conversations:create \
  --friendly-name "My First Conversation"
```

Copy down the **Conversation SID** — it starts with `CHXXX`. Now, use it to fetch the new Conversation:

```bash
twilio api:conversations:v1:conversations:fetch \
  --sid CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

You'll use the Conversation SID in the next few steps when we add participants to the Conversation.

## Add a Chat participant to the Conversation

You've created a Conversation, which you can think of as a virtual space that users can join using a channel of their choice.

Add yourself as a chat participant. The following code sample does this for you. You will need to replace the following information:

* `CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` — the Conversation SID.
* `<YOUR_CHAT_USER_IDENTITY>` — the identity of your Twilio Frontline user. To get this, go to the [Twilio Chat console](https://www.twilio.com/console/chat/services), click on the **Default Conversations Service** chat service, navigate to the **Users** page, and locate your chat user.

```bash
twilio api:conversations:v1:conversations:participants:create \
  --conversation-sid CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
  --identity "<YOUR_CHAT_USER_IDENTITY>"
```

Now open the app again, you should see a new conversation, the one that you created and where you added yourself as a participant. You need one more participant to have a real conversation, so let's add an SMS participant.

## Add an SMS participant to the Conversation

The second participant is someone connecting to the Conversation with an SMS-enabled phone number. **Hint:** Use the number that you purchased up above.

For the following code sample, replace the placeholder values:

* `CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` — the Conversation SID.
* `<YOUR_PERSONAL_NUMBER>` — your own mobile number in [E.164 format](/docs/glossary/what-e164).
* `<YOUR_PURCASHED_TWILIO_PHONE_NUMBER>` — the Twilio number you purchased in [E.164 format](/docs/glossary/what-e164).

```bash
twilio api:conversations:v1:conversations:participants:create \
  --conversation-sid CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
  --messaging-binding.address "<YOUR_PERSONAL_NUMBER>" \
  --messaging-binding.proxy-address "<YOUR_PURCASHED_TWILIO_PHONE_NUMBER>"
```

Open the app again and try to send a text message there. Your phone number should receive an SMS message almost immediately — just respond to it.

As mentioned before, you can also create your first conversation using your own CRM. To do this we need **first** to go to Callbacks in the [Frontline console](https://console.twilio.com/?frameUrl=/console/frontline/overview) and add the [Outgoing Conversations Callback URL](/docs/frontline/outgoing-conversations):

![Configure outgoing conversations callback URL in Twilio Frontline settings.](https://docs-resources.prod.twilio.com/0990e7339018541ae2819a810f91d193a5ebd74e11f575dcc257c528be5996a4.png)

Now open the app again and click on a customer's phone number. Great! You will now be able to start a new conversation.

![SMS conversation with message saying 'Hi! How can I help you?' sent on July 26, 2021.](https://docs-resources.prod.twilio.com/67cdd8be123c82e689af4f46820286f2d19a4f77701bcb1c7b193ca23d1fd190.png)
