Organizations (v1)
Last updated
Was this helpful?
Last updated
Was this helpful?
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
View Organization
/orgs
application/json; charset=utf-8
application/json; charset=utf-8
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.
/org
The name of the new organization
new-org
The group ID. The API_KEY
must have access to this group.
4a18d42f-0706-4ad0-b127-24078731fbed
The id of an organization to copy settings from.
If provided, this organization must be associated with the same group.
The items that will be copied are: Source control integrations (GitHub, GitLab, BitBucket) + Container registries integrations (ACR, Docker Hub, ECR, GCR) + Container orchestrators integrations (Kubernetes) + PaaS and Serverless Integrations (Heroku, AWS Lambda) + Notification integrations (Slack, Jira) + Policies + Ignore settings + Language settings + Infrastructure as Code settings + Snyk Code settings
The following will not be copied across: Service accounts + Members + Projects + Notification preferences
6b4a3261-b68f-43a0-9218-1f082e77f879
{"name":"new-org","groupId":"4a18d42f-0706-4ad0-b127-24078731fbed","sourceOrgId":"6b4a3261-b68f-43a0-9218-1f082e77f879"}
View Organization
Remove Organization
/org/{orgId}
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
application/json; charset=utf-8
No body
Settings that are not provided will not be modified.
View Organization
Edit Organization
/org/{orgId}/settings
The organization ID. The API_KEY
must have admin access to this organization.
25065eb1-109c-4c3e-9503-68fc56ef6f44
+ Attributes (Org settings request)
View Organization
/org/{orgId}/settings
The organization ID. The API_KEY
must have access to this organization.
25065eb1-109c-4c3e-9503-68fc56ef6f44
application/json; charset=utf-8
application/json; charset=utf-8
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
Provision User
/org/{orgId}/provision
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.
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
Provision User
/org/{orgId}/provision
The organization ID.
25065eb1-109c-4c3e-9503-68fc56ef6f44
application/json; charset=utf-8
application/json; charset=utf-8
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
Provision User
/org/{orgId}/provision
The organization ID.
25065eb1-109c-4c3e-9503-68fc56ef6f44
application/json; charset=utf-8
application/json; charset=utf-8
Manage the default settings for organization notifications. These will be used as defaults, but can be re-defined by organization members
View Organization
Edit Organization
/org/{orgId}/notification-settings
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}}
Manage the default settings for organization notifications. These will be used as defaults, but can be re-defined by organization members
View Organization
/org/{orgId}/notification-settings
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
application/json; charset=utf-8
application/json; charset=utf-8
Manage members in your organization
View Organization
View Users
/org/{orgId}/members
The organization ID.
4a18d42f-0706-4ad0-b127-24078731fbed
Include group administrators who also have access to this organization.
true
application/json; charset=utf-8
application/json; charset=utf-8
Manage member's roles in your organization
Manage Users
/org/{orgId}/members/{userId}
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
The new role of the user, "admin" or "collaborator".
{"role":""}
No body
Manage member's roles in your organization
View Organization
View Users
User Remove
/org/{orgId}/members/{userId}
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
application/json; charset=utf-8
No body
Update member's role in your organization by role publicId
Manage Users
/org/{orgId}/members/update/{userId}
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
The new role public ID to update the user to.
{"rolePublicId":""}
No body
Invite users to the organization by email
View Organization
View Users
Invite Users
/org/{orgId}/invite
The organization ID. The API_KEY
must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The email of the user.
(optional) Set the role as admin.
{"email":""}
No body