Working with Resource IDs

The Phone.com API uses resource IDs to identify individual resources in your account, such as a contact, a menu option or a media file. Resource IDs are UUIDs (Universally Unique Identifiers) that are 128 bits long and unique from other UUIDs. The ID is assigned by Phone.com when the item is created (POST), and you can use a resource’s ID to retrieve (GET), update (PUT) and remove (DELETE) it.

Resource ID Format

Imagine that your application has created a Phone.com menu resource using a POST to /menus with a valid JSON post body. The API would respond with the ID of the new resource as follows:


{
   "results" : {
      "id": <uuid>
   }
}

You can then use the ID returned to list details for the resource (GET), do a complete update of the resource (PUT) or delete it (DELETE). You can also use the new ID of your menu as part of another resource; for instance, you could create a route that references your new menu.

Important: Note that you cannot delete a resource if it is in use by another resource. For example, if you have used your new menu in a route, you cannot delete that menu until you remove the reference to it in the route. You can accomplish this by updating the route using the PUT method, or by removing the route all together using the DELETE method.

Learn More: