{"security":[{"versatureOauth":[]}],"info":{"version":"1.10.11","description":"The net2phone API is an HTTP web service that provides programmatic access to selected features of your net2phone account. It empowers you with the ability to create your integrations using our communication data resources, for example, call data records that contain details about phone calls.","title":"net2phone API"},"components":{"examples":{"account-3":{"x-n2p-supportedGenerations":["gen_x","gen_u"],"value":{"generation":"gen_x","account_number":null,"domain":"1015790","package":null}},"http-webhook-subscription-settings":{"value":{"post_uri":"https:\/\/mydomain.com\/webhooks","user":"*","cdrs":false,"expires_in":604800,"recordings":false,"calls":true}},"call-2":{"x-n2p-supportedGenerations":["gen_p","get_v"],"value":{"to":"+16133246100","from":"39657"},"summary":"Example of a call placed to a E164 Phone Number and from the authenticated user."},"users":{"value":[{"first_name":"John","last_name":"Smith","email":"noreply@versature.com","username":"110@example.com","user":"100","scope":"Basic User","domain":"example.com","time_zone":"US\/Pacific"},{"first_name":"Jane","last_name":"Brown","email":"yesreply@versature.com","username":"220@example.com","user":"220","scope":"Office Manager","domain":"example.com","time_zone":"US\/Eastern"}]},"call-3":{"x-n2p-supportedGenerations":["gen_x","gen_u"],"value":{"to":"+16133246100","from":"101"},"summary":"Example of a call placed to a E164 Phone Number and from the authenticated user extension."},"http-webhook-subscription":{"value":{"post_uri":"https:\/\/mydomain.com\/webhooks","expires":"2021-04-29T11:45:11.110000","events":[{"user":"*","type":"cdrs"},{"user":"201","type":"recordings"}],"id":12345}},"user":{"value":{"first_name":"John","last_name":"Smith","email":"noreply@versature.com","username":"110@example.com","user":"100","scope":"Office Manager","domain":"example.com","time_zone":"Canada\/Eastern"}},"call-5":{"x-n2p-supportedGenerations":["get_v"],"value":{"to":"100@yourdomain.com","auto_answer":true},"summary":"Example of a call placed to a SIP user address without the from parameter (as it is optional), and with auto_answer."},"call-6":{"x-n2p-supportedGenerations":["get_v"],"value":{"to":"+16133246100","from":"100@yourdomain.com"},"summary":"Example of a call placed from a SIP user address."},"call-7":{"x-n2p-supportedGenerations":["gen_x","gen_u"],"value":{"to":"+16133246100","from":"+16135769032"},"summary":"Example of a call placed from a E164 Phone Number."},"endpoints":{"value":["password_grant","refresh_token_grant","place_call","read_subscription","delete_subscription","create_subscription","refresh_subscription","cdrs"]},"call":{"x-n2p-supportedGenerations":["gen_p","get_v","gen_x","gen_u"],"value":{"to":"+16133246100"},"summary":"Example of a call placed to a E164 Phone Number without the from parameter (as it is optional)."},"webhook-call-ringing":{"value":{"on_net":false,"duration":10,"time_start":"2021-11-24 13:50:12","from":{"state":"progressing","call_id":"ea5537bf1fd8eb53e8b435592f86a539","user":null,"id":"+16133246100","domain":null,"name":null},"to":{"state":"ringing","call_id":"ac68b6fb9072dd2aa32b5e9098330b72","user":"126","is_human":true,"domain":"yourdomain.com","id":"126"},"by_call_id":null,"time_answer":null}},"cdrs-2":{"x-n2p-supportedGenerations":["gen_p"],"value":{"more":true,"cursor":"20","result":[{"duration":120,"from":{"value":"+16133246111","call_id":"20210503030052031111-06f03fea68d5e32ff07831a419fdfcab","user":"111"},"to":{"value":"+16133246100","call_id":"20210503030052031111-436c626c08717949a56705103ea809c0","user":null},"start_time":"2021-05-01T03:00:49+00:00","end_time":"2021-05-01T03:02:49+00:00"}]}},"call-4":{"x-n2p-supportedGenerations":["gen_p","get_v","gen_x","gen_u"],"value":{"to":"100","from":"103"},"summary":"Example of a call placed to an extension and from the authenticated user extension."},"account-2":{"x-n2p-supportedGenerations":["gen_p"],"value":{"generation":"gen_p","account_number":null,"domain":"811128461112849","package":null}},"cdrs-3":{"x-n2p-supportedGenerations":["gen_x","gen_u"],"value":{"more":true,"cursor":"ejLDdXJac3JJZCI5MTg3MTgy9Kf5LCJEaBGlP3Rpb24iOkA5","result":[{"duration":120,"from":{"name":"John Doe","value":"+16133246111","call_id":"20210503030052031111-06f03fea68d5e32ff07831a419fdfcab","user":"111"},"call_type":"Inbound","start_time":"2021-05-01T03:00:49+00:00","end_time":"2021-05-01T03:02:49+00:00","to":{"name":"","value":"+16133246100","call_id":"20210503030052031111-436c626c08717949a56705103ea809c0","user":null}}]}},"webhook-call-answered":{"value":{"on_net":false,"duration":10,"time_start":"2021-11-24 13:50:12","from":{"state":"active","call_id":"ea5537bf1fd8eb53e8b435592f86a539","user":null,"id":"+16133246100","domain":null,"name":null},"to":{"state":"active","call_id":"ac68b6fb9072dd2aa32b5e9098330b72","user":"126","is_human":true,"domain":"yourdomain.com","id":"126"},"by_call_id":null,"time_answer":"2021-11-24 13:50:22"}},"cdrs":{"x-n2p-supportedGenerations":["gen_v"],"value":{"more":true,"cursor":"CtsBCh0KEAbCdeFgHIjklmNOpQRstuWvXyZlruU_JfyAhK1AWocc352ZXJzYXR1cmUtaW50ZWdyYXRlLTItdGVzdHKUAQsSBUJhdGNoIihmdTJkbWQyMjRwdDIxYmV2amlmcl8yMDIxLTA4LTA19D823K45H06S78dmVyc2F0dXJlLmNvbV9mdTJkbWQyMjRwdDIxYmV2amlmcl8yMDIxMDgwNDE4MTMzMjAzMzk5OS01MDhhNDllYTFhMGExN2YyODRmMGYwZjY2ZmE1ZmYMCA0OKs8k2","result":[{"duration":312,"has_recording_been_analyzed_for_sentiment":false,"by":{"value":"+16133246100","username":null,"user":null,"domain":"yourdomain.com"},"to":{"value":"+16133246100","has_recording_been_analyzed_for_sentiment":false,"uri":"sip:+16133246100@herdomain.com","username":null,"user":null,"call_id":"20210503030052031111-436c626c08717949a56705103ea809c0","domain":"herdomain.com","recordings":[],"has_recording_been_analyzed":false},"answer_time":"2018-05-03T14:02:49+00:00","from":{"value":"+16133246100","has_recording_been_analyzed_for_sentiment":false,"uri":"sip:16133246100@yourdomain.com","name":"John Doe","call_id":"20180503030052031111-436c626c08717949a56705103ea809c0","user":"101","username":null,"domain":"yourdomain.com","recordings":[{"is_processed":true,"has_recording_been_analyzed_for_sentiment":false,"is_available":true,"url":"https:\/\/versature-integrate.appspot.com\/api\/recordings\/93bc0b9a43a6458acced84a6fc4cf270\/recording\/","status":{"name":"Available","message":null,"processing_error":false,"time":"Monday, 3 Jun 2018 19:05:45 -0000"},"processing_error":false,"recording_id":"93bc0b9a43a6458acced84a6fc4cf270","has_recording_been_analyzed":false}],"has_recording_been_analyzed":false},"end_time":"2018-05-03T15:08:01+00:00","call_type":"Outgoing","start_time":"2018-05-03T14:02:45+00:00","domain":"yourdomain.com","has_recording_been_analyzed":false}]}},"webhook-call-completed":{"value":{"on_net":false,"duration":10,"time_start":"2021-11-24 13:50:12","from":{"state":"ended","call_id":"ea5537bf1fd8eb53e8b435592f86a539","user":"120","id":"+16133246100","domain":"yourdomain.com","name":"John Doe"},"to":{"state":"ended","call_id":"ac68b6fb9072dd2aa32b5e9098330b72","user":"126","is_human":true,"domain":"yourdomain.com","id":"126"},"by_call_id":null,"time_answer":"2021-11-24 13:50:22"}},"webhook-call-auto-attendant":{"value":{"on_net":false,"duration":10,"time_start":"2022-07-13 14:10:20","from":{"state":"active","call_id":"ea5537bf1fd8eb53e8b435902f86a539","user":"106","id":"+16133246101","domain":"yourdomain.com","name":"Example User"},"to":{"state":"active","call_id":"ac68b6fb9682dd2aa32b9e9098330b72","user":"110","is_human":true,"domain":"yourdomain.com","id":"110wp"},"by_call_id":null,"time_answer":"2022-07-13 14:10:29"}},"account":{"x-n2p-supportedGenerations":["gen_v"],"value":{"generation":"gen_v","account_number":"600010","domain":"versature.com","package":"Professional"}}},"parameters":{"cursor":{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The cursor\/index from which to continue a previous request from."},"type":{"name":"type","in":"query","schema":{"enum":["Incoming","Outgoing","On Net"],"type":"string"},"x-n2p-supportedGenerations":["gen_v","gen_x","gen_u"],"description":"The type of phone call which took place.\n\nSupported in the following net2phone account generations: Gen V, Gen X, Gen U"},"max-duration":{"name":"max_duration","in":"query","schema":{"format":"int32","nullable":true,"type":"integer"},"x-n2p-supportedGenerations":["gen_v"],"description":"Filter CDRs by maximum duration.\n\nSupported in the following net2phone account generations: Gen V"},"phone-number":{"name":"phone_number","in":"query","schema":{"type":"string"},"x-n2p-supportedGenerations":["gen_v"],"description":"Filter CDRs by phone number used\n\nSupported in the following net2phone account generations: Gen V"},"start-date":{"name":"start_date","required":true,"description":"Get calls which started after this time. In UTC if timezone not specified.","schema":{"format":"date-time","type":"string"},"in":"query"},"end-date":{"name":"end_date","in":"query","schema":{"format":"date-time","type":"string"},"description":"Get calls which ended after this time. In UTC if timezone not specified. If no start date is provided results for calls after this end date will be returned."},"limit":{"name":"limit","in":"query","schema":{"maximum":100,"minimum":1,"default":20,"format":"int32","type":"integer"},"x-n2p-supportedGenerations":["gen_p","gen_x","gen_u"],"description":"The number of returned items.\n\nSupported in the following net2phone account generations: Gen P, Gen X, Gen U"},"page-size":{"name":"page_size","in":"query","schema":{"maximum":100,"minimum":1,"default":10,"format":"int32","type":"integer"},"x-n2p-supportedGenerations":["gen_v"],"description":"Number of returned items.\n\nSupported in the following net2phone account generations: Gen V"},"user":{"name":"user","in":"query","schema":{"format":"int32","type":"integer"},"description":"The user\/extension to retrieve the call records for. Append multiple times to filter by multiple users."},"http-subscription-id":{"name":"subscriptionId","required":true,"description":"The ID of the subscription","schema":{"$ref":"#\/components\/schemas\/http-subscription-id"},"in":"path"},"min-duration":{"name":"min_duration","in":"query","schema":{"format":"int32","nullable":true,"type":"integer"},"x-n2p-supportedGenerations":["gen_v"],"description":"Filter CDRs by minimum duration.\n\nSupported in the following net2phone account generations: Gen V"},"user-id":{"name":"userId","required":true,"description":"Id of the user","schema":{"format":"int32","type":"integer"},"in":"path"},"recording-available":{"name":"recording_available","in":"query","schema":{"default":false,"type":"boolean"},"x-n2p-supportedGenerations":["gen_v"],"description":"Filter CDRs to only include ones with recordings.\n\nSupported in the following net2phone account generations: Gen V"}},"callbacks":{"call-completed":{"{$request.query.post_uri}":{"post":{"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook-call"},"examples":{"example":{"$ref":"#\/components\/examples\/webhook-call-completed"}}}},"description":"This event is triggered when a call is completed."},"responses":{"default":{"description":"The response of the webhook endpoint is discarded, webhook requests are never retried."}}}}},"call-ringing":{"{$request.query.post_uri}":{"post":{"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook-call"},"examples":{"example":{"$ref":"#\/components\/examples\/webhook-call-ringing"}}}},"description":"This event is triggered when a call is ringing."},"responses":{"default":{"description":"The response of the webhook endpoint is discarded, webhook requests are never retried."}}}}},"call-with-auto-attendant":{"{$request.query.post_uri}":{"post":{"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook-call"},"examples":{"example":{"$ref":"#\/components\/examples\/webhook-call-auto-attendant"}}}},"description":"This is an example of a call with auto attendant. Note`:` the id is an extension instead of a phone number."},"responses":{"default":{"description":"The response of the webhook endpoint is discarded, webhook requests are never retried."}}}}},"call-answered":{"{$request.query.post_uri}":{"post":{"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook-call"},"examples":{"example":{"$ref":"#\/components\/examples\/webhook-call-answered"}}}},"description":"This event is triggered when a call is answered."},"responses":{"default":{"description":"The response of the webhook endpoint is discarded, webhook requests are never retried."}}}}}},"schemas":{"http-webhook-subscription-settings":{"allOf":[{"$ref":"#\/components\/schemas\/webhook-subscription-settings-common"},{"$ref":"#\/components\/schemas\/http-only-webhook-subscription-settings"}]},"cdr":{"properties":{"duration":{"type":"number","description":"How many seconds the call lasted."},"from":{"properties":{"value":{"type":"string","description":"The e164 phone number associated with a call leg."},"has_recording_been_analyzed_for_sentiment":{"x-n2p-supportedGenerations":["gen_v"],"type":"boolean","description":"Has the recording been processed.\n\nSupported in the following net2phone account generations: Gen V"},"uri":{"x-n2p-supportedGenerations":["gen_v"],"type":"string","description":"The connected origination\/termination device or number in full sip uri format.\n\nSupported in the following net2phone account generations: Gen V"},"username":{"x-n2p-supportedGenerations":["gen_v"],"type":"string","description":"The user@domain for the user associated with a call leg.\n\nSupported in the following net2phone account generations: Gen V"},"user":{"type":"string","description":"The extension of the user associated with this call leg."},"call_id":{"type":"string","description":"The unique identifier for one side of the call."},"domain":{"x-n2p-supportedGenerations":["gen_v"],"type":"string","description":"Domain associated with this call.\n\nSupported in the following net2phone account generations: Gen V"},"recordings":{"x-n2p-supportedGenerations":["gen_v"],"description":"A collection of recordings associated with a call leg.\n\nSupported in the following net2phone account generations: Gen V","items":{"properties":{"is_processed":{"type":"boolean","description":"Has recording been processed."},"has_recording_been_analyzed_for_sentiment":{"type":"boolean","description":"Has the recording been processed."},"is_available":{"type":"boolean","description":"True if a recording is available for download."},"url":{"type":"string","description":"A url to download the recording from."},"status":{"properties":{"name":{"enum":["Processing","Available","No Recording","Deleted","Archived","Ignored"],"type":"string","description":"The name\/state for a given recording."},"message":{"type":"string","nullable":true,"description":"Associated message for the status."},"processing_error":{"default":false,"type":"boolean","description":"True if there was an error in processing the recording."},"time":{"type":"string","format":"date-time","description":"Time of recording."}},"type":"object","description":"The status for of this recording."},"processing_error":{"type":"boolean","description":"True if there was an error in processing the recording."},"recording_id":{"type":"string","description":"A unique id for a given .recording"},"has_recording_been_analyzed":{"type":"boolean","description":"Has the recording been processed."}},"type":"object"},"type":"array"},"has_recording_been_analyzed":{"x-n2p-supportedGenerations":["gen_v"],"type":"boolean","description":"Has the recording been processed.\n\nSupported in the following net2phone account generations: Gen V"}},"type":"object"},"to":{"properties":{"value":{"type":"string","description":"The e164 phone number associated with a call leg."},"has_recording_been_analyzed_for_sentiment":{"x-n2p-supportedGenerations":["gen_v"],"type":"boolean","description":"Has the recording been processed.\n\nSupported in the following net2phone account generations: Gen V"},"uri":{"x-n2p-supportedGenerations":["gen_v"],"type":"string","description":"The connected origination\/termination device or number in full sip uri format.\n\nSupported in the following net2phone account generations: Gen V"},"username":{"x-n2p-supportedGenerations":["gen_v"],"type":"string","description":"The user@domain for the user associated with a call leg.\n\nSupported in the following net2phone account generations: Gen V"},"user":{"type":"string","description":"The extension of the user associated with this call leg."},"call_id":{"type":"string","description":"The unique identifier for one side of the call."},"domain":{"x-n2p-supportedGenerations":["gen_v"],"type":"string","description":"Domain associated with this call.\n\nSupported in the following net2phone account generations: Gen V"},"recordings":{"x-n2p-supportedGenerations":["gen_v"],"description":"A collection of recordings associated with a call leg.\n\nSupported in the following net2phone account generations: Gen V","items":{"properties":{"is_processed":{"type":"boolean","description":"Has recording been processed."},"has_recording_been_analyzed_for_sentiment":{"type":"boolean","description":"Has the recording been processed."},"is_available":{"type":"boolean","description":"True if a recording is available for download."},"url":{"type":"string","description":"A url to download the recording from."},"status":{"properties":{"name":{"enum":["Processing","Available","No Recording","Deleted","Archived","Ignored"],"type":"string","description":"The name\/state for a given recording."},"message":{"type":"string","nullable":true,"description":"Associated message for the status."},"processing_error":{"default":false,"type":"boolean","description":"True if there was an error in processing the recording."},"time":{"type":"string","format":"date-time","description":"Time of recording."}},"type":"object","description":"The status for of this recording."},"processing_error":{"type":"boolean","description":"True if there was an error in processing the recording."},"recording_id":{"type":"string","description":"A unique id for a given recording."},"has_recording_been_analyzed":{"type":"boolean","description":"Has the recording been processed."}},"type":"object"},"type":"array"},"has_recording_been_analyzed":{"x-n2p-supportedGenerations":["gen_v"],"type":"boolean","description":"Has the recording been processed.\n\nSupported in the following net2phone account generations: Gen V"}},"type":"object","description":"The destination side of the call."},"answer_time":{"x-n2p-supportedGenerations":["gen_v"],"type":"string","description":"Date and time the call was answered (in UTC).\n\nSupported in the following net2phone account generations: Gen V"},"end_time":{"type":"string","description":"Date and time the call was ended (in UTC)."},"by":{"x-n2p-supportedGenerations":["gen_v"],"description":"The by side of the call.\n\nSupported in the following net2phone account generations: Gen V","properties":{"value":{"type":"string","nullable":true,"description":"The sip address or e164 number associated with a call leg."},"username":{"type":"string","nullable":true,"description":"The user@domain for the user associated with a call leg."},"user":{"type":"string","nullable":true,"description":"The extension of the user associated with this call leg."},"domain":{"type":"string","nullable":true,"description":"Domain associated with this call."}},"type":"object"},"call_type":{"x-n2p-supportedGenerations":["gen_v","gen_x","gen_u"],"enum":["Incoming","Outgoing","On Net"],"description":"The type of call.\n\nSupported in the following net2phone account generations: Gen V, Gen X, Gen U","type":"string"},"start_time":{"type":"string","description":"Date and time the call was started (in UTC)."},"domain":{"x-n2p-supportedGenerations":["gen_v"],"type":"string","description":"Domain associated with this call.\n\nSupported in the following net2phone account generations: Gen V"},"has_recording_been_analyzed":{"x-n2p-supportedGenerations":["gen_v"],"type":"boolean","description":"Has cdr been processed for transcription and\/or redaction.\n\nSupported in the following net2phone account generations: Gen V"}}},"webhook-subscription-common":{"properties":{"events":{"uniqueItems":true,"items":{"properties":{"user":{"default":"*","type":"string"},"type":{"enum":["calls","cdrs","recordings"],"type":"string"}},"required":["type","user"]},"type":"array"}},"type":"object"},"http-subscription-id":{"type":"integer","format":"int64","description":"Unique identifier of the subscription."},"http-webhook-subscription":{"allOf":[{"$ref":"#\/components\/schemas\/webhook-subscription-common"},{"$ref":"#\/components\/schemas\/http-only-webhook-subscription-settings"},{"properties":{"id":{"$ref":"#\/components\/schemas\/http-subscription-id"}},"required":["id"],"type":"object"}]},"user":{"required":["username","user","first_name","last_name","email","scope"],"description":"Details of the user","properties":{"first_name":{"description":"The first name of the user","type":"string"},"last_name":{"description":"The last name of the user","type":"string"},"email":{"description":"The email address of the user","type":"string"},"username":{"description":"The user identifier","type":"string"},"user":{"description":"The user's extension","type":"string"},"scope":{"enum":["Basic User","Office Manager","Call Center Supervisor","Call Center User","admin","regular","primary","anonymous"],"description":"The role of this user","type":"string"},"domain":{"description":"The domain for the user","type":"string"},"time_zone":{"description":"The time zone this user resides in","type":"string"}},"title":"User Details","type":"object"},"webhook-call":{"description":"A call subscription will result in Post request to your subscribed endpoint on call state changes for the subscribed user and company. The ringing event will show one side as `ringing` and the other as `progressing`.\n* `progressing` - call is waiting for the other side\n* `ringing` - endpoint is ringing\n* `active` - call is up\n* `ended` - call terminated","properties":{"calls":{"properties":{"on_net":{"type":"boolean","description":"If call was between net2phone sip devices."},"duration":{"type":"integer","format":"int32","description":"The duration of the call in seconds."},"time_start":{"type":"string","format":"date-time","description":"When this call initialized."},"from":{"properties":{"name":{"type":"string","nullable":true,"description":"Name of the extension\/user"},"call_id":{"type":"string","description":"The unique id of this call."},"user":{"type":"string","nullable":true,"description":"The extension\/user id. `null` if a net2phone user is not involved."},"id":{"type":"string","description":"The phone number or device\/extension. Phone numbers will be in E164 notation."},"domain":{"nullable":true,"description":"The customer\/company associated with this call. Null if a net2phone domain is not involved on the given endpoint."},"state":{"enum":["progressing","ringing","active","ended"],"type":"string","description":"The state of this call."}},"type":"object","description":"Where the call originated"},"to":{"properties":{"state":{"enum":["progressing","ringing","active","ended"],"type":"string","description":"The state of this call."},"call_id":{"type":"string","description":"The unique id of this call."},"user":{"description":"The extension\/user id. `null` if a net2phone user is not involved.","nullable":true,"format":"int32","type":"integer"},"id":{"type":"string","description":"The phone number or device\/ext. Phone numbers will be in E164 notation. In case of auto-attendant, call queue or transfer from one extension to another, the call id will be the extension number instead of the phone number."},"domain":{"nullable":true,"description":"The customer\/company associated with this call. Null if a net2phone domain is not involved on the given endpoint."},"is_human":{"type":"boolean"}},"type":"object","description":"The destination of the call."},"by_call_id":{"type":"string","description":"An intermediary call id. Used in when the call is transferred from one party to another."},"time_answer":{"description":"When the end user picked up the call. `null` for ringing event.","nullable":true,"format":"date-time","type":"string"}},"type":"object"}},"type":"object","title":"Call Webhook"},"endpoints":{"uniqueItems":true,"description":"List of available endpoints","items":{"enum":["password_grant","refresh_token_grant","place_call","read_subscription","delete_subscription","create_subscription","refresh_subscription","cdrs"],"type":"string","description":"Endpoint descriptions"},"type":"array","title":"Available endpoints"},"account":{"required":["domain","generation"],"description":"Details about the user's account number and generation","properties":{"generation":{"x-n2p-supportedGenerations":["gen_v","gen_p","gen_x","gen_u"],"enum":["gen_v","gen_p","gen_x","gen_u"],"description":"Generation of the account. Represents the underlying system used for the API implementation. Depending on it some fields in API resources may be available or not.\n\nSupported in the following net2phone account generations: Gen V, Gen P, Gen X, Gen U","type":"string"},"account_number":{"x-n2p-supportedGenerations":["gen_v"],"description":"Account number for the user.\n\nSupported in the following net2phone account generations: Gen V","nullable":true,"type":"string"},"domain":{"x-n2p-supportedGenerations":["gen_p","gen_x","gen_u","gen_v"],"type":"string","description":"Domain is the unique identifier of the account.\n\nSupported in the following net2phone account generations: Gen P, Gen X, Gen U, Gen V"},"package":{"x-n2p-supportedGenerations":["gen_v"],"enum":["Professional","Enterprise","Work From Home","Channel Bundle","Call Centre","Call Centre Pro","Legacy","Business Premier","Business Select","Starter Kit"],"description":"Type of plan (tier) that a net2phone Canada client pays for to get services.\n\nSupported in the following net2phone account generations: Gen V","nullable":true,"type":"string"}},"title":"Account generation","type":"object"},"http-only-webhook-subscription-settings":{"properties":{"post_uri":{"description":"The HTTP(S) endpoint which is notified when an event occurs.","format":"uri","type":"string"}},"required":["post_uri"],"type":"object"},"webhook-subscription-settings-common":{"properties":{"user":{"default":"*","description":"One or more users to subscribe to. Omit to subscribe to all users webhooks.\nAppend multiple times to subscribe to multiple users.","type":"string"},"cdrs":{"default":false,"type":"boolean","description":"Subscribe to CDR events"},"expires_in":{"description":"The number of seconds until the webhook subscription expires","maximum":604800,"default":7200,"format":"int32","type":"integer"},"recordings":{"default":false,"description":"Subscribe to recording events","type":"boolean"},"calls":{"default":false,"description":"Subscribe to call events","type":"boolean"}},"type":"object"},"call":{"required":["to"],"description":"Body of create call request","properties":{"to":{"x-n2p-supportedGenerations":["gen_p","gen_x","gen_u","gen_v"],"description":"The destination for this call. All Generations accounts allow the use of E.164 phone number and extensions. Exception: Gen V accounts also allow the use of SIP user.\n\nSupported in the following net2phone account generations: Gen P, Gen X, Gen U, Gen V","type":"string"},"from":{"x-n2p-supportedGenerations":["gen_p","gen_x","gen_u","gen_v"],"description":"For Gen P and Gen V accounts the `from` parameter is the authenticated user id where this call originates from. For Gen U and Gen X accounts the `from` parameter can be the user phone number or the user extension. Exceptions: For Gen V you can also use the SIP user.\n\nSupported in the following net2phone account generations: Gen P, Gen X, Gen U, Gen V","nullable":true,"type":"string"},"auto_answer":{"x-n2p-supportedGenerations":["gen_v"],"description":"Should this caller side be auto answered. (Note. It may not be supported by the answering device.)\n\nSupported in the following net2phone account generations: Gen V","default":false,"nullable":true,"type":"boolean"}},"title":"Create Call","type":"object"},"cdr-page":{"description":"A page of call detail records (CDR).","properties":{"more":{"type":"boolean","description":"True if there is more data available. If True use the cursor to request the next batch of data."},"cursor":{"type":"string","description":"The cursor\/index from which to continue a previous request from."},"result":{"uniqueItems":true,"description":"A list of CDR data","items":{"$ref":"#\/components\/schemas\/cdr"},"type":"array"}},"type":"object","title":"A Page of CDRs"}},"responses":{"unauthorized":{"content":{"application\/vnd.integrate.v1.10.0+json":{"example":{"status":401,"message":"Invalid Vendor"},"schema":{"properties":{"status":{"enum":[401],"format":"int32","type":"integer"},"message":{"enum":["Invalid Vendor"],"type":"string"}},"required":["status","message"],"type":"object"}}},"description":"The associated `vendor` was not found."},"invalid-version":{"content":{"application\/vnd.integrate.v1.10.0+json":{"example":{"status":422,"message":"An invalid version number was provided."},"schema":{"properties":{"status":{"enum":[422],"format":"int32","type":"integer"},"message":{"enum":["An invalid version number was provided."],"type":"string"}},"required":["status","message"],"type":"object"}}},"description":"An invalid version number was provided in the `Accept` request header."},"forbidden":{"content":{"application\/vnd.integrate.v1.10.0+json":{"example":{"status":403,"message":"Access Forbidden, you do not have the correct permissions."},"schema":{"properties":{"status":{"enum":[403],"format":"int32","type":"integer"},"message":{"enum":["Access Forbidden, you do not have the correct permissions."],"type":"string"}},"required":["status","message"],"type":"object"}}},"description":"Your permission level was insufficient to access the requested resource and\/or perform the given action."},"rate-limit-exceeded":{"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"properties":{"message":{"type":"string"}},"required":["message"],"type":"object"},"examples":{"rate limit per minute exceeded":{"value":{"message":"1 per 1 minute"}},"rate limit per second exceeded":{"value":{"message":"1 per 1 second"}}}}},"description":"Requests to this endpoint are limited to a certain rate. If you have exceeded this rate check the endpoints limit and try again after a cool down period."},"not-found":{"content":{"application\/vnd.integrate.v1.10.0+json":{"example":{"status":404,"message":"Resource does not exist."},"schema":{"properties":{"status":{"enum":[404],"format":"int32","type":"integer"},"message":{"enum":["Resource does not exist."],"type":"string"}},"required":["status","message"],"type":"object"}}},"description":"The requested resource does not exist."},"internal-server-error":{"content":{"application\/vnd.integrate.v1.10.0+json":{"example":{"status":500,"message":"An error occurred while marshalling the response."},"schema":{"properties":{"status":{"enum":[500],"format":"int32","type":"integer"},"message":{"enum":["An error occurred while marshalling the response."],"type":"string"}},"required":["status","message"],"type":"object"}}},"description":"Internal Server Error"}},"securitySchemes":{"versatureOauth":{"x-client-secret":"LAwJ4AqpjyiAahJYqVcKEguxPf5pbFR8HS7iRds6Wt1f1ll5xw","flows":{"password":{"tokenUrl":"https:\/\/api.n2p.io\/v1\/oauth\/token\/","scopes":{}}},"description":"Add your net2phone credentials below in order to get a token and test the API.\nPlease choose `Request Body` in the dropbox before clicking the `Get Token` button.\n","x-client-id":"5126610649874432","type":"oauth2"}}},"servers":[{"description":"net2phone Production API Server","url":"https:\/\/api.n2p.io\/v1"}],"openapi":"3.0.0","paths":{"\/cdrs\/users\/":{"get":{"responses":{"200":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"5\/second, 15\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/cdr-page"},"examples":{"Gen P":{"$ref":"#\/components\/examples\/cdrs-2"},"Gen X and Gen U":{"$ref":"#\/components\/examples\/cdrs-3"},"Gen V":{"$ref":"#\/components\/examples\/cdrs"}}}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"description":"Get list of all user cdrs on the account","tags":["CDRs"],"summary":"User CDRs","parameters":[{"$ref":"#\/components\/parameters\/user"},{"$ref":"#\/components\/parameters\/start-date"},{"$ref":"#\/components\/parameters\/end-date"},{"$ref":"#\/components\/parameters\/limit"},{"$ref":"#\/components\/parameters\/cursor"},{"$ref":"#\/components\/parameters\/type"},{"$ref":"#\/components\/parameters\/page-size"},{"$ref":"#\/components\/parameters\/recording-available"},{"$ref":"#\/components\/parameters\/max-duration"},{"$ref":"#\/components\/parameters\/min-duration"},{"$ref":"#\/components\/parameters\/phone-number"}]}},"\/subscriptions\/{subscriptionId}\/":{"get":{"responses":{"200":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"1\/second, 5\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/http-webhook-subscription"},"examples":{"example":{"$ref":"#\/components\/examples\/http-webhook-subscription"}}}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"tags":["Webhooks"],"summary":"Get the webhook subscription details for the given id. Can be used to verify subscribed events as well the subscription expiry date\/time.\nNote: Users can only read subscriptions that they created.","parameters":[{"$ref":"#\/components\/parameters\/http-subscription-id"}]},"delete":{"responses":{"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"204":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"1\/second, 5\/minute"}},"description":"The webhook subscription was deleted successfully."},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"tags":["Webhooks"],"summary":"Delete a webhook subscription with the given id. Updates will no longer be sent the subscription endpoint.\nNote: Users can only delete subscriptions that they created.","parameters":[{"$ref":"#\/components\/parameters\/http-subscription-id"}]}},"\/cdrs\/users\/{userId}\/":{"get":{"responses":{"200":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"5\/second, 15\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/cdr-page"},"examples":{"Gen P":{"$ref":"#\/components\/examples\/cdrs-2"},"Gen X and Gen U":{"$ref":"#\/components\/examples\/cdrs-3"},"Gen V":{"$ref":"#\/components\/examples\/cdrs"}}}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"description":"Get list of all CDRs on the account for the current user","tags":["CDRs"],"summary":"User CDRs by ID","parameters":[{"$ref":"#\/components\/parameters\/user"},{"$ref":"#\/components\/parameters\/start-date"},{"$ref":"#\/components\/parameters\/end-date"},{"$ref":"#\/components\/parameters\/limit"},{"$ref":"#\/components\/parameters\/cursor"},{"$ref":"#\/components\/parameters\/type"},{"$ref":"#\/components\/parameters\/page-size"},{"$ref":"#\/components\/parameters\/recording-available"},{"$ref":"#\/components\/parameters\/max-duration"},{"$ref":"#\/components\/parameters\/min-duration"},{"$ref":"#\/components\/parameters\/phone-number"}]}},"\/calls\/":{"post":{"responses":{"201":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"1\/second, 15\/minute"}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"description":"Place a call from the provided user\/device to a given destination. Destination can be sip address or any valid phone number. E164 format is recommended.","tags":["Calls"],"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/call"},"examples":{"To E164 Phone Number and Omitted From":{"$ref":"#\/components\/examples\/call"},"To E164 Phone Number and From Authenticated User":{"$ref":"#\/components\/examples\/call-2"},"From SIP User Address":{"$ref":"#\/components\/examples\/call-6"},"To SIP User Address and Omitted From":{"$ref":"#\/components\/examples\/call-5"},"From E164 Phone Number":{"$ref":"#\/components\/examples\/call-7"},"To E164 Phone Number and From Authenticated User Extension":{"$ref":"#\/components\/examples\/call-3"},"To Extension and From Authenticated User":{"$ref":"#\/components\/examples\/call-4"}}}}},"summary":"Place a Call"}},"\/subscriptions\/":{"post":{"responses":{"202":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"1\/second, 5\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/http-webhook-subscription"},"examples":{"example":{"$ref":"#\/components\/examples\/http-webhook-subscription"}}}},"description":"Accepted"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"tags":["Webhooks"],"callbacks":{"CallRinging":{"$ref":"#\/components\/callbacks\/call-ringing"},"CallAnswered":{"$ref":"#\/components\/callbacks\/call-answered"},"CallCompleted":{"$ref":"#\/components\/callbacks\/call-completed"},"CallWithAutoAttendant":{"$ref":"#\/components\/callbacks\/call-with-auto-attendant"}},"summary":"Creates a webhook subscription for the requested events.\nWhen an event occurs to which you are subscribed a POST request will be set to your post_uri with a JSON body indicating what occurred.","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/http-webhook-subscription-settings"},"examples":{"example":{"$ref":"#\/components\/examples\/http-webhook-subscription-settings"}}}}}}},"\/accounts\/current\/":{"get":{"responses":{"200":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"1\/second, 15\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/account"},"examples":{"Gen P":{"$ref":"#\/components\/examples\/account-2"},"Gen X and U":{"$ref":"#\/components\/examples\/account-3"},"Gen V":{"$ref":"#\/components\/examples\/account"}}}},"description":"Account object for the current user."},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"description":"Get the details about the account used by the current user.","tags":["Accounts"],"summary":"Get Current User's Account"}},"\/cdrs\/users\/current\/":{"get":{"responses":{"200":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"5\/second, 15\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/cdr-page"},"examples":{"Gen P":{"$ref":"#\/components\/examples\/cdrs-2"},"Gen X and Gen U":{"$ref":"#\/components\/examples\/cdrs-3"},"Gen V":{"$ref":"#\/components\/examples\/cdrs"}}}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"description":"Get list of all CDRs on the account for the current user","tags":["CDRs"],"summary":"Current user CDRs","parameters":[{"$ref":"#\/components\/parameters\/user"},{"$ref":"#\/components\/parameters\/start-date"},{"$ref":"#\/components\/parameters\/end-date"},{"$ref":"#\/components\/parameters\/limit"},{"$ref":"#\/components\/parameters\/cursor"},{"$ref":"#\/components\/parameters\/type"},{"$ref":"#\/components\/parameters\/page-size"},{"$ref":"#\/components\/parameters\/recording-available"},{"$ref":"#\/components\/parameters\/max-duration"},{"$ref":"#\/components\/parameters\/min-duration"},{"$ref":"#\/components\/parameters\/phone-number"}]}},"\/users\/{userId}\/":{"get":{"responses":{"200":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"1\/second, 15\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/user"},"examples":{"example":{"$ref":"#\/components\/examples\/user"}}}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"tags":["Users"],"summary":"Get the user details. If provided the id will be used to get a specific user. If not specified the authenticated user details will be returned. If you wish to retrieve all users across your domain use the \"all\" argument.","parameters":[{"$ref":"#\/components\/parameters\/user-id"}]}},"\/users\/":{"get":{"x-n2p-supportedGenerations":["gen_v"],"responses":{"200":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"1\/second, 15\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"items":{"$ref":"#\/components\/schemas\/user"},"type":"array"},"examples":{"example":{"$ref":"#\/components\/examples\/users"}}}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"description":"This operation returns a list with all users in the account for Gen V customers.  For Gen P, Gen U and Gen X customers, the list with a current user only is returned, for backwards compatibility. Consider switching the usage to the \"Get Current User\" endpoint instead if you have Gen P, Gen U or Gen X account.\n\nSupported in the following net2phone account generations: Gen V","tags":["Users"],"summary":"Get details list of all users of an account"}},"\/users\/current\/":{"get":{"tags":["Users"],"summary":"Get the user details for the authenticated user.","responses":{"200":{"headers":{"x-RateLimit-Limit":{"schema":{"type":"string"},"description":"1\/second, 15\/minute"}},"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/user"},"examples":{"example":{"$ref":"#\/components\/examples\/user"}}}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}}}},"\/available\/endpoint\/":{"get":{"responses":{"200":{"content":{"application\/vnd.integrate.v1.10.0+json":{"schema":{"$ref":"#\/components\/schemas\/endpoints"},"examples":{"example":{"$ref":"#\/components\/examples\/endpoints"}}}},"description":"Success"},"422":{"$ref":"#\/components\/responses\/invalid-version"},"500":{"$ref":"#\/components\/responses\/internal-server-error"},"403":{"$ref":"#\/components\/responses\/forbidden"},"401":{"$ref":"#\/components\/responses\/unauthorized"},"404":{"$ref":"#\/components\/responses\/not-found"},"429":{"$ref":"#\/components\/responses\/rate-limit-exceeded"}},"description":"Get list of available endpoints","tags":["Endpoints"],"summary":"Endpoints list"}}},"tags":[{"name":"Accounts","description":"Get details of the user's account"},{"name":"Calls","description":"Control your phone calls"},{"name":"Webhooks","description":"Subscribe and receive webhook updates for the events you are interested in. Provide a URI which can receive POST requests. When updates occur your endpoint will then be notified. (All notifications requests contain JSON.)"},{"name":"CDRs","description":"Get a list of the Call Detail Records (CDRs) for a specific member of your company or for the entire company. Filter your calls by Inbound, Outbound, Missed and get calls for a specific date range. If no CDRs are found for the query the response will be empty."},{"name":"Users","description":"Get a list of the Users for your company or details about a specific user."},{"name":"Endpoints","description":"List of available endpoints"}]}