CG Scanning API V2
5.2.0
  • latest
  • 5.2.0
HomeDocs
HomeDocs
5.2.0
  • latest
  • 5.2.0
  1. Organization Subscriptions
  • Common Error Responses
  • Authentication
  • Filtering Data
  • Getting Started
  • Authentication
    • User Confirmation
      • Confirm a User
      • Show confirmation form
    • User Invitation
      • Accept an invitation
      • Pre-Accept invitation check
    • Password Reset
      • Forgot Password
      • Reset Password
    • Impersonation
      • Impersonate user
      • Impersonate user
    • MFA
      • Check 2fa
      • Send SMS OTP
    • Sign in authentication
      POST
    • Sign in with recovery code
      POST
    • Sign out authentication
      DELETE
  • Advanced Reports
    • List Advanced Reports
    • Create an advanced report
    • Show an advanced report
    • Update an advanced report
    • Delete an advanced report
    • Delete advanced reports
    • Generates an advanced report file
    • Downloads an advanced report file
  • Audit
    • Get all events
    • Get event by id
  • Notifications
    • List Notifications
    • Show a notification
    • Delete a notification
    • Mark as read a notification
    • Mark as seen a notification
    • Mark as read all notifications
    • Mark as seen all notifications
  • Exceptions
    • List Exceptions
    • Create Exception
    • Update Exception
    • Show an exception
    • Delete an exception
    • Show exception details
    • Delete exceptions
    • Activate exceptions
    • Reset exceptions
    • Show the exceptions statistics
  • Hosts
    • List of hosts
    • Host details
    • List of most vulnerable hosts
  • Organizations
    • Organization Subscriptions
      • Retrieves all subscriptions of organization
        GET
      • Retrieves all active subscriptions of organization
        GET
      • Show a subscription of organization
        GET
      • 'Update organization's subscription'
        PUT
      • Assign features to a subscription
        PUT
      • Revoke features from a subscription
        PUT
    • Subscribe to a plan
      POST
    • List organizations
      GET
    • Create Organization
      POST
    • List dependent subscriptions
      GET
    • Retrieve an organization
      GET
    • Update an organization
      PUT
    • Delete an organization
      DELETE
    • Subscribe an organization to a plan
      POST
    • Unsubscribe an organization from a plan
      POST
    • Change users Organization
      PUT
    • Export organizations
      GET
  • Whitelabel Settings
    • Show the white label settings
    • Show the white label settings
    • Update white label settings
  • Port Lists
    • List port lists
    • Create a port list
    • Show a port list
    • Update a port list
    • Delete a port list
    • List activated port lists
    • Add a port range to a port list
    • Delete a port range to a port list
    • Activate a port list
    • Deactivate a port list
    • Updates the app_type of a port list
    • Sync the a port lists
  • Reports
    • List Reports
    • Show a report
    • Delete a report
    • Delete reports
    • Generates a report file
    • Downloads a report file
    • Check if a report file exists
  • Scanners
    • List scanners
    • Create scanner
    • Show scanner
    • Update scanner
    • Delete scanner
    • List activated scanners
    • Activate scanner
    • Deactivate scanner
    • Update scanner app type
    • Assign a scanner to an organization
    • Verify a scanner
  • Scans
    • Scan Histories
      • List of history for a scan
      • History details for a scan
    • Scan Hosts
      • List of hosts for a scan
      • Host details for a scan
    • Scan Vulnerabilities
      • List of vulnerabilities for a scan
      • Show vulnerability details
      • Statistics for a scan
    • List scans
    • Create Scan
    • Show a scan
    • Updates a scan
    • Delete a scan
    • Delete scans
    • Start a scan
    • Stop a scan
    • List upcoming scans
    • List recent scans that have been completed
    • List of the running scans
    • Create Scan from Wizard
  • Schedules
    • List Schedules
    • Create Schedule
    • Updates a schedule
    • Show a schedule
    • Delete a schedule
    • Delete schedules
    • Calculate First Time Schedule Date
    • Calculate Next Schedule Dates
  • Targets
    • List targets
    • Create Target
    • Show a target
    • Updates a target
    • Delete a target
    • Delete targets
  • User
    • User 2FA
      • Enable 2FA
      • Verify 2FA installation
      • Disable 2FA
      • Lookup phone number
      • Default 2FA method
      • Generate Recovery Codes
      • Get Recovery Codes
    • User Preferences
      • Get users notification preferences
      • Change users product
      • Enable user's event notification preference
      • Disable user's event notification preference
    • Get current user
    • Update current user
    • Change current user password
    • Get current user active plans (Not implemented yet)
    • Get organization members
    • Get current user products
    • Get current organization
    • Update current organization
    • Get subscriptions history
    • Change users product
    • Checks if authorization token is valid
    • Get current user permissions
    • Check if the user can be deleted
    • Delete my account
    • Generates a new access token
    • Revokes the current access token
    • (Admin) Transfers all the resources from the user to another user
  • Users
    • List Users
    • Create User
    • Show User
    • Update User
    • Delete a User
    • Create Customer
    • Invite User
    • Resend Confirmation Instructions
    • Import Users
    • Check if a user can be deleted
    • Inherit all the resources from a user
    • Export all users to a CSV file
    • Set partner
    • Unset partner
  • Vulnerabilities
    • List of vulnerabilities
    • Vulnerability details
    • Total Vulnerabilities (widget)
    • Top Vulnerabilities (widget)
    • PCI Compliant (widget)
    • (AI) Send prompt about a given Vulnerability
    • (AI) Chat history about a given Vulnerability
  • Webhooks
    • Deliveries
      • List all deliveries for a webhook
      • Get a delivery for a webhook
    • List all webhooks
    • Create a webhook
    • Show a webhook
    • Update a webhook
    • Delete a webhook
    • Activate a webhook
    • Deactivate a webhook
  1. Organization Subscriptions

'Update organization's subscription'

PUT
/v2/organizations/{org_id}/subscriptions/{sub_id}
Organizations/Organization Subscriptions
Last modified:2025-04-24 10:59:46
Update a subscription of an organizations

Request

Path Params
org_id
string 
required
Organization ID
sub_id
string 
required
Subscription ID
Query Params
attributes
array[string]
optional
Include details
Body Params application/json
subscription
object 
optional
status
enum<string> 
optional
Subscription status
Allowed values:
activeinactivecanceled
Example:
active
end_date
string  | null 
optional
Subscription end date
Example:
2023-12-15T19:19:18.037Z
price
integer 
optional
Subscription price
Example:
14.33
trial_enabled
boolean 
optional
Trial enabled
Example:
true
trial_duration_days
integer 
optional
Trial duration days
Example:
14
auto_renewal
boolean 
optional
Auto-renew subscription
Example:
true
cancellation_reason
string  | null 
optional
Cancellation reason
Example:
No reason
billing_interval
enum<string> 
optional
Subscription interval
Allowed values:
nonemonthlyyearly
Example:
yearly
features
object 
optional
Example
{
    "subscription": {
        "status": "active",
        "end_date": "2023-12-15T19:19:18.037Z",
        "price": 14.33,
        "trial_enabled": true,
        "trial_duration_days": 14,
        "auto_renewal": true,
        "cancellation_reason": "No reason",
        "billing_interval": "none",
        "features": {
            "number_of_ips": {
                "limit": 10
            },
            "rescan": {
                "active": true,
                "unlimited": false,
                "num_of_rescans": 10,
                "unit": "day",
                "when_run": "always"
            },
            "ai_remediator": {
                "active": true
            },
            "internal_vrms": {
                "active": true,
                "unlimited": false,
                "limit": 10
            },
            "internal_penetration": {
                "active": true,
                "unlimited": false,
                "limit": 10
            }
        }
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT '/v2/organizations//subscriptions/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "subscription": {
        "status": "active",
        "end_date": "2023-12-15T19:19:18.037Z",
        "price": 14.33,
        "trial_enabled": true,
        "trial_duration_days": 14,
        "auto_renewal": true,
        "cancellation_reason": "No reason",
        "billing_interval": "none",
        "features": {
            "number_of_ips": {
                "limit": 10
            },
            "rescan": {
                "active": true,
                "unlimited": false,
                "num_of_rescans": 10,
                "unit": "day",
                "when_run": "always"
            },
            "ai_remediator": {
                "active": true
            },
            "internal_vrms": {
                "active": true,
                "unlimited": false,
                "limit": 10
            },
            "internal_penetration": {
                "active": true,
                "unlimited": false,
                "limit": 10
            }
        }
    }
}'

Responses

🟢200OK
Updated successfully
This response does not have a body.
🟠401Unauthorized
🟠404Record Not Found
Modified at 2025-04-24 10:59:46
Previous
Show a subscription of organization
Next
Assign features to a subscription
Built with