Description

You have to call this method when you want to deregister (delete) a user in DruID Identity (CIAM).

The unsubscription of the user is not done immediately, but it is queued in a daily nightly unsubscription process, so the user has the possibility to cancel the unsubscription as long as the process has not been executed.

If you successfully log in an user in DRUID, you will receive an access_token (that you could use to call other resources that need an user session); you also get all information of the logged user.

Please, read first: https://dru-id.com/developers/apis/oauth-2/ to learn about Oauth2 protocol and the meaning of each token.

Endpoint URL:

POST https://{{graph_host}}/activityid/v1/user/unsubscribe

Request parameters

ParameterDescriptionTypeRequired
Authorization“Bearer access_token” Literal text Bearer followed by access_token that is the user access token obtained from /oauth2/token endpointstringyes
Content-TypeThe type of content that will be used for requests to be JSONstringyes
AcceptThe type of content that will be used for responses to be JSONstringyes
FromName of the entrypointstringyes
Accept-LanguageLanguage for this requestLocaleno

Query string parameters

ParameterDescriptionTypeRequiredDefault value

Request example

ParameterDescriptionTypeRequiredValue
actor.idObject ID of user who request actionstringyesobject_id
actor.objectTypeType of the object which represents the actor.stringyes‘user’
verbVerb used for actionstringyes‘delete’
object.objectTypeObjectType represents the userstringyes‘user’
context.reasonReason writer by user for unsubscriptionstringyes
source.idType of device doing the activitystringyes‘unknown’ | ‘pc’ | ‘mobile’ | ‘tablet’ | ‘game_console’ | ‘itv’
source.objectTypeType of sourcestringyes‘device’

Response examples

Response: Request success (Accepted)

NameTypeDescription
contentstructCustom structure containing the result of the operation.
content.reasonstringReason for unsubscribing the user.
content.appstringApp Id
content.entrypointstringEntrypoint Id
content.requestedOndateTimestamp representing the moment when the request took place.
resultstructCommon http result
result.statusintegerHttp code

Response codes

CodeTypeDescription
400ErrorBad Request: The request could not be understood by the server due to malformed syntax
401ErrorUnauthorized: authentication is required and has failed or has not yet been provided (token is invalid, etc)
409ErrorUnsubcription already requested
428ErrorPrecondition required: User need to configure MFA or needs to send a MFA code. Check the MFA API
500ErrorInternal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request
504ErrorGateway TimeoutService can not contact with oauth server to do some internal operations
202SuccessAccepted: Unsubscription requested succesfully.