Skip to content

Deactivate a user account

DELETE
/user/{userId}/subscriptions
curl --request DELETE \
--url https://client-api.abi.ai/user/abi1234/subscriptions \
--header 'Authorization: Bearer <token>'
userId
required
string

The Abi identifier of the user account.

Example
abi1234

User deactivated and subscriptions cancelled.

Media typeapplication/json
Array<object>

A period of access to the configured Abi service for a user.

object
subscriptionId

The unique identifier for the subscription.

string
userId

The Abi user identifier associated with the subscription.

string
active

Whether the subscription is active.

integer
Allowed values: 0 1
startSubscription

The UTC date on which the subscription starts.

string
endSubscription

The UTC date on which the subscription expires.

string
createdAt

The date and time the subscription was created in Abi.

string
canceledAt

The date and time the subscription was cancelled

string
renewFrom

The previous expired subscription that caused this renewal

string
shouldNotify

Whether a subscription notification was requested.

boolean
productId

The Abi product identifier for this subscription

integer
productName

The Abi product name for this subscription

string
Example
[
{
"subscriptionId": "8910zyx321cba",
"userId": "abi1234",
"startSubscription": "2021-11-17T00:00:00.000Z",
"endSubscription": "2022-05-31T00:00:00.000Z",
"active": 0,
"createdAt": "2021-11-17T00:00:00.000Z",
"canceledAt": "2022-05-31T00:00:00.000Z",
"shouldNotify": true,
"productName": "Free trial",
"renewFrom": null
},
{
"subscriptionId": "123abc789xyz",
"userId": "abi1234",
"startSubscription": "2022-05-31T00:00:00.000Z",
"endSubscription": "2023-05-31T00:00:00.000Z",
"active": 0,
"createdAt": "2022-05-31T00:00:00.000Z",
"canceledAt": "2022-06-01T00:00:00.000Z",
"shouldNotify": false,
"productName": "Free trial",
"renewFrom": "8910zyx321cba"
}
]

Request could not be completed.

Media typeapplication/json
object
code

Short machine-readable error code.

string
message

Human-readable explanation of the error.

string
Examplegenerated
{
"code": "example",
"message": "example"
}