> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuco.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Which line sends a message?

> How Tuco picks the sending line when you omit fromLineId: a contact keeps the line they already talk to, and new contacts rotate across your lines.

## The rule

**A contact stays on one line.** Tuco picks a line only for the first message to someone you have never
texted. Every message after that goes from the same line, so the contact always sees the same name and number.

| You send | Line used |
| - | - |
| With `fromLineId` | That line, always. |
| Without `fromLineId`, to a contact you have texted before | **The contact's line**: the line of your last message with this contact, sent or received. |
| Without `fromLineId`, to a new contact | The next line in a rotation across your active lines, so no single line carries every new conversation. |

"Your last message with this contact" includes a message that is still waiting to go. Two messages you send
back to back to a new contact go from the same line.

## When the contact's line can't send

| The contact's line is… | What happens to a message without `fromLineId` |
| - | - |
| Down for a moment | It waits on that line and sends when the line is back. Tuco does not switch the contact to another number. If the line is still down after 24 hours, the message fails with `line_down_expired`. |
| At its daily limit | It waits for the limit to reset. |
| Turned off, cancelled or removed from your workspace | The next line in the rotation is used, and the contact stays on that new line from then on. |

If every line in your workspace is off, the send is rejected with `400 No active lines in workspace`.

## Choosing a line yourself

Pass `fromLineId` when you want a specific line, for example a rep's own line. Tuco uses it as given and never
moves the message to another line. Once that message is sent, it becomes the contact's line for later sends
without `fromLineId`.

You get the line back in two places, so you can store it if you need to:

* the `fromLineId` field of the [Send Message](https://docs.tuco.ai/api-reference/endpoint/send-message.md) response
* the `fromLineId` field of every [reply webhook](https://docs.tuco.ai/api-reference/message-webhooks.md): the line the contact replied to

## Related

* [Send Message](https://docs.tuco.ai/api-reference/endpoint/send-message.md)
* [Message order (FIFO) and Send now](https://docs.tuco.ai/api-reference/message-order.md)
* [Get Lines](https://docs.tuco.ai/api-reference/endpoint/get-lines.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.