Skip to main content
POST
Move a Line Between Workspaces
Moving a line cancels every message still waiting to go out on it — status queued, pending or scheduled (scheduled is the rescheduled/retry state). Send a preview first to see how many that is.

Endpoint

  • Method: POST
  • Path: /api/agency/lines
  • Auth: Authorization: Bearer tucoagency_xxxxxxxxxxxxx (agency key)

Body

Why queued messages are cancelled

A queued message belongs to the workspace that queued it — its copy, its lead, its campaign, its daily cap. If it survived the move, the new workspace’s line would send the old workspace’s message. Cancelling is the only correct answer; the original workspace can re-queue on a line it still owns. Messages already handed to the device (sending) are not touched — flipping them would not un-send anything. Everything already sent, delivered, failed, fallback, cancelled or stopped is untouched, and messages on other lines in the same workspace are untouched. Cancelled messages are stamped with cancelReason: "line:transferred_to_other_workspace" so the reason is visible in the unibox.

Preview first

Then move it

What it costs

A transfer never charges or credits at the moment it happens. It shifts the line’s add-on between workspaces, and the recurring amount lands on the new workspace at the next billing cycle:
  • Target has a free slot on its plan → no billing change at all.
  • Target is full → +1 add-on on the target (targetAddonAdded: true), billed next cycle.
  • The line was a paid extra on the source → −1 add-on there (sourceReleased: true), stops billing next cycle.
Moving a paid line into a full workspace is a wash: monthlyDeltaCents: 0.

Deleting a line

action: "delete" exists but is session-only. An API key gets 403 AGENCY_DELETE_SESSION_ONLY: deleting is irreversible, so it stays with a signed-in agency owner. Moving is safe for a key because one more call moves it back.

Error responses