Skip to main content
PATCH
Update the metadata or billing anchor of a line
  • Credential: an API key. The operation works on any line you own, in any status and of any kind. See Metadata and Anniversary and billing anchor.
  • Line-scoped keys: the list of a line-scoped key is not applied here. The key can change the metadata and the billing anchor of any line of its account.
  • Idempotency-Key: not honored. The operation merges, so the same request sent twice leaves the line in the same state.
  • Events: none. See What events do not announce.
  • Two fields, two changes: when the body carries both fields, billing_anchor_at is applied first and metadata second. If the metadata is refused, the change of the billing anchor is already stored.

Errors

The errors that every operation shares are in Errors.

Authorizations

Authorization
string
header
required

An API key created in the iSnap dashboard, or a trial key, sent as Authorization: Bearer <key>. An API key starts with isnap_live_ or isnap_test_; both act on the same account, lines and billing. A trial key acts on its trial only.

Path Parameters

id
string
required

Id of a line: line_ followed by 25 letters or digits.

Pattern: ^line_[0-9A-Za-z]{25}$

Body

application/json

Send metadata, billing_anchor_at, or both.

metadata
object

Keys to merge into the metadata of the line: a key with a value is set, a key with null is removed, a key you do not send is kept. The result holds at most 20 keys and 8,192 bytes once serialized as JSON (400 metadata_too_large); a request that only removes keys is never refused for the size of the result. The keys migration_ref and proof_line are reserved (400 reserved_metadata_key). Never put personal data or secrets in it.

Example:
billing_anchor_at
string<date-time> | null

The billing anchor of the line: an ISO 8601 timestamp in UTC, with a Z suffix, or null to clear it. A line billed on the monthly wholesale invoice is charged one full month at each monthly occurrence of this timestamp: the same day of the month, moved to the last day of a shorter month, at the same time of day. Without a billing anchor, the line is billed at each monthly occurrence of its activation. A change applies from the next occurrence and does not alter a month already billed. A past timestamp is accepted. A timestamp more than 31 days after the request returns 400 billing_anchor_too_far. Sending the value the line already has changes nothing.

Example:

"2026-09-11T09:15:00Z"

Response

The updated line.

success
enum<boolean>
required

Always true on a success response.

Available options:
true
data
object
required

A line. billing_tier, byod, shared, test_line and inbound_only tell the kinds of line apart: a rented line (two-way or inbound-only), a BYOD line, a shared line, a test line.

trace_id
string
required

Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap.

request_id
string
required

Id of the request that produced this response: req_ followed by 25 letters or digits.