Organizations (v1)
Each request to Snyk has to be done in the context of a Snyk organization. If no organization is specified, the user's default organization (user is identified according to the API_KEY
) will be used.
The organization determines the access rights, licenses policy and is the unit of billing for private projects.
An organization should be given as a query parameter named org
, with the public identifier given to this org. The list of organizations and their corresponding public ids can be found with the organization resource
Required permissions
View Organization
application/json; charset=utf-8
Possible values: GET /v1/orgs HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
{
"orgs": [
{
"name": "text",
"id": "text",
"slug": "text",
"url": "text",
"group": {}
}
]
}
An organization can be created as part of a group, or independently. If the groupId is not provided, a Personal Org will be created independent of a group.
{"name":"new-org","groupId":"4a18d42f-0706-4ad0-b127-24078731fbed","sourceOrgId":"6b4a3261-b68f-43a0-9218-1f082e77f879"}
{"id":"0356f641-c55c-488f-af05-c2122590f369","name":"new-org","slug":"new-org","url":"https://api.snyk.io/v1/org/new-org","created":"2021-01-07T16:07:16.237Z","group":{"name":"test-group","id":"4a18d42f-0706-4ad0-b127-24078731fbed"}}
POST /v1/org HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 120
{
"name": "new-org",
"groupId": "4a18d42f-0706-4ad0-b127-24078731fbed",
"sourceOrgId": "6b4a3261-b68f-43a0-9218-1f082e77f879"
}
{
"id": "0356f641-c55c-488f-af05-c2122590f369",
"name": "new-org",
"slug": "new-org",
"url": "https://api.snyk.io/v1/org/new-org",
"created": "2021-01-07T16:07:16.237Z",
"group": {
"name": "test-group",
"id": "4a18d42f-0706-4ad0-b127-24078731fbed"
}
}
Required permissions
-
View Organization
-
Remove Organization
The organization ID. The API_KEY
must have permission to delete the provided organization. Currently this operation is only supported for organizations without any projects.
4a18d42f-0706-4ad0-b127-24078731fbed
application/json; charset=utf-8
Possible values: DELETE /v1/org/{orgId} HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
No content
Settings that are not provided will not be modified.
Required permissions
-
View Organization
-
Edit Organization
The organization ID. The API_KEY
must have admin access to this organization.
25065eb1-109c-4c3e-9503-68fc56ef6f44
+ Attributes (Org settings request)
{"requestAccess":{"enabled":true}}
PUT /v1/org/{orgId}/settings HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 37
"+ Attributes (Org settings request)"
{
"requestAccess": {
"enabled": true
}
}
Required permissions
View Organization
The organization ID. The API_KEY
must have access to this organization.
25065eb1-109c-4c3e-9503-68fc56ef6f44
application/json; charset=utf-8
Possible values: {"requestAccess":{"enabled":true},"ignores":{"reasonRequired":false,"autoApproveIgnores":false}}
GET /v1/org/{orgId}/settings HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
{
"requestAccess": {
"enabled": true
},
"ignores": {
"reasonRequired": false,
"autoApproveIgnores": false
}
}
This endpoint allows Snyk Admins to provision user access to Snyk Orgs prior to the user login to the Snyk platform, and does not send out invitation emails to the Snyk platform. When the provisioned user logs into Snyk for the first time, the user will automatically be granted the appropriate Snyk org access and role permissions specified in the API call. This endpoint can be called multiple times to provision a user to multiple Snyk orgs. The API token used requires Org Admin permisisons, and must be part of a Snyk group with a valid SSO connection. Service accounts are restricted from invoking this API. As this endpoint can only be used to provision new users, if a user has already logged into Snyk, this endpoint will not work to provision user access
Required permissions
Provision User
The organization ID. The API_KEY
must not exceed the permissions being granted to the provisioned user.
25065eb1-109c-4c3e-9503-68fc56ef6f44
+ Attributes (object) + email (string, required) - The email of the user. + rolePublicId (string) - ID of the role to grant this user. + role (string) - Deprecated. Name of the role to grant this user. Must be one of `ADMIN`, `COLLABORATOR`, or `RESTRICTED_COLLABORATOR`. This field is invalid if `rolePublicId` is supplied with the request.
{"email":"","role":"","rolePublicId":"","created":""}
POST /v1/org/{orgId}/provision HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 358
"+ Attributes (object)\n + email (string, required) - The email of the user.\n + rolePublicId (string) - ID of the role to grant this user.\n + role (string) - Deprecated. Name of the role to grant this user. Must be one of `ADMIN`, `COLLABORATOR`, or `RESTRICTED_COLLABORATOR`. This field is invalid if `rolePublicId` is supplied with the request."
{
"email": "",
"role": "",
"rolePublicId": "",
"created": ""
}
This endpoint allows Snyk Admins to provision user access to Snyk Orgs prior to the user login to the Snyk platform, and does not send out invitation emails to the Snyk platform. When the provisioned user logs into Snyk for the first time, the user will automatically be granted the appropriate Snyk org access and role permissions specified in the API call. This endpoint can be called multiple times to provision a user to multiple Snyk orgs. The API token used requires Org Admin permisisons, and must be part of a Snyk group with a valid SSO connection. Service accounts are restricted from invoking this API. As this endpoint can only be used to provision new users, if a user has already logged into Snyk, this endpoint will not work to provision user access
Required permissions
Provision User
The organization ID.
25065eb1-109c-4c3e-9503-68fc56ef6f44
application/json; charset=utf-8
Possible values: GET /v1/org/{orgId}/provision HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
[
{
"email": "",
"role": "",
"rolePublicId": "",
"created": ""
}
]
This endpoint allows Snyk Admins to provision user access to Snyk Orgs prior to the user login to the Snyk platform, and does not send out invitation emails to the Snyk platform. When the provisioned user logs into Snyk for the first time, the user will automatically be granted the appropriate Snyk org access and role permissions specified in the API call. This endpoint can be called multiple times to provision a user to multiple Snyk orgs. The API token used requires Org Admin permisisons, and must be part of a Snyk group with a valid SSO connection. Service accounts are restricted from invoking this API. As this endpoint can only be used to provision new users, if a user has already logged into Snyk, this endpoint will not work to provision user access
Required permissions
Provision User
The organization ID.
25065eb1-109c-4c3e-9503-68fc56ef6f44
application/json; charset=utf-8
Possible values: {"ok":false}
DELETE /v1/org/{orgId}/provision HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
{
"ok": false
}
Manage the default settings for organization notifications. These will be used as defaults, but can be re-defined by organization members
Required permissions
-
View Organization
-
Edit Organization
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
{"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}}
PUT /v1/org/{orgId}/notification-settings HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 185
{
"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
}
}
Manage the default settings for organization notifications. These will be used as defaults, but can be re-defined by organization members
Required permissions
View Organization
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
application/json; charset=utf-8
Possible values: {"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 /v1/org/{orgId}/notification-settings HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
{
"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
}
}
Manage members in your organization
Required permissions
-
View Organization
-
View Users
The organization ID.
4a18d42f-0706-4ad0-b127-24078731fbed
Include group administrators who also have access to this organization.
true
application/json; charset=utf-8
Possible values: GET /v1/org/{orgId}/members HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
[
{
"id": "",
"name": "",
"username": "",
"email": "",
"role": ""
}
]
Manage member's roles in your organization
Required permissions
Manage Users
The organization ID. The API_KEY
must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The user ID.
4a18d42f-0706-4ad0-b127-24078731fbed
{"role":""}
PUT /v1/org/{orgId}/members/{userId} HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 11
{
"role": ""
}
No content
Manage member's roles in your organization
Required permissions
-
View Organization
-
View Users
-
User Remove
The organization ID. The API_KEY
must admin have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The user ID we want to remove.
4a18d42f-0706-4ad0-b127-24078731fbed
application/json; charset=utf-8
Possible values: DELETE /v1/org/{orgId}/members/{userId} HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
No content
Update member's role in your organization by role publicId
Required permissions
Manage Users
The organization ID. The API_KEY
must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The user ID.
4a18d42f-0706-4ad0-b127-24078731fbed
{"rolePublicId":""}
PUT /v1/org/{orgId}/members/update/{userId} HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 19
{
"rolePublicId": ""
}
No content
Invite users to the organization by email
Required permissions
-
View Organization
-
View Users
-
Invite Users
The organization ID. The API_KEY
must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
{"email":""}
POST /v1/org/{orgId}/invite HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 12
{
"email": ""
}
No content
Last updated
Was this helpful?