Snyk Users API

The Users API from Snyk — 3 operation(s) for users.

Business capability
Identity & Access Management BC-620.20

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

PATCH /groups/{group_id}/users/{id} Remove a user's membership from a group · Update a user's role in a group (Early Access) #
Ask an LLM
“Can I take a user out of a group by setting their membership to null?”
“Does the group user update endpoint support changing roles, or only removal?”
Tell an agent destructive · confirm first
Remove user {id} from group {group_id} by clearing their membership.
Revoke group {group_id} membership for user {id}.
GET /orgs/{org_id}/users/{id} Get a user in an organization by ID · Get user by ID (Early Access) #
Ask an LLM
“Can I look up a summary of a user in my organization?”
“Why doesn't a service account show up when I fetch a user by ID?”
Tell an agent
Get user {id} in organization {org_id}.
Show a summary of org {org_id} user {id}.
GET /self Get my own user details · My User Details #
Ask an LLM
“Which Snyk user is my API token authenticated as?”
“What does my own user profile look like through the API?”
Tell an agent
Show my user details.
Tell me who I'm authenticated as, using API version {version}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/snyk:snyk-users-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

snyk-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Snyk Users API
  version: REST
servers:
- description: Snyk REST API
  url: https://api.snyk.io/rest
security:
- APIToken: []
- BearerAuth: []
tags:
- name: Users
paths:
  /groups/{group_id}/users/{id}:
    patch:
      description: 'Update a user''s membership of the group.


        To remove a user''s membership, provide ''null'' as the membership parameter (see example).


        At present, only removing memberships is supported by this endpoint. To update a user''s group membership, please use

        the UI or legacy API.


        #### Required permissions


        - `View Groups (group.read)`


        - `View users (group.user.read)`


        - `Remove users (group.user.remove)`'
      operationId: updateUser
      parameters:
      - description: The id of the group
        in: path
        name: group_id
        required: true
        schema:
          format: uuid
          type: string
      - description: The id of the user
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
      - $ref: '#/components/parameters/Version'
      requestBody:
        content:
          application/vnd.api+json:
            example:
              data:
                attributes:
                  membership: null
                id: 55a348e2-c3ad-4bbc-b40e-9b232d1f4122
                type: user
            schema:
              properties:
                data:
                  $ref: '#/components/schemas/UserPatchRequestBody'
              type: object
        required: true
      responses:
        '204':
          $ref: '#/components/responses/204'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      summary: Update a user's role in a group (Early Access)
      tags:
      - Users
      x-snyk-api-lifecycle: released
      x-snyk-api-releases:
      - 2022-10-06~beta
      x-snyk-api-resource: users
      x-snyk-api-stability: beta
      x-snyk-api-version: 2022-10-06~beta
      x-stability-level: beta
  /orgs/{org_id}/users/{id}:
    get:
      description: 'Get a summary of user.


        Note that Service Accounts are not returned by this endpoint. Please use the Service Accounts endpoints.


        #### Required permissions


        - `View users (org.user.read)`'
      operationId: getUser
      parameters:
      - description: The id of the org
        in: path
        name: org_id
        required: true
        schema:
          format: uuid
          type: string
      - description: The id of the user
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
      - $ref: '#/components/parameters/Version'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/User'
                  jsonapi:
                    $ref: '#/components/schemas/JsonApi'
                required:
                - jsonapi
                - data
                type: object
          description: User details
          headers:
            deprecation:
              $ref: '#/components/headers/DeprecationHeader'
            snyk-request-id:
              $ref: '#/components/headers/RequestIdResponseHeader'
            snyk-version-lifecycle-stage:
              $ref: '#/components/headers/VersionStageResponseHeader'
            snyk-version-requested:
              $ref: '#/components/headers/VersionRequestedResponseHeader'
            snyk-version-served:
              $ref: '#/components/headers/VersionServedResponseHeader'
            sunset:
              $ref: '#/components/headers/SunsetHeader'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      summary: Get user by ID (Early Access)
      tags:
      - Users
      x-snyk-api-lifecycle: released
      x-snyk-api-releases:
      - 2021-09-13~beta
      x-snyk-api-resource: users
      x-snyk-api-stability: beta
      x-snyk-api-version: 2021-09-13~beta
      x-stability-level: beta
  /self:
    get:
      description: Retrieves information about the the user making the request.
      operationId: getSelf
      parameters:
      - $ref: '#/components/parameters/Version'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/Principal20240422'
                  jsonapi:
                    $ref: '#/components/schemas/JsonApi'
                  links:
                    $ref: '#/components/schemas/Links'
                required:
                - jsonapi
                - data
                - links
                type: object
          description: Current user is returned
          headers:
            deprecation:
              $ref: '#/components/headers/DeprecationHeader'
            snyk-request-id:
              $ref: '#/components/headers/RequestIdResponseHeader'
            snyk-version-lifecycle-stage:
              $ref: '#/components/headers/VersionStageResponseHeader'
            snyk-version-requested:
              $ref: '#/components/headers/VersionRequestedResponseHeader'
            snyk-version-served:
              $ref: '#/components/headers/VersionServedResponseHeader'
            sunset:
              $ref: '#/components/headers/SunsetHeader'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      summary: My User Details
      tags:
      - Users
      x-snyk-api-lifecycle: released
      x-snyk-api-releases:
      - 2022-03-01~experimental
      - 2022-09-14~experimental
      - '2024-04-22'
      x-snyk-api-resource: self
      x-snyk-api-stability: ga
      x-snyk-api-version: '2024-04-22'
      x-stability-level: stable
components:
  headers:
    VersionStageResponseHeader:
      description: 'A header containing the version stage of the endpoint. This stage describes the guarantees snyk provides surrounding stability of the endpoint.

        '
      schema:
        enum:
        - wip
        - experimental
        - beta
        - ga
        - deprecated
        - sunset
        example: ga
        type: string
    VersionServedResponseHeader:
      description: A header containing the version of the endpoint that was served by the API.
      example: '2026-03-25'
      schema:
        $ref: '#/components/schemas/ActualVersion'
    VersionRequestedResponseHeader:
      description: A header containing the version of the endpoint requested by the caller.
      example: '2026-03-25'
      schema:
        $ref: '#/components/schemas/QueryVersion'
    SunsetHeader:
      description: 'A header containing the date of when the underlying endpoint will be removed. This header is only present if the endpoint has been deprecated. For information purposes only. Returned as a date in the format: YYYY-MM-DD'
      example: '2021-08-02'
      schema:
        format: date
        type: string
    DeprecationHeader:
      description: 'A header containing the deprecation date of the underlying endpoint. For more information, please refer to the deprecation header RFC:

        https://tools.ietf.org/id/draft-dalal-deprecation-header-01.html

        '
      example: '2021-07-01T00:00:00Z'
      schema:
        format: date-time
        type: string
    RequestIdResponseHeader:
      description: 'A header containing a unique id used for tracking this request. If you are reporting an issue to Snyk it''s very helpful to provide this ID.

        '
      example: 4b58e274-ec62-4fab-917b-1d2c48d6bdef
      schema:
        format: uuid
        type: string
  schemas:
    User:
      additionalProperties: false
      properties:
        attributes:
          additionalProperties: false
          properties:
            active:
              description: Whether the user status is enabled or not
              example: true
              type: boolean
            email:
              description: The email of the user.
              example: user@someorg.com
              type: string
            membership:
              properties:
                created_at:
                  description: The date the membership was established.
                  example: '2022-09-14T09:19:29.206Z'
                  format: date-time
                  type: string
                strategy:
                  description: Whether the membership is a direct, or indirect membership.
                  enum:
                  - direct
                  - indirect
                  example: direct
                  type: string
              type: object
            name:
              description: The name of the user.
              example: user
              type: string
            username:
              description: The username of the user.
              example: username
              type: string
          type: object
        id:
          description: The Snyk ID corresponding to this user
          example: 55a348e2-c3ad-4bbc-b40e-9b232d1f4121
          format: uuid
          type: string
        type:
          description: Content type.
          example: user
          type: string
      required:
      - type
      - id
      - attributes
      type: object
    AppInstance:
      additionalProperties: false
      properties:
        default_org_context:
          description: ID of the default org for the service account.
          format: uuid
          type: string
        name:
          description: The name of the service account.
          example: user
          type: string
      required:
      - name
      type: object
    LinkProperty:
      example: https://example.com/api/resource
      oneOf:
      - description: A string containing the link’s URL.
        example: https://example.com/api/resource
        type: string
      - additionalProperties: false
        example:
          href: https://example.com/api/resource
        properties:
          href:
            description: A string containing the link’s URL.
            example: https://example.com/api/resource
            type: string
          meta:
            additionalProperties: true
            description: Free-form object that may contain non-standard information.
            example:
              key1: value1
              key2:
                sub_key: sub_value
              key3:
              - array_value1
              - array_value2
            type: object
        required:
        - href
        type: object
    QueryVersion:
      description: Requested API version
      example: '2026-03-25'
      pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
      type: string
    ServiceAccount20240422:
      additionalProperties: false
      properties:
        default_org_context:
          description: ID of the default org for the service account.
          format: uuid
          type: string
        name:
          description: The name of the service account.
          example: user
          type: string
      required:
      - name
      type: object
    ErrorDocument:
      additionalProperties: false
      example:
        errors:
        - detail: Permission denied for this resource
          status: '403'
        jsonapi:
          version: '1.0'
      properties:
        errors:
          example:
          - detail: Permission denied for this resource
            status: '403'
          items:
            additionalProperties: false
            example:
              detail: Not Found
              status: '404'
            properties:
              code:
                description: An application-specific error code, expressed as a string value.
                example: entity-not-found
                type: string
              detail:
                description: A human-readable explanation specific to this occurrence of the problem.
                example: 'The request was missing these required fields: ...'
                type: string
              id:
                description: A unique identifier for this particular occurrence of the problem.
                example: f16c31b5-6129-4571-add8-d589da9be524
                format: uuid
                type: string
              links:
                additionalProperties: false
                description: A link that leads to further details about this particular occurrance of the problem.
                example:
                  about: https://example.com/about_this_error
                properties:
                  about:
                    example: https://example.com/api/resource
                    oneOf:
                    - description: A string containing the link’s URL.
                      example: https://example.com/api/resource
                      type: string
                    - additionalProperties: false
                      example:
                        href: https://example.com/api/resource
                      properties:
                        href:
                          description: A string containing the link’s URL.
                          example: https://example.com/api/resource
                          type: string
                        meta:
                          additionalProperties: true
                          description: Free-form object that may contain non-standard information.
                          example:
                            key1: value1
                            key2:
                              sub_key: sub_value
                            key3:
                            - array_value1
                            - array_value2
                          type: object
                      required:
                      - href
                      type: object
                type: object
              meta:
                additionalProperties: true
                example:
                  key: value
                type: object
              source:
                additionalProperties: false
                example:
                  pointer: /data/attributes
                properties:
                  parameter:
                    description: A string indicating which URI query parameter caused the error.
                    example: param1
                    type: string
                  pointer:
                    description: A JSON Pointer [RFC6901] to the associated entity in the request document.
                    example: /data/attributes
                    type: string
                type: object
              status:
                description: The HTTP status code applicable to this problem, expressed as a string value.
                example: '400'
                pattern: ^[45]\d\d$
                type: string
              title:
                description: A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
                example: Bad request
                type: string
            required:
            - status
            - detail
            type: object
          minItems: 1
          type: array
        jsonapi:
          additionalProperties: false
          example:
            version: '1.0'
          properties:
            version:
              description: Version of the JSON API specification this server supports.
              example: '1.0'
              pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)$
              type: string
          required:
          - version
          type: object
      required:
      - jsonapi
      - errors
      type: object
    UserPatchRequestBody:
      additionalProperties: false
      properties:
        attributes:
          properties:
            membership:
              properties:
                role:
                  description: Role name
                  example: MEMBER
                  type: string
              type:
              - object
              - 'null'
          required:
          - membership
          type: object
        id:
          description: The Snyk ID corresponding to this user
          example: 55a348e2-c3ad-4bbc-b40e-9b232d1f4121
          format: uuid
          type: string
        type:
          description: Content type
          example: user
          type: string
      required:
      - type
      - id
      - attributes
      type: object
    ActualVersion:
      description: Resolved API version
      example: '2026-03-25'
      pattern: ^((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?)$
      type: string
    JsonApi:
      additionalProperties: false
      example:
        version: '1.0'
      properties:
        version:
          description: Version of the JSON API specification this server supports.
          example: '1.0'
          pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)$
          type: string
      required:
      - version
      type: object
    User20240422:
      additionalProperties: false
      properties:
        avatar_url:
          description: The avatar url of the user.
          example: https://snyk.io/avatar.png
          format: uri
          type: string
        default_org_context:
          description: ID of the default org for the user.
          format: uuid
          type: string
        email:
          description: The email of the user.
          example: user@someorg.com
          type: string
        name:
          description: The name of the user.
          example: user
          type: string
        username:
          description: The username of the user.
          example: username
          type: string
      required:
      - name
      - email
      - avatar_url
      type: object
    Principal20240422:
      additionalProperties: false
      properties:
        attributes:
          anyOf:
          - $ref: '#/components/schemas/User20240422'
          - $ref: '#/components/schemas/ServiceAccount20240422'
          - $ref: '#/components/schemas/AppInstance'
        id:
          description: The Snyk ID corresponding to this user, service account or app
          example: 55a348e2-c3ad-4bbc-b40e-9b232d1f4121
          format: uuid
          type: string
        type:
          description: Content type.
          enum:
          - user
          - service_account
          - app_instance
          type: string
      required:
      - type
      - id
      - attributes
      type: object
    Links:
      additionalProperties: false
      properties:
        first:
          $ref: '#/components/schemas/LinkProperty'
        last:
          $ref: '#/components/schemas/LinkProperty'
        next:
          $ref: '#/components/schemas/LinkProperty'
        prev:
          $ref: '#/components/schemas/LinkProperty'
        related:
          $ref: '#/components/schemas/LinkProperty'
        self:
          $ref: '#/components/schemas/LinkProperty'
      type: object
  responses:
    '500':
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/ErrorDocument'
      description: 'Internal Server Error: An error was encountered while attempting to process the request.'
      headers:
        deprecation:
          $ref: '#/components/headers/DeprecationHeader'
        snyk-request-id:
          $ref: '#/components/headers/RequestIdResponseHeader'
        snyk-version-lifecycle-stage:
          $ref: '#/components/headers/VersionStageResponseHeader'
        snyk-version-requested:
          $ref: '#/components/headers/VersionRequestedResponseHeader'
        snyk-version-served:
          $ref: '#/components/headers/VersionServedResponseHeader'
        sunset:
          $ref: '#/components/headers/SunsetHeader'
    '403':
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/ErrorDocument'
      description: 'Forbidden: the request requires an authentication token with more or different permissions.'
      headers:
        deprecation:
          $ref: '#/components/headers/DeprecationHeader'
        snyk-request-id:
          $ref: '#/components/headers/RequestIdResponseHeader'
        snyk-version-lifecycle-stage:
          $ref: '#/components/headers/VersionStageResponseHeader'
        snyk-version-requested:
          $ref: '#/components/headers/VersionRequestedResponseHeader'
        snyk-version-served:
          $ref: '#/components/headers/VersionServedResponseHeader'
        sunset:
          $ref: '#/components/headers/SunsetHeader'
    '204':
      description: The operation completed successfully with no content
      headers:
        deprecation:
          $ref: '#/components/headers/DeprecationHeader'
        snyk-request-id:
          $ref: '#/components/headers/RequestIdResponseHeader'
        snyk-version-lifecycle-stage:
          $ref: '#/components/headers/VersionStageResponseHeader'
        snyk-version-requested:
          $ref: '#/components/headers/VersionRequestedResponseHeader'
        snyk-version-served:
          $ref: '#/components/headers/VersionServedResponseHeader'
        sunset:
          $ref: '#/components/headers/SunsetHeader'
    '400':
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/ErrorDocument'
      description: 'Bad Request: A parameter provided as a part of the request was invalid.'
      headers:
        deprecation:
          $ref: '#/components/headers/DeprecationHeader'
        snyk-request-id:
          $ref: '#/components/headers/RequestIdResponseHeader'
        snyk-version-lifecycle-stage:
          $ref: '#/components/headers/VersionStageResponseHeader'
        snyk-version-requested:
          $ref: '#/components/headers/VersionRequestedResponseHeader'
        snyk-version-served:
          $ref: '#/components/headers/VersionServedResponseHeader'
        sunset:
          $ref: '#/components/headers/SunsetHeader'
    '404':
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/ErrorDocument'
      description: 'Not Found: The resource being operated on could not be found.'
      headers:
        deprecation:
          $ref: '#/components/headers/DeprecationHeader'
        snyk-request-id:
          $ref: '#/components/headers/RequestIdResponseHeader'
        snyk-version-lifecycle-stage:
          $ref: '#/components/headers/VersionStageResponseHeader'
        snyk-version-requested:
          $ref: '#/components/headers/VersionRequestedResponseHeader'
        snyk-version-served:
          $ref: '#/components/headers/VersionServedResponseHeader'
        sunset:
          $ref: '#/components/headers/SunsetHeader'
    '401':
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/ErrorDocument'
      description: 'Unauthorized: the request requires an authentication token.'
      headers:
        deprecation:
          $ref: '#/components/headers/DeprecationHeader'
        snyk-request-id:
          $ref: '#/components/headers/RequestIdResponseHeader'
        snyk-version-lifecycle-stage:
          $ref: '#/components/headers/VersionStageResponseHeader'
        snyk-version-requested:
          $ref: '#/components/headers/VersionRequestedResponseHeader'
        snyk-version-served:
          $ref: '#/components/headers/VersionServedResponseHeader'
        sunset:
          $ref: '#/components/headers/SunsetHeader'
  parameters:
    Version:
      description: The requested version of the endpoint to process the request
      example: '2026-03-25'
      in: query
      name: version
      required: true
      schema:
        $ref: '#/components/schemas/QueryVersion'
  securitySchemes:
    APIToken:
      description: API key value must be prefixed with \"Token \".
      in: header
      name: Authorization
      type: apiKey
    BearerAuth:
      scheme: bearer
      type: http
x-snyk-api-version: '2024-10-15'