User Dids

Table of Contents

Overview

The user/dids controller is where you'll go to manage your purchased phone numbers. A lot you can do here, from assign call flows to removing them from your account. You'll probably be spending a lot of time here

Controller: /user/dids Full Url: https://apiv1.teleapi.net/user/dids/

Functions

/get

Full Url: https://apiv1.teleapi.net/user/dids/get

Arguments:

Info: Get info related to a single DID number.

/list

Full Url: https://apiv1.teleapi.net/user/dids/list

Arguments:

Info: Get a list of the phone numbers that you own. This includes those that are owned by your resellers and customers

Example Success
{
    "code": 200,
    "status": "success",
    "data": [
        {
            "id": 42,
            "user_id": 22,
            "user_name": "bobby",
            "user_type": "reseller",
            "country_code": 1,
            "npa": 555,
            "nxx": 555,
            "xxxx": 5555,
            "number": 5555555555,
            "ratecenter": "BLARG",
            "state": "CO",
            "number_type": "fax",
            "call_flow_id": null,
            "channel_group_id": null,
            "voicemail_inbox_id": null,
            "sms_enabled": 0
        },
        {
            "id": 66,
            "user_id": 21,
            "user_name": "robert",
            "user_type": "master",
            "country_code": 1,
            "npa": 555,
            "nxx": 555,
            "xxxx": 5554,
            "number": 5555555555,
            "ratecenter": "BLARG",
            "state": "CO",
            "number_type": "local",
            "call_flow_id": 234,
            "channel_group_id": null,
            "voicemail_inbox_id": 654,
            "sms_enabled": 1
        }
    ]
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Missing variable: token"
}

/remove

Full Url: https://apiv1.teleapi.net/user/dids/remove

Arguments:

Info: Remove a phone number from your account

Example Success
{
    "code": 200,
    "status": "success",
    "data": "successfully removed phone number"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid id"
}

/assign

Full Url: https://apiv1.teleapi.net/user/dids/assign

Arguments:

Info: Assign a phone number to a particular reseller or customer. Use your own user id to assign it to yourself.

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully reassigned did"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid new user id"
}

/flow

Full Url: https://apiv1.teleapi.net/user/dids/flow

Arguments:

Info: Assign a call flow to a phone number. Pass flow_id of "none" to remove from all call flows

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully set call flow"
}
Example Error
{
    "code": 200,
    "status": "error",
    "data": "Invalid call flow id"
}

/channelgroup

Full Url: https://apiv1.teleapi.net/user/dids/channelgroup

Arguments:

Info: Assign a phone number to a channel group. Pass channel_group_id of "none" to remove did from all channel groups

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully set channel group"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid channel group id"
}

/voicemail

Full Url: https://apiv1.teleapi.net/user/dids/voicemail

Arguments:

Info: Assign a voicemail inbox to a phone number. Pass voicemail_inbox_id of "none" to remove inbox from did

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully set voicemail inbox"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid inbox id"
}

/convert/fax

Full Url: https://apiv1.teleapi.net/user/dids/convert/fax

Arguments:

Info: Convert a did from a voice number to a fax number. Note, this will remove any associated call flows, channel groups and voicemail inboxes from the did

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully converted did to fax number"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid did id"
}

/convert/voice

Full Url: https://apiv1.teleapi.net/user/dids/convert/voice

Arguments:

Info: Convert a did from a fax number to a voice number. Note, this does not assign a call flow, channel group or voicemail inbox. You will have to do that after the conversion

Example Success
{
    "code": 200,
    "status": "success",
    "data": "Successfully converted did to a voice number"
}
Example Error
{
    "code": 400,
    "status": "error",
    "data": "Invalid did id"
}

/cnam/enable

Full Url: https://apiv1.teleapi.net/user/dids/cnam/enable

Arguments:

Info: This will enable inbound CNAM lookups for a number.

/cnam/disable

Full Url: https://apiv1.teleapi.net/user/dids/cnam/disable

Arguments:

Info: This will disable inbound CNAM lookups for a number.

/user/dids/note

Full Url: https://apiv1.teleapi.net/user/dids/note

Arguments:

Info: Do not pass the note parameter in order to remove a note

/lidb/get

Full Url: https://apiv1.teleapi.net/user/dids/lidb/get

Arguments:

Info: Retrieve the value submitted for CNAM/LIDB on a number. Returns an empty string if it is not set.

/lidb/set

Full Url: https://apiv1.teleapi.net/user/dids/lidb/set

Arguments:

Info: Submits a CNAM/LIDB entry for processing on a number. Note that any charges for CNAM/LIDB services will be charged to your account immediately upon submission.

/smsurl/set

Full Url: https://apiv1.teleapi.net/user/dids/smsurl/set

Arguments:

Info: Set an SMS URL specific to a phone number. This will override the account-wide SMS URL, messages will be delivered to this URL instead of the account-wide URL

/smsurl/remove

Full Url: https://apiv1.teleapi.net/user/dids/smsurl/remove

Arguments:

Info: Remove the phone number specific SMS URL. Once done, SMS delivery will revert to the account-wide SMS URL.