Cancel a subscription
DELETE
/user/{userId}/subscription/{subscriptionId}
const url = 'https://client-api.abi.ai/user/abi1234/subscription/8910zyx321cba';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/subscription/8910zyx321cba \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
The Abi identifier of the user account.
Example
abi1234subscriptionId
required
string
The Abi identifier of the subscription.
Example
8910zyx321cbaResponses
Section titled “Responses”Subscription cancelled. Returns the cancelled subscription ID.
Media typeapplication/json
string
Example
8910zyx321cbaRequest 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"}