Getting started with the REST API
Follow these steps to make a simple call to the REST API using curl
in the command line.
Log in to Snyk.
In your account, use the left navigation to find an Organization where you have Projects you can list.
Navigate to your Organization Settings, and on the General settings page, find your Organization ID and copy the value.
Navigate to your personal General Account Settings and copy your API Token. For instructions, see Authentication for API.
Use a
curl
command to make your request. Replace the{orgId}
and API_TOKEN with your Organization ID and API Token, respectively. Snyk recommends using 2024-10-15 for the version number unless you are using an earlier version for a specific reason. Using the current day's date will call the most recent version of the API. An example follows:
Note that if you use the parameter target-reference
, you must URL-encode it.
If you have any problems or questions, contact Snyk support.
Last updated
Was this helpful?