Detected country: US
logo
API Docs

Getting Started

  • How to get started with Cobalt

Assets

  • Assets are what we pentest
  • Asset Types
  • Create an Asset
  • Risk Advisories

Pentests

  • Pentests
  • Create a Pentest
    • Overview
    • Asset Details
    • Pentest Details
    • Scope & Test Period
    • Preparation
  • Create an Autonomous Pentest
    • Launch a Saved Autonomous Pentest
    • Review a Closed Autonomous Pentest Report
  • Pentest Process
  • Pentest States
  • Coverage Checklist
  • Pentest Expectations
  • In House Pentests
    • Complete an In-House Pentest (For Pentesters)
    • Set Up an In-House Pentest
  • Findings
    • Remediate Findings
    • Finding States
    • Severity Levels
  • Reports
    • Contents of a Pentest Report
    • Customize Your Report
    • Co-branded Reports
  • Preparation

Engagements

  • Engagements Overview
  • Digital Risk Assessment
  • Secure Code Review

Findings

  • Findings

Insights

  • Insights

Planning

  • Planning

Methodologies

  • Cobalt Methodologies Overview
  • Web Methodologies
  • Autonomous Web Methodologies
  • API Methodologies
  • External Network Methodologies
  • Internal Network Methodologies
  • Mobile Methodologies
  • Cloud Configuration Review Methodologies
  • Cloud Pentest Methodology
  • Desktop Methodologies
  • AI/LLM Methodologies
  • Digital Risk Assessment Methodology
  • Secure Code Review Methodologies

Attack Surface

  • Attack Surface Monitoring (ASM)

DAST Scanner

  • DAST Scanner Overview
  • Best Practices
  • FAQ
  • Integrations
  • Partial Scans: Reduced Scope
  • Scans
  • Sequence recorder
  • Targets
  • Target Authentication
  • Extra Hosts
  • Blackout Period

User Account

  • Account Overview
  • Account Settings
  • Password Best Practices
  • Sign In to Cobalt
  • Troubleshoot Sign-in Issues

Collaboration

  • Collaboration Overview
  • Collaborate on Pentests
  • Groups
  • Manage Pentest Collaborators
  • User Roles and Permissions
  • Manage Notifications

Organization

  • Organization Overview
  • Manage Users
  • Your Cobalt Contract
  • Configure Organization Settings
    • Configure SAML SSO
    • SAML Migration: Update Your Configuration
    • SCIM Provisioning Setup Guide

Credits

  • Cobalt PtaaS Tiers
  • Cobalt Credits
  • Track Your Credits

Integrations

  • Cobalt Integrations Overview
  • Integration Builder
    • Connect your applications
    • How to Guides
      • Create Azure DevOps Work Item for Findings
      • Create GitHub tickets for Findings
      • Create GitLab tickets for Findings
      • Send email notifications for Findings from Outlook
      • Send MS Teams notifications for Findings
      • Create Jira tickets for Findings
      • HTTP Connector
      • Import Assets from Google Sheets
      • Map Cobalt Pentest Finding Severity to Jira Issue Priority
      • Modify Jira Issue Summary to contain Pentest Title
    • Troubleshooting
  • Integrate Jira with Cobalt
    • Jira Cloud Integration
    • Jira Data Center Integration
    • Push Cobalt Findings to Jira
    • Synchronize Cobalt Severity Levels with Jira
    • Switching to a New Jira Instance
    • Troubleshoot Your Jira Integration
  • Slack
  • Microsoft Teams
  • Webhooks
  • DefectDojo
  • Kenna Security
  • Vanta
  • Carried Over Findings
  • Create Test Finding
  • Wiz

Cobalt API

  • Cobalt API Overview
  • Create a Personal Cobalt API Token
  • Get an Organization Token
  • Revoke Your Personal Cobalt API Tokens
  • Create or Modify an Asset
  • Import Findings to Google Sheets

Glossary

  • Glossary

What's New

  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • November 2025 
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • January 2024
  • Product Updates
  • August 2026
‌
‌
‌
logo

Powered by

Assistant

Ask new question

Powered by
  • Home
  • Cobalt API
  • Create or Modify an Asset

Create or Modify an Asset

3min read

Share

Run this sequence of REST calls to create an asset.

:::info Use this document with our Cobalt API documentation to define your assets on the Cobalt platform.

:::

To use our API, you need a Cobalt account with membership in your organization. Your organization owner can create an account and assign you as a member. Your organization owner is typically the user who interacts with the Cobalt Customer Success Manager (CSM).

You can create an asset in the UI. If you prefer to automate the process and/or work from the command line, you can also use our API.

To create or modify an asset with our API, follow the sequence of commands shown on this page.

What You Need

  • Personal API token: YOUR-PERSONAL-API-TOKEN
  • Organization token: YOUR-V2-ORGANIZATION-TOKEN

Create an Asset

You can create an asset with the following REST call:

curl -X POST "https://api.cobalt.io/assets" \
  -H 'Accept: application/vnd.cobalt.v2+json' \
  -H 'Authorization: Bearer YOUR-PERSONAL-API-TOKEN' \
  -H 'Content-Type: application/vnd.cobalt.v2+json' \
  -H 'Idempotency-Key: A-UNIQUE-IDENTIFIER-TO-PREVENT-UNINTENTIONAL-DUPLICATION' \
  -H 'X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN' \
  --data '{
            "title": "Test Asset",
            "description": "How to describe the asset to our pentesters",
            "asset_type": "web"
          }' \
  -v

For more information on each parameter, see our API reference documentation on how to Create an Asset.

The command we use includes a -v, which sets up output in verbose mode. The command works without it. However, you would see no response from this REST call.

When you review the output of the REST call with the -v, look for the line with HTTP/2. If the command is successful, you’ll see

MessageMeaning
HTTP/2 201Asset created

For a list of error codes, see the Errors section of our API reference.

Next Steps

Once you create an asset, you can:

  • Continue with our API. You can Find Your Asset ID and then Add or Modify Asset Details.
  • Sign in to our UI and modify details of your newly created asset.

Find Your Asset ID

To add or modify information related to your asset, you’ll need the asset ID. You can find this ID with the REST call to Get All Assets:

curl -X GET "https://api.cobalt.io/assets" \
  -H "Accept: application/vnd.cobalt.v2+json" \
  -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
  -H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN" \
  | jq .

If you’ve set up more than one asset, you may need to search through the output. You can also limit the number of assets in the output with the limit parameter. For more information about each asset response field, see our API reference to Get All Assets.

:::info Tip

You can use jq to filter assets by their titleand id. To do so, end the REST call with| jq -r ".data[] | .resource | .title, .id"

:::

Review sample output.

{
  "data": {
    "resource": {
      "id": "YOUR-ASSET-IDENTIFIER",
      "title": "Test Asset",
      "description": "How to describe the asset to our pentesters",
      "asset_type": "web",
      "logo": null,
      "attachments": []
    },
    "links": {
      "ui": {
        "url": "https://api.cobalt.io/links/<endpoint for the asset>"
      }
    }
  }
}

If you’ve set up more than one asset, you’ll see the id in the same object as the title, which you may have used to create the asset.

Save the value of the asset id as YOUR-ASSET-IDENTIFIER. You’ll use that ID, which starts with as_, when updating or uploading information to your asset.

Add or Modify Asset Details

Now that you’ve created an asset and have the asset ID, you can add more information with the following REST call:

curl -X PUT 'https://api.cobalt.io/assets/YOUR-ASSET-IDENTIFIER' \
  -H 'Accept: application/vnd.cobalt.v2+json' \
  -H 'Authorization: Bearer YOUR-PERSONAL-API-TOKEN' \
  -H 'Content-Type: application/vnd.cobalt.v2+json' \
  -H 'X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN' \
  --data '{
            "title": "Updated title",
            "description": "Updated description",
            "asset_type": "web"
          }' \
  -v

When you review the output of the REST call with the -v, look for the line with HTTP/2. If the command is successful, you’ll see:

MessageMeaning
HTTP/2 204Asset updated

For a list of error codes, see the Errors section of our API reference.

Share