Set multiple line options (merge-patch)
PUT
/v1/ns/{nsid}/lines/{line}/opts
const url = 'https://example.com/v1/ns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/lines/example/opts';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"dnd":true,"block_cid":true,"cf_always":"example","cf_busy":"example","cf_no_answer":"example","cf_no_answer_sec":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/v1/ns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/lines/example/opts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "dnd": true, "block_cid": true, "cf_always": "example", "cf_busy": "example", "cf_no_answer": "example", "cf_no_answer_sec": 1 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”nsid
required
string format: uuid
Namespace UUID
line
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
dnd
boolean
block_cid
boolean
cf_always
string
cf_busy
string
cf_no_answer
string
cf_no_answer_sec
integer
Examplegenerated
{ "dnd": true, "block_cid": true, "cf_always": "example", "cf_busy": "example", "cf_no_answer": "example", "cf_no_answer_sec": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
object
success
required
boolean
Example
{ "success": true}default
Section titled “default”Error response
Media typeapplication/problem+json
RFC 7807 Problem Details
object
type
Problem type slug URI
string
title
string
status
integer
detail
string
key
additional properties
any
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}