דלג לתוכן הראשי

Maskyoo Management

Services for creating, updating, releasing, restoring and allocating Maskyoo numbers, and for placing calls on them.

Important

Allocating (create_maskyoo), releasing (release_maskyoo) and restoring (restore_maskyoo) numbers may affect your rates according to your commercial plan.


get_maskyoo

Get the details of the Maskyoo numbers in the account, including call destinations, working hours, private fields, recording percentage, number exposure and more.

Endpoint: /api/?service=get_maskyoo

Parameters

ParameterTypeRequiredDescription
maskyoostringNOA specific Maskyoo number. When sent, only that number is returned.
statusintNO1 = active numbers only (default) / 0 = suspended numbers.
pageintNOPage number (default 0).
limitintNORows per page. Defaults to 1000 when the parameter is not sent; sending 0 or a value above 10000 returns up to 10000 rows.
filter_namestringNOField name to filter by (for example description, private_field1, email, extenstion). Requires filter_value as well.
filter_valuestringNOThe filter value.
filter_operatorstringNOEQ (default), NE, LT, GT, LIKE.
formatstringNOjson / xml.
note

The limit, page and status parameters apply to a general request only — without a specific maskyoo and without a filter. When maskyoo or filter_name/filter_value is sent, all matching rows are returned without pagination.

Response fields

description, maskyoo, maskyoo_old (only when the two-number feature is enabled for the account), active_status, create_time, email, private_field1..10, sms_destination_phone, working_hours, out_of_time_destination_phone, callback_url, callback_url_option, greeting_in, ringback_tone, greeting_out, call_destination_phone, dial_option, dial_timeout_in_sec, record_percentage, record_option, extenstion, expose, disallow_callback, default_dest.

Error codes

CodeDescription
4030filter_name is not valid
4031No results

Example

curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
"https://[MASKYOO_URL]/api/?service=get_maskyoo&maskyoo=0776670000&format=json"

get_available_maskyoo

Return the list of numbers that are available for allocation (it does not allocate — it only returns).

Endpoint: /api/?service=get_available_maskyoo

Parameters

ParameterTypeRequiredDescription
prefixstringNOPrefix used to filter the available numbers.
maskyoostringNOPart of a Maskyoo number to filter by (an alternative to prefix).
amountintNONumber of results to return (default 5, maximum 50).
formatstringNOjson / xml.

Error codes

CodeDescription
4050No available numbers
4051No available numbers with the requested prefix

create_maskyoo

Create and allocate a new Maskyoo number to the account, with all of its dialing, prompt, recording and callback attributes.

Endpoint: /api/?service=create_maskyoo

Parameters

ParameterTypeRequiredDescription
descriptionstringYESThe number description (up to 199 characters).
call_destination_phonestringYESDestination numbers to dial, comma separated (maximum 150 characters).
maskyoostringNOA specific Maskyoo number to request (otherwise one is allocated automatically).
prefixstringNOPrefix used for automatic number selection.
active_statusintNO1 = active (default), 0 = suspended.
dial_optionint/stringNO1 / , = simultaneous dialing (default), 2 / ; = sequential (hunt), 3 / IVR = call router.
dial_timeout_in_secintNO1–180 seconds (the default comes from the account settings).
record_optionintNOWho hears the "this call is being recorded" announcement: 1 = the caller, 2 = the answering party, 3 = both. Applies only while recording is enabled — whether the call is recorded at all (yes/no/percentage) is controlled by the separate record_percentage field.
record_percentageintNORecording percentage 0–100 (0 = no recording; the alternative name record_presantge is also accepted).
exposeintNO1 = present the Maskyoo number (default), 2 = present the caller, 3 = anonymous.
disallow_callbackintNO0 (allowed), 1 or 2 (blocked according to the account settings).
callback_urlstringNOCallback URL (up to 511 characters).
callback_url_optionintNO1 = at call start, 2 = at call end (default), 3 = both.
greeting_instringNOInternal prompt name.
greeting_outstringNOPrompt name played to the caller.
ringback_tonestringNORingback tone (file name).
emailstringNOEmail address for notifications.
sms_destination_phonestringNONumber(s) that receive SMS notifications.
working_hoursstringNOA weekly working-hours pattern (168 characters). A string shorter than 168 characters is silently rejected — the value is not saved and no error is returned.
out_of_time_destination_phonestringNOAlternative destination outside working hours.
private_field1private_field10stringNOPrivate fields (up to 254 characters each).
formatstringNOjson / xml.

Response

On success the full object of the created number is returned — in the same structure that get_maskyoo returns.

Main error codes

CodeDescription
4000description is empty or longer than 199
4001call_destination_phone is empty / invalid / longer than 150
4002-4006private_field1..10 longer than 254
4007callback_url longer than 511
4008-4009Allocating the Maskyoo number failed
40010callback_url_option out of the range 1–3
40011dial_option out of the range 1–3
40012record_option out of the range 1–3
40013dial_timeout_in_sec out of the range 1–180
40014expose out of the range 1–3
40015disallow_callback is not 0/1/2

Example

curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
-X POST "https://[MASKYOO_URL]/api/?service=create_maskyoo" \
-d "description=Main office" \
-d "call_destination_phone=972544224422,972544224423" \
-d "dial_option=1" \
-d "record_percentage=100" \
-d "record_option=2" \
-d "format=json"

update_maskyoo

Update the attributes of an existing Maskyoo number. The number must belong to the account (otherwise error 4019 is returned).

Endpoint: /api/?service=update_maskyoo

Parameters

Identical to create_maskyoo, where:

  • Required: maskyoo, description, call_destination_phone. call_destination_phone must be sent in every update request (even when you only want to change another field) — otherwise error 4012 is returned.
  • All other parameters are optional; only the values that are sent are updated.

Response

On success the full object of the number after the update is returned — in the same structure that get_maskyoo returns.

Main error codes

CodeDescription
4010description is empty or longer than 199
4011maskyoo is empty / shorter than 5
4012call_destination_phone is invalid or longer than 150
4013-4017private_field1..10 longer than 254
4018Invalid Maskyoo number
4019The Maskyoo number does not exist in the account
4020 / 4021The update failed
4022-4027Invalid callback_url_option / dial_option / record_option / dial_timeout_in_sec / expose / disallow_callback values

Example

curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
-X POST "https://[MASKYOO_URL]/api/?service=update_maskyoo" \
-d "maskyoo=972776670000" \
-d "description=Updated" \
-d "call_destination_phone=972544224422" \
-d "record_percentage=50" \
-d "format=json"

release_maskyoo

Release a Maskyoo number from the account. The number returns to the pool of available numbers.

Endpoint: /api/?service=release_maskyoo

Parameters

ParameterTypeRequiredDescription
maskyoostringYESThe number to release (in accounts with a secondary Maskyoo number, the old number is supported as well).
formatstringNOjson / xml.

On release the system usually also removes the per-Maskyoo blocks of that number, but in some configurations those blocks may remain — it is therefore recommended to verify and manage blocks through the blacklist services. Global blacklist blocks always remain.

Error codes

CodeDescription
4040maskyoo is missing
4041The Maskyoo number does not exist
4042The release failed
4043Invalid Maskyoo number

restore_maskyoo

Restore a Maskyoo number that was released. It works only on a number that previously belonged to the current account, and only while that number is still free and has not been re-allocated.

Endpoint: /api/?service=restore_maskyoo

Parameters

ParameterTypeRequiredDescription
maskyoostringYESThe number to restore.
formatstringNOjson / xml.

Error codes

CodeDescription
4040maskyoo is missing
4041Invalid number
4042The number is not registered as released from the account
4043The number is already active
4044The number cannot be restored to the account

In case of any other failure a detailed status code is returned to help when contacting support.


create_maskyoo_call

Initiate a call (classic Click2Call): the system calls the destination and, on answer, connects it to the Maskyoo number.

Endpoint: /api/?service=create_maskyoo_call

Parameters

ParameterTypeRequiredDescription
maskyoostringYESThe number the call is "sent" from.
destinationstringYESThe calling number.
first_targetstringNOmaskyoo to call the Maskyoo number first and then connect it to the destination (this also swaps greeting_in / greeting_out).
formatstringNOjson / xml.

Error codes

CodeDescription
3011maskyoo is empty / invalid
3012Calls cannot be placed for this account
3013The destination is blacklisted
3014The Maskyoo number is suspended
3015Placing the call failed
3016The Maskyoo number does not exist

create_maskyoo_call_v2

Initiate a call with two number pairs — each side is presented with a different Caller ID. This version also accepts custom parameters that are stored on the call for reporting and for the pixel.

Endpoint: /api/?service=create_maskyoo_call_v2

Parameters

ParameterTypeRequiredDescription
maskyoo1 (or maskyoo)stringYESCaller ID for the first side.
destination1stringYESThe number the call goes out to.
maskyoo2stringNOCaller ID for the second side (default: same as maskyoo1).
destination2stringYESThe number the first side is connected to.
Additional parametersstringNOAny additional parameter is stored on the call and is available in the reports and in the pixel.
formatstringNOjson / xml.

Error codes

CodeDescription
3031maskyoo is empty / invalid
3032destination1 or destination2 is empty / invalid
3033 / 3038destination1 / destination2 is blacklisted
3034 / 3037maskyoo1 / maskyoo2 is suspended
3035Placing the call failed
3036maskyoo1 or maskyoo2 does not exist
3039Outside the working hours of one of the numbers

Service disabled (deprecated)

The service still generates a signed link, but placing the call when the link is opened is currently disabled — clicking the link does not initiate a call. Do not rely on these links in business processes; for details contact Maskyoo support.

Create a signed link that can be embedded in a website or a campaign. When enabled, opening the link initiates a call according to the settings.

Endpoint: /api/?service=click2call_link

Parameters

ParameterTypeRequiredDescription
maskyoostringYESThe Maskyoo number presented to the destination.
destinationstringYESThe destination.
first_targetstringNOmaskyoo / destination (default).
expire_daysintNOLink validity in days (default 365).
formatstringNOjson / xml.

Response

result contains the public URL of the generated link (including the signature and the expiration date).

Error codes

CodeDescription
3017maskyoo is empty / invalid
3018destination is empty / invalid
3019The Maskyoo number does not exist
3020The Maskyoo number is suspended
3021The destination is blacklisted

test

Check API availability. It requires no additional parameters, but it does require a valid IP and token.

Endpoint: /api/?service=test

Returns {"service":"test","status":{"code":200,"description":"OK"}}.

System impact

The Maskyoo management services affect the number itself and all the logic that depends on it:

  • Number management screen — create / update / release / restore is visible immediately in the number management page and in all reports
  • Billing — allocation (create_maskyoo) and release / restore may affect the monthly rate according to the commercial plan
  • Blacklist — releasing a number usually removes the blocks defined for that Maskyoo number (in some configurations they may remain — it is recommended to verify through the blacklist services); global blocks are kept
  • Click2Callclick2call_link creates a signed public URL valid for expire_days; placing the call from the link is currently disabled (see the warning in that section)
  • Calls and reportscreate_maskyoo_call / create_maskyoo_call_v2 create a live call that is written to the CDR with all custom parameters, and it takes part in automation and in the pixel
  • Changes log — every change to a number is recorded and presented in the Maskyoo changes log

See also