MOH

Manage your MOH.

Retrieve moh server

get

Retrieve moh server information.

Authorizations
Responses
200

OK

application/json
get
GET /api/moh_server HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "enabled": true,
  "play_type": "DEFAULT_MUSIC"
}

Update moh server

post

Update moh server

Authorizations
Body
enabledbooleanOptional

Enable MOH service or not.

play_typestring · enumOptional

Set MOH personalized music by these modes:

  • DEFAULT_MUSIC:
  • RANDOM_MUSIC_PER_CALL:
  • RANDOM_MUSIC_PER_DAY:
Possible values:
Responses
200

OK

post
POST /api/moh_server HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "enabled": true,
  "play_type": "DEFAULT_MUSIC"
}

No content

List moh musics

get

Retrieve a collection of moh musics.

Authorizations
Responses
200

OK

application/json
get
GET /api/moh_server/musics HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "items": []
}

Create a MOH music

post

Create a MOH music.

Authorizations
Body
file_idall ofOptional

The unique ID of the file.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
201

Created MOH music

application/json
post
POST /api/moh_server/musics HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "file_id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Retrieve a moh music

get

Retrieve a moh music.

Authorizations
Path parameters
idall ofRequired

The unique ID of MOH music.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
get
GET /api/moh_server/musics/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "file_name": "text",
  "file_size": 0,
  "file_url": "/api/blobs/WexWdABcd5D4PDgzTKV3gAAAEu00WcK"
}

Delete a MOH music

post

Delete a MOH music

Authorizations
Path parameters
idall ofRequired

The unique ID of MOH music.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

post
POST /api/moh_server/musics/{id}/destroy HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content