What the Lines API Does
Lines represent the sending identities you see in Tuco, such as phone numbers or email addresses configured for outreach. Through the API, you can:- See which lines are available to your workspace.
- Understand, at a glance, how actively each line is being used.
- Decide which line your own systems should reference when sending.
Information You Can Rely On
For each line, the API surfaces:- A stable identifier you can store and reuse when sending messages.
- Basic profile details, such as display information.
- Simple usage indicators that reflect how the line is being used over recent periods.
Using Lines with Other APIs
When you send messages or design integrations, you can point to a specific line using the identifiers returned here. Once a message request that references a line is accepted, Tuco ensures that:- The message is associated with the chosen line in the UI.
- Future reporting and exports reflect that relationship.
Fetch All Lines (API Key)
Endpoint
- Method:
GET - Path:
/api/lines/by-user - Auth: Tuco API key or Clerk token (via
authenticateRequest)
Behavior
Returns all lines for the authenticated workspace, including basic profile information, per‑day usage, and any public health information Tuco exposes.Example
Response
Check Health of a Line
Endpoint
- Method:
GET - Path:
/api/lines/check-availability?id={lineId} - Auth: Clerk (Tuco dashboard or trusted backend using Clerk tokens)
Example
Response (success)
400 with a descriptive error; on auth failure you receive 401.