DELETE
Cancel a subscription
Cancels an existing subscription for the authenticated user.
Authorizations
Name | Type | Required | Description |
---|---|---|---|
bearerAuth | http | Yes | Bearer token for authentication. Include in the Authorization header as 'Bearer <token>'. The token can be obtained through your account dashboard. |
Request Body
Required: Yes
Description: An object containing the subscription ID to cancel.
Name | Type | Required | Description |
---|---|---|---|
subscriptionId string No The ID of the subscription to cancel. |
curl --request DELETE \
--url https://globalbyte.io/api/v1/user/subscriptions \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"subscriptionId":"123e4567-e89b-12d3-a456-426614174002"}'
Responses
Code: 200
Description: Subscription canceled successfully
Content Type: application/json
Name | Type | Required | Description |
---|---|---|---|
success boolean No Indicates the subscription was successfully canceled. | |||
subscriptionId string No The ID of the canceled subscription. |
Code: 400
Description: Bad request.
Content Type: application/json
Name | Type | Required | Description |
---|---|---|---|
message string No Human-readable message describing the bad request. |
Code: 401
Description: Unauthorized access.
Content Type: application/json
Name | Type | Required | Description |
---|---|---|---|
message string No Human-readable message describing the unauthorized error. |
Code: 500
Description: Error response.
Content Type: application/json
Name | Type | Required | Description |
---|---|---|---|
message string No Human-readable message describing the error. |
{
"success": true,
"subscriptionId": "123e4567-e89b-12d3-a456-426614174002"
}
{
"message": "Invalid input provided."
}
{
"message": "API token missing from headers."
}
{
"message": "Error message"
}