Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The PATCH /{userId}/presence endpoint sets the presence of the user matching the user ID provided to the specified presence.

In this page


Most URLs in the example code use the following values:

Headers

Header parameters in Requests (Agents API) apply to this endpoint.

Authorization scopes supported:

ScopeAccess granted
users:writeEntire endpoint

Request parameters

Path parameters

The endpoint accepts the following path parameter:

userId

Type

Required

Example

StringTruedaab05ec-ba50-45af-a6fd-3b01cdc6f39b

A user identifier. The user ID is unique within the account.

A user's ID can be obtained via the Users API endpoints.

Request body parameters

The endpoint accepts request body parameters:

presenceId

Type

Required

Example

ObjectTrue
{
"presenceId": "eaed6862-14fa-4114-be62-b8709b5d4a49"
}

 A presence definition identifier. The presence definition ID is unique within the account.

Requests

Set User daab05ec-ba50-45af-a6fd-3b01cdc6f39b presence to eaed6862-14fa-4114-be62-b8709b5d4a49

curl -L -X PATCH "https://***.api.newvoicemedia.com/agents/daab05ec-ba50-45af-a6fd-3b01cdc6f39b/presence" 
-H "Authorization: Bearer <ACCESS_TOKEN>" -H "Accept: application/vnd.newvoicemedia.v1+json" 
-H "Content-Type: application/json" 
--data-raw "{
    \"presenceId\": \"eaed6862-14fa-4114-be62-b8709b5d4a49\"
}"

Body:

{
    "presenceId": "eaed6862-14fa-4114-be62-b8709b5d4a49"
}

Responses

Responses to the endpoint return the updated presence for the specified user.

Successful response

For information about successful responses, see Success response code and parameters in Responses (Agents API).

Example response

Updated presence returned.

{
  "userId": "daab05ec-ba50-45af-a6fd-3b01cdc6f39b",
  "updated": "2021-10-22T13:16:26.730Z",
  "presence": {
    "presenceId": "eaed6862-14fa-4114-be62-b8709b5d4a49",
    "selectable": true,
    "category": {
      "categoryType": "LoggedOut",
      "description": "Logged Out"
    },
    "description": "Logged Out"
  }
}

where:

  • userId. A user identifier. The user ID is unique within the account.
  • updated. Date and time (UTC) of the last change of user's presence.
  • presence. The presence definition.
    • presenceId. A presence definition identifier. The presence definition ID is unique within the account.
    • selectableIndicates if this presence has been configured to appear for Agents to select.
    • category. Category of the presence definition.
      • categoryType. Type of presence definition category. Allowed values: LoggedOut, Away, ExtendedAway, Ready
      • description. Description of the presence category. Used for display purposes only.
    • description. Description of the presence definition. Used for display purposes only.


Try it out

  

For information, see Trying out Vonage Contact Center APIs.

  • No labels