Update a department

Using the below method the details of an existing department can be updated

Copy
curl --request PUT \
  --url https://api.servetel.in/v1/department/id \
  --header 'accept: application/json' \
  --header 'authorization: Authorization' \
  --header 'content-type: application/json' \
  --data '{}'

Path parameters

Variable Name

Description

Data Type

id*

Unique ID of the department

String

Request variables

Variable Name

Description

Data Type

name*

Name for department

String

description*

Description for department

String

ring_strategy*

Order in which calls will be received by agents

String

timeout_dest_type*

when no agent answers the call, it is forwarded to this type of destination

String

timeout_destination*

Unique ID of the destination where call will be the transferred when no agent in department answers the call

Integer

timeout*

time for which call will ring for each agent

Array of strings

destination*

Unique ID of agent

Array of strings

music_on_hold

Unique ID of music on hold to be played when caller is on hold

Integer

Sample request

curl --request PUT \
  --url https://api.servetel.in/v1/department/1 \
  --header 'accept: application/json' \
  --header 'authorization: Bearer yourtokenhere' \
  --header 'content-type: application/json' \
  --data '{"name":"Test Name","description":"Test Description","ring_strategy":"simultaneous","timeout_dest_type":"extension","timeout_destination":500000000,"timeout":[20],"destination":["extension||050000000"]}'

Response variables

Variable Name

Description

Data Type

success

Request success status

Boolean

message

Message corresponding success status

String