Users (v1)

This document uses the v1 API. For more details, see the v1 API.

Get User Details

get

Retrieves information about a user.

Path parameters
userIdstringrequired

The users ID. The API_KEY must have admin access to at least one group or organization where the requested user is a member and must have the api entitlement on their preferred organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Header parameters
Content-Typestring · enumrequired
Example: application/json; charset=utf-8
Options: application/json; charset=utf-8
Responses
curl -L \
  --url 'https://api.snyk.io/v1/user/{userId}' \
  --header 'Content-Type: application/json; charset=utf-8'
{
  "id": "",
  "name": "",
  "username": "",
  "email": ""
}

Get My Details

get

Retrieves information about the the user making the request.

Header parameters
Content-Typestring · enumrequired
Example: application/json; charset=utf-8
Options: application/json; charset=utf-8
Responses
curl -L \
  --url 'https://api.snyk.io/v1/user/me' \
  --header 'Content-Type: application/json; charset=utf-8'
{
  "id": "",
  "username": "",
  "email": "",
  "orgs": []
}

Modify organization notification settings

put

The organization notification settings for the user that will determine which emails are sent.

Path parameters
orgIdstringrequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Body
all ofoptional

Responses
curl -L \
  --request PUT \
  --url 'https://api.snyk.io/v1/user/me/notification-settings/org/{orgId}' \
  --header 'Content-Type: application/json; charset=utf-8' \
  --data '{
    "new-issues-remediations": {
      "enabled": true,
      "issueSeverity": "high",
      "issueType": "vuln"
    },
    "project-imported": {
      "enabled": true
    },
    "test-limit": {
      "enabled": true
    },
    "weekly-report": {
      "enabled": true
    }
  }'
{
  "new-issues-remediations": {
    "enabled": true,
    "issueSeverity": "high",
    "issueType": "vuln",
    "inherited": false
  },
  "project-imported": {
    "enabled": true,
    "inherited": false
  },
  "test-limit": {
    "enabled": true,
    "inherited": false
  },
  "weekly-report": {
    "enabled": true,
    "inherited": false
  }
}

Get organization notification settings

get

The organization notification settings for the user that will determine which emails are sent.

Path parameters
orgIdstringrequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Header parameters
Content-Typestring · enumrequired
Example: application/json; charset=utf-8
Options: application/json; charset=utf-8
Responses
curl -L \
  --url 'https://api.snyk.io/v1/user/me/notification-settings/org/{orgId}' \
  --header 'Content-Type: application/json; charset=utf-8'
{
  "new-issues-remediations": {
    "enabled": true,
    "issueSeverity": "high",
    "issueType": "vuln",
    "inherited": false
  },
  "project-imported": {
    "enabled": true,
    "inherited": false
  },
  "test-limit": {
    "enabled": true,
    "inherited": false
  },
  "weekly-report": {
    "enabled": true,
    "inherited": false
  }
}

Modify project notification settings

put

The project notification settings for the user that will determine which emails are sent.

Path parameters
orgIdstringrequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringrequired

The project ID to return notification settings for.

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Body
all ofoptional

Responses
curl -L \
  --request PUT \
  --url 'https://api.snyk.io/v1/user/me/notification-settings/org/{orgId}/project/{projectId}' \
  --header 'Content-Type: application/json; charset=utf-8' \
  --data '{
    "new-issues-remediations": {
      "enabled": true,
      "issueSeverity": "high",
      "issueType": "vuln"
    }
  }'

No body

Get project notification settings

get

The project notification settings for the user that will determine which emails are sent.

Path parameters
orgIdstringrequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringrequired

The project ID to return notification settings for.

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Header parameters
Content-Typestring · enumrequired
Example: application/json; charset=utf-8
Options: application/json; charset=utf-8
Responses
curl -L \
  --url 'https://api.snyk.io/v1/user/me/notification-settings/org/{orgId}/project/{projectId}' \
  --header 'Content-Type: application/json; charset=utf-8'
{
  "new-issues-remediations": {
    "enabled": true,
    "issueSeverity": "high",
    "issueType": "vuln",
    "inherited": false
  },
  "project-imported": {
    "enabled": true,
    "inherited": false
  },
  "test-limit": {
    "enabled": true,
    "inherited": false
  },
  "weekly-report": {
    "enabled": true,
    "inherited": false
  }
}

Last updated

Was this helpful?

Revision created

Add comment to emphasize required filters hidden in GitBook collapsed field