Reference Turnkey Applications Tutorials Visual Designer
Reference Turnkey Applications Tutorials Visual Designer
    • REST API
      • Overview
      • API Endpoint
      • Authentication
      • Requests
      • Responses
      • Paging
      • Reason Codes Dictionary
    • Management APIs
      • Accounts
      • Identity Access Management BETA
        • Identity Access Management Overview
        • Identity Access Management API
          • User Management
            • Create a User
            • Update a User
            • Retrieve a User
            • Delete a User
          • API Keys Management
            • Create an API Key
            • Update an API Key
            • Retrieve an API Key
            • Delete an API Key
      • Applications
      • Clients
        • Create a Client
        • Delete a Client
        • Change Client’s Password
        • Get a List of Available Clients
      • Incoming Phone Numbers
        • IncomingPhoneNumber Instance Resource
        • IncomingPhoneNumbers List Resource
        • Local IncomingPhoneNumber Factory Resource
        • Toll-Free IncomingPhoneNumber Factory Resource
        • Mobile IncomingPhoneNumber Factory Resource
        • Attach a phone number to an application
        • Enable Incoming MMS for an Application
        • Delete a phone number
        • List of Phone Numbers
        • Incoming Phone Number Regex Support
      • Notifications
      • Usage Records
      • Trace Records
    • Voice
      • Calls
        • Call List Resource URI
        • Making a Call
        • Modifying Live Calls
        • Examples
        • List Filter
        • Paging Information
      • Conference Management
        • Supported Operations
        • Conference List Resource URI
      • Conference Participants Management
        • Participants List Resource URI
      • Gather DTMF
      • Gather Speech
      • Say
      • Play
      • Hold
      • Recordings
      • Refers
        • Resource Properties
        • Supported Operations
        • Paging Information
      • Resume
      • SIP Refer Support
    • Messages API - BETA
      • Overview
      • Channel Identities
      • Send Message
      • Status Callback Parameters
      • Status Callback Events
      • Receive Message
        • Incoming Message Request Parameters
      • Get Message List
      • Get Single Message
      • Message Attributes
      • Status Description
    • SMS
      • Messages
        • Send SMS
        • Get SMS List
        • Get single SMS Information
        • SMS Attributes
      • Error Codes
    • Email
    • RCML
      • Overview
        • Interacting with Your Application
        • RCML Verbs
      • Dial
        • Client
        • Conference
        • Number
        • SIP
      • Email
      • Gather
      • Say
      • Play
      • SMS
      • Message - Beta
      • Hold
      • Resume
      • Hangup
      • Pause
      • Redirect
      • Record
      • Reject
      • Refer
    • Visual Designer API
      • List Application Templates
      • :List a Specific Application Template
      • Create a Visual Designer Application
      • Get Application Details
      • Save Application Changes
      • Create Application Parameters
      • List Application Parameters
      • Delete Application Parameters
      • Upload Application Media Files
      • List Application Media Files
      • Play Application Media Files
      • Delete Application Media Files
      • Get Application Logs
      • Delete Application Logs
      • Get Application Settings
      • Modify Application Settings
      • Rename an Application
      • Delete an Application
      • Get Visual Designer Configuration
    • Turnkey Apps APIs
      • Smart 2FA
        • Sending One-Time Passwords
        • Verifying One-Time Passwords
        • Cancel One-Time Passwords
        • Session Detail Record (SDR)
        • Get list of One-Time Passwords
        • Get a Single One-Time Password
        • Usage Record One-Time Passwords
        • Common Response Error Code
        • Limit
          • Create Limit
          • Update Limit
          • Delete Limit
          • Get List of Limits
      • Call Queuing
      • Auto Attendant
        • Users
        • Announcement
        • Auto Attendant System
        • Menu
        • Schedule
        • Phone Number
        • Usage Records
        • Third Party Integration
      • Number Masking
        • Application
        • Mask Number Pool
        • Context
        • Participants
        • Interactions
        • Usage Records
      • Task Router
docs 1.0
  • docs
    • 1.0
  • docs
  • Enterprise:Management APIs
  • Enterprise:Identity Access Management BETA
  • Enterprise:Identity Access Management API

Identity Access Management API

Overview

The Identity Access Management (IAM) API lets you:

  • Create and manage users under their CPaaS account, as well as define a permission set for each user.

  • Create up to two API keys and rotate them according to security best practices

User Management

You can create, update, retrieve and delete users.

User Resource URI

/2012-04-24/Accounts/{AccountSid}/Users

Resource Properties

Property Description

AccountSid

A string that uniquely identifies the account the user belongs to.

Name

The name of the user.

Email

The email address associated with the user.

PhoneNumber

Optional. The phone number associated with the user.

Role

The role assigned to the user.

Possible values for users created under your account include:
- BC/Administrator
- BC/Developer
- BC/Provisioning Agent
- BC/TurnkeyAdministrator
- BC/TurnkeyDeveloper

Sid

A string that uniquely identifies the user.

Status

The status of the user. Possible values are: unconfirmed, active, inactive. By default, users have unconfirmed status. Once they confirm their email address the status gets changed to active.

DateCreated

The date and time when the user was created.

DateUpdated

The date and time when the user was last updated.

Uri

The uri for this user, relative to https://yourdomain.com/api/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}.json.

Password

The password for this user. This field is only available after a create operation. Get and update operations won’t display this field.

User Roles and Permissions

The following table specifies the user permissions to the Platform and Turnkey Applications resources based on their role.

Capability Availability at that Account Hierarchy Level

Administrator

Developer

Turnkey Applications Administrator

Turnkey Applications Developer

Platform Resources

Account Settings

Yes

read only

read only

no access

no access

API Credentials

Yes

read/write

read/write

no access

no access

Audit API

No

no access

no access

no access

no access

Feature Access Control Management

No

no access

no access

no access

no access

User Management

Yes

read/write

no access

read/write

no access

Role Access

Yes

- Business Customer Administrator
- Business Customer Developer
- Business Customer Turnkey Applications Administrator
- Business Customer Turnkey Applications Developer

no access

- Business Customer Turnkey Applications Administrator
- Business Customer Turnkey Applications Developer

no access

Whitelabeling Settings

No

no access

no access

no access

no access

BYOC Settings

No

no access

no access

no access

no access

Manage Enterprise Accounts

No

no access

no access

no access

no access

Communications Partner Organization/Account Management

No

no access

no access

no access

no access

Turnkey Applications Enablement Management

No

no access

no access

no access

no access

Manage Applications

Yes

read/write

read/write

no access

no access

Manage Numbers

Yes

read/write

read/write

no access

no access

Manage SIP/WebRTC Clients

Yes

read/write

read/write

no access

no access

P. SMS

Yes

read/write

read/write

no access

no access

P. Voice

Yes

read/write

read/write

no access

no access

Call Logs

Yes

read only

read only

no access

no access

SMS Logs

Yes

read only

read only

no access

no access

SMS Logs Content

Yes

read only

read only

no access

no access

Recordings

Yes

read/write

read/write

no access

no access

Recordings Content

Yes

read only

read only

no access

no access

Usage

Yes

read only

read only

no access

no access

Notifications

Yes

read only

read only

no access

no access

OutgoingCallerIDs

No

no access

no access

no access

no access

Visual Designer

Yes

read/write

read/write

no access

no access

Turnkey Applications

Auto Attendant

AA-Provisioning (GET, POST, PUT, DELETE)
AA-Announcement (CSP_ADMIN or SUPER_ADMIN or BG_ADMIN or AA_ADMIN)
AA-Menu
AA-Schedule

read/write

no access

no access

read/write

read/write

AA-System(CSP_ADMIN or SUPER_ADMIN) AA-Phone Number AA-Single Sign On

read only

no access

no access

read only

read only

AA- Usage Records

read only

no access

no access

read only

read only

AA-Enterprise And User

read only

no access

no access

read only

read only

AA-Search and Usage record all endpoints all levels

no access

no access

no access

no access

no access

Number Masking

NM-Provisioning(GET, POST, PUT, DELETE)
NM-User (CSP_ADMIN or SUPER_ADMIN or ENTERPRISE_ADMIN)
NM-Application
NM-Context
NM-Interaction
NM-Masked Number
NM-Participant
NM-Phone Number

read/write

no access

no access

read/write

no access

NM-Usage records

read only

no access

no access

read only

no access

NM-Enterprise And User

read only

no access

no access

read only

no access

NM- Search and Usage record all endpoints all levels

no access

no access

no access

no access

no access

Task Router

TR-Provisioning (GET, POST, PUT, DELETE)
TR-Workspace
TR-WorkFlow
TR-TaskQueue
TR-Activity
TR-Worker
TR-Reservation
TR-Task

read/write

no access

no access

read/write

no access

TR-Usage Records

read only

no access

no access

read only

no access

TR-Enterprise And User

no access

no access

no access

no access

no access

TR- Search and Usage record all endpoints all levels

no access

no access

no access

no access

no access

Smart 2FA

2FA-Traffic
send/verify/cancel

read/write

no access

no access

read/write

no access

2FA-Limit Provision
2FA-WorkFlow provision

read/write

no access

no access

read/write

no access

2FA-Usage Records

read only

no access

no access

read only

no access

2FA-Search and Usage record all endpoints all levels

no access

no access

no access

no access

no access

Campaign Manager

Campaign Manager-Provisioning (GET, POST, PUT, DELETE)
Enterprise
Users
Enterprise Credit

no access

no access

no access

no access

no access

Campaigns (GET, POST, PUT, DELETE)

read/write

no access

no access

read/write

no access

Usage records

read only

no access

no access

read only

no access

Search and Usage Records
All endpoints all levels

no access

no access

no access

no access

no access

Create a User

HTTP POST Creates a new user under the specified CPaaS account.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users

Example Request

curl -X POST https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Users  \
   -d 'Name=Jane Doe' \
   -d 'Email=jane.doe@company.com' \
   -d 'Role=BC/Administrator' \
   -u 'YourAccountSid:YourAuthToken'
const request = require('request');

// Provide your Account Sid and Auth Token from your Console Account page
const ACCOUNT_SID = 'my_ACCOUNT_SID';
const AUTH_TOKEN = 'my_AUTH_TOKEN';

request.({
      method: 'POST',
      url: 'https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Users',
      auth: { 'user': ACCOUNT_SID, 'pass': AUTH_TOKEN },
      form: {
         'Name': 'Jane Doe',
         'Email': 'jane.doe@company.com',
         'Role': 'BC/Administrator'
      }
   },
   function (error, response, body) {
      // Add your business logic below; status can be found at 'response.statusCode' and response body at 'body'
      ...
});
from http.client import HTTPSConnection
from base64 import b64encode
from urllib.parse import urlencode

# Provide your Account Sid and Auth Token from your Console Account page
ACCOUNT_SID = 'my_ACCOUNT_SID'
AUTH_TOKEN = 'my_AUTH_TOKEN'

userAndPass = b64encode(bytes(ACCOUNT_SID + ':' + AUTH_TOKEN, 'utf-8')).decode("ascii")
headers = { 'Authorization' : 'Basic %s' %  userAndPass,
    'Content-type': 'application/x-www-form-urlencoded',
    'Accept': 'text/plain' }

# Update POST parameters accordingly
params = urlencode({
   'Name': 'Jane Doe',
   'Email': 'jane.doe@company.com',
   'Role': 'BC/Administrator'
})

conn = HTTPSConnection('mycompany.restcomm.com')
conn.request("POST", '/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Users',
      params, headers=headers)
res = conn.getresponse()

# Add your business logic below; status can be found at 'res.status', reason at 'res.reason' and response body can be retrieved with res.read()
...
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import java.io.*;
import java.util.Base64;

public class JavaSampleClass {
   // Provide your Account Sid and Auth Token from your Console Account page
   public static final String ACCOUNT_SID = "my_ACCOUNT_SID";
   public static final String AUTH_TOKEN = "my_AUTH_TOKEN";


   public static void main(String[] args) throws Exception {
      String userAndPass = ACCOUNT_SID + ':' + AUTH_TOKEN;
      String encoded = Base64.getEncoder().encodeToString(userAndPass.getBytes());

      URL url = new URL(("https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/" + ACCOUNT_SID + "/Users");
      HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
      conn.setRequestProperty("Authorization", "Basic " + encoded);
      conn.setRequestMethod("POST");
      conn.setDoOutput(true);
      DataOutputStream os = new DataOutputStream(conn.getOutputStream());

      // Update POST parameters accordingly
      os.writeBytes("Name=Jane Doe&" +
        "Email=jane.doe@company.com&" +
        "Role=BC/Administrator");
      os.close();

      // Add your business logic below; response code can be obtained from 'conn.getResponseCode()' and input stream from 'conn.getInputStream()'
      ...
  }
}

Example Response

{
"sid": "USaff6a6dec30047d58d0f08edf5f46f0f",
"name": "Jane Doe",
"email": "jane.doe@company.com",
"phone_number": null,
"role": "BC/Administrator",
"account_sid": "AC25b6ea2f04ca57c75e6e0e6aef9b69c9",
"status": "unconfirmed",
"date_created": "Tue, 8 Jun 2021 07:31:23 +0000",
"date_updated": "Tue, 8 Jun 2021 07:31:23 +0000",
"uri": "/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f.json"
}

Create a User

HTTP POST Creates a new user under the specified account.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users

Request Parameters

Property Description

Name

The name of the user.

Email

The email address associated with the user.

PhoneNumber

Optional. The phone number associated with the user.

Role

The role assigned to the user.

curl --location --request POST 'https://yourcompany.com/api/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f'  \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourAPIKeyValue:YourAPIKeySecret' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'Name=Jane Doe' \
--data-urlencode 'Email=jane.doe@company.com' \
--data-urlencode 'Role=CP/Administrator'

Example Response

{
"sid": "USaff6a6dec30047d58d0f08edf5f46f0f",
"name": "Jane Doe",
"email": "jane.doe@company.com",
"phone_number": null,
"role": "CP/Administrator",
"account_sid": "AC25b6ea2f04ca57c75e6e0e6aef9b69c9",
"status": "unconfirmed",
"date_created": "Tue, 8 Jun 2021 07:31:23 +0000",
"date_updated": "Tue, 8 Jun 2021 07:31:23 +0000",
"uri": "/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f.json"
}

Update a User

HTTP PUT Updates a user under the specified account.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}

Request Parameters

Property Description

Name

The name of the user.

Status

The status of the user.

PhoneNumber

The phone number associated with the user.

Role

The role assigned to the user.

Password

The password associated with the user.

Example Request

curl --location --request PUT 'https://yourcompany.com/api/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourAPIKeyValue:YourAPIKeySecret' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'PhoneNumber=+12223334444'

Example Response

{
"sid": "USaff6a6dec30047d58d0f08edf5f46f0f",
"name": "Jane Doe",
"email": "jane.doe@company.com",
"phone_number": "+12223334444",
"role": "CP/Administrator",
"account_sid": "AC25b6ea2f04ca57c75e6e0e6aef9b69c9",
"status": "unconfirmed",
"date_created": "Tue, 8 Jun 2021 07:31:23 +0000",
"date_updated": "Tue, 8 Jun 2021 07:31:23 +0000",
"uri": "/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f.json"
}

Retrieve a User List

HTTP GET Retrieves information about the list of Users belonging to an Account.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users

Example Request

curl --location --request GET 'https://yourcompany.com/api/2012-04-24/Accounts/AC9deec0905f5c5aa8f9e40ca03b54e071/Users' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourAPIKeyValue:YourAPIKeySecret'

Example Response

{
    "page": 0,
    "num_pages": 1,
    "page_size": 50,
    "total": 2,
    "start": "0",
    "end": "1",
    "uri": "/2012-04-24/Accounts/AC9deec0905f5c5aa8f9e40ca03b54e071/Users",
    "first_page_uri": "/2012-04-24/Accounts/AC9deec0905f5c5aa8f9e40ca03b54e071/Users?Page=0&PageSize=50",
    "previous_page_uri": "null",
    "next_page_uri": "null",
    "last_page_uri": "/2012-04-24/Accounts/AC9deec0905f5c5aa8f9e40ca03b54e071/Users?Page=0&PageSize=50",
    "users": [
        {
            "sid": "US58cc28c66d7633d2fc7dbb301999c722",
            "name": "Jane Doe",
            "email": "jane.doe@acme.com",
            "phone_number": "+127312837225",
            "role": "CP/Administrator",
            "account_sid": "AC9deec0905f5c5aa8f9e40ca03b54e071",
            "status": "active",
            "date_created": "Tue, 20 Jul 2021 08:14:35 +0000",
            "date_updated": "Tue, 20 Jul 2021 08:14:36 +0000",
            "uri": "/2012-04-24/Accounts/AC9deec0905f5c5aa8f9e40ca03b54e071/Users/US58cc28c66d7633d2fc7dbb301999c722.json"
        },
        {
            "sid": "UScaa05ee9fbbe4bcfbbaafd8686dc4606",
            "name": "John Doe",
            "email": "john.doe@acme.com",
            "phone_number": "+127312837226",
            "role": "CP/Developer",
            "account_sid": "AC9deec0905f5c5aa8f9e40ca03b54e071",
            "status": "active",
            "date_created": "Fri, 23 Jul 2021 14:25:34 +0000",
            "date_updated": "Fri, 23 Jul 2021 14:25:54 +0000",
            "uri": "/2012-04-24/Accounts/AC9deec0905f5c5aa8f9e40ca03b54e071/Users/UScaa05ee9fbbe4bcfbbaafd8686dc4606.json"
        }
    ]
}

Retrieve User Information

HTTP GET Retrieves information about a specific user.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}

Example Request

curl --location --request GET 'https://yourcompany.com/api/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USb0b76d2f398348cfa9b18022f81d26d3' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourAPIKeyValue:YourAPIKeySecret'

Example Response

{
    "sid": "USaff6a6dec30047d58d0f08edf5f46f0f",
    "name": "Jane Doe",
    "email": "jane.doe@company.com",
    "phone_number": "+12223334444",
    "role": "CP/Administrator",
    "account_sid": "AC25b6ea2f04ca57c75e6e0e6aef9b69c9",
    "status": "unconfirmed",
    "date_created": "Tue, 8 Jun 2021 07:31:23 +0000",
    "date_updated": "Tue, 8 Jun 2021 07:31:23 +0000",
    "uri": "/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f.json"
}

Delete a User

HTTP DELETE Deletes a user under the specified account.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}

Example Request

curl --location --request DELETE 'https://yourcompany.com/api/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/US7a3bb92e6a5543d9b2fab8e8e278ccce' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourAPIKeyValue:YourAPIKeySecret'

API Keys Management

You can create, update, retrieve, and delete API keys for a given user.Every user can have up to two API keys generated and rotate them according to their needs

API Keys Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}/APIKeys

Resource Properties

Property Description

UserSid

A string that uniquely identifies the user with whom the API key is associated.

Sid

The API Key unique identifier.

Value

The value of the API Key used as the username during authentication.For regular API Keys it matches the Sid, for migrated accounts it matches the Account Sid.

Status

The status of the API Key: Active and Inactive.Active means that the key is valid and can be used for making API calls, while Inactive means that it is invalid and cannot be used for making API calls.

DateCreated

The date representation of when the API key was created.

DateUpdated

The date representation of when the API key was last updated.

Uri

The uri for this API key, relative to https://yourdomain.com/api/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}/APIKeys/{ApiKeySid}.json.

Secret

The API Key secret used to sign requests.This field is only available after a create operation.Get and update operations won’t display this field.

Create an API Key

HTTP POST Creates API key for a specific user.

Accounts and Users that have been migrated from the legacy to the new Identity Access Management functionality do not have to perform this step.Their API keys are automatically generated during the migration process.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}/APIKeys

Example Request

curl --location --request POST 'https://yourcompany.com/api/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f/APIKeys' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourUsername:YourPassword'
The first API Key creation requires basic authorization utilizing the user’s email address and password

Example Response

{
"sid": "AK2f8f4d0d36324c1a84a58bffdd4897ef",
"value": "AK2f8f4d0d36324c1a84a58bffdd4897ef",
"user_sid": "USaff6a6dec30047d58d0f08edf5f46f0f",
"status": "active",
"date_created": "Fri, 11 Jun 2021 09:37:19 +0000",
"date_updated": "Fri, 11 Jun 2021 09:37:19 +0000",
"uri": "/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f/APIKeys/AK2f8f4d0d36324c1a84a58bffdd4897ef.json",
"secret": "ZTfQoDcvaJsp9i50zHG43FZd37NRIJ8l"
}

Update an API Key

HTTP PUT Updates the status of an existing API key for a specific user.The status of the key can either be active or inactive.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}/APIKeys/{APIKeySid}

Example Request

curl --location --request PUT 'https://yourcompany.com/api/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f/APIKeys/AK2f8f4d0d36324c1a84a58bffdd4897ef' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourUsername:YourPassword' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'Status=inactive'
This request requires basic authorization utilizing the user’s email address and password.

Example Response

{
    "sid": "AK2f8f4d0d36324c1a84a58bffdd4897ef",
    "value": "AK2f8f4d0d36324c1a84a58bffdd4897ef",
    "user_sid": "USaff6a6dec30047d58d0f08edf5f46f0f",
    "status": "inactive",
    "date_created": "Fri, 11 Jun 2021 09:37:19 +0000",
    "date_updated": "Fri, 11 Jun 2021 11:14:50 +0000",
    "uri": "/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f/APIKeys/AK2f8f4d0d36324c1a84a58bffdd4897ef.json"
}

Retrieve a list of API Keys

HTTP GET Retrieves a list of API Keys for a specific user.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}/APIKeys

Example Request

curl --location --request GET 'https://yourcompany.com/api/2012-04-24/Accounts/ACbf4e39a26964a12972da1d31c3b07f7a/Users/USbd2e168c5cca4ea6857bba36e187ff09/APIKeys' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourUsername:YourPassword'
This request requires basic authorization utilizing the user’s email address and password.

Example Response

{
    "api_keys": [
        {
            "sid": "AK5bed0521de024bf588e010d79aca33dc",
            "value": "AK5bed0521de024bf588e010d79aca33dc",
            "user_sid": "USbd2e168c5cca4ea6857bba36e187ff09",
            "status": "active",
            "date_created": "Wed, 26 May 2021 13:06:44 +0000",
            "date_updated": "Fri, 23 Jul 2021 08:39:09 +0000",
            "uri": "/2012-04-24/Accounts/ACbf4e39a26964a12972da1d31c3b07f7a/Users/USbd2e168c5cca4ea6857bba36e187ff09/APIKeys/AK5bed0521de024bf588e010d79aca33dc.json"
        },
        {
            "sid": "AKb3f6257341b54f60a741162f177d1aa4",
            "value": "AKb3f6257341b54f60a741162f177d1aa4",
            "user_sid": "US90ec08939663ff0e97a310643c62db18",
            "status": "inactive",
            "date_created": "Wed, 26 May 2021 13:06:44 +0000",
            "date_updated": "Fri, 23 Jul 2021 08:39:09 +0000",
            "uri": "/2012-04-24/Accounts/ACbf4e39a26964a12972da1d31c3b07f7a/Users/USbd2e168c5cca4ea6857bba36e187ff09/APIKeys/AKb3f6257341b54f60a741162f177d1aa4.json"
        }
    ]
}

Retrieve an API Key

HTTP GET Retrieves an existing API key for a specific user.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}/APIKeys/{APIKeySid}

Example Request

curl --location --request GET 'https://yourcompany.com/api/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f/APIKeys/AK2f8f4d0d36324c1a84a58bffdd4897ef' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourUsername:YourPassword'
This request requires basic authorization utilizing the user’s email address and password.

Example Response

{
    "sid": "AK2f8f4d0d36324c1a84a58bffdd4897ef",
    "value": "AK2f8f4d0d36324c1a84a58bffdd4897ef",
    "user_sid": "USaff6a6dec30047d58d0f08edf5f46f0f",
    "status": "inactive",
    "date_created": "Fri, 11 Jun 2021 09:37:19 +0000",
    "date_updated": "Fri, 11 Jun 2021 11:14:50 +0000",
    "uri": "/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f/APIKeys/AK2f8f4d0d36324c1a84a58bffdd4897ef.json"
}

Delete an API Key

HTTP DELETE Deletes an API key for a given user.

Resource URI

/2012-04-24/Accounts/{AccountSid}/Users/{UserSid}/APIKeys/{ApiKeySid}

Example Request

curl --location --request DELETE 'https://yourcompany.com/api/2012-04-24/Accounts/AC25b6ea2f04ca57c75e6e0e6aef9b69c9/Users/USaff6a6dec30047d58d0f08edf5f46f0f/APIKeys/AK763360e88c0048a594f6bde046804698' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YourUsername:YourPassword'
Platform

Programmable Voice

Programmable SMS

Turnkey Applications

Smart 2FA

Call Queue

Auto Attendant

Number Masking

Task Router

Campaign Manager

Learn

Terms And Conditions

About

ABOUT

CONTACT US

© 2020, All rights reserved.