Deactivate a user account
const url = 'https://client-api.abi.ai/user/abi1234/subscriptions';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://client-api.abi.ai/user/abi1234/subscriptions \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The Abi identifier of the user account.
Example
abi1234Responses
Section titled “Responses”User deactivated and subscriptions cancelled.
A period of access to the configured Abi service for a user.
object
The unique identifier for the subscription.
The Abi user identifier associated with the subscription.
Whether the subscription is active.
The UTC date on which the subscription starts.
The UTC date on which the subscription expires.
The date and time the subscription was created in Abi.
The date and time the subscription was cancelled
The previous expired subscription that caused this renewal
Whether a subscription notification was requested.
The Abi product identifier for this subscription
The Abi product name for this subscription
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.
object
Short machine-readable error code.
Human-readable explanation of the error.
Examplegenerated
{ "code": "example", "message": "example"}