Socket repos API

The repos API from Socket — 2 operation(s) for repos.

Operations 5

GET /orgs/{org_slug}/repos List repositories #
POST /orgs/{org_slug}/repos Create repository #
GET /orgs/{org_slug}/repos/{repo_slug} Get repository #
POST /orgs/{org_slug}/repos/{repo_slug} Update repository #
DELETE /orgs/{org_slug}/repos/{repo_slug} Delete repository #

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/socket-repos-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 email required.

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

OpenAPI Specification

socket-repos-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Specification of the Socket API endpoints
  title: Endpoints alerts Repos API
  version: '0'
servers:
- url: https://api.socket.dev/v0
tags:
- name: repos
paths:
  /orgs/{org_slug}/repos:
    get:
      tags:
      - repos
      summary: List repositories
      operationId: getOrgRepoList
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: sort
        in: query
        required: false
        description: Field to sort repositories by.
        schema:
          type: string
          enum:
          - name
          - updated_at
          - created_at
          default: created_at
      - name: direction
        in: query
        required: false
        description: Sort direction.
        schema:
          type: string
          enum:
          - asc
          - desc
          default: desc
      - name: per_page
        in: query
        required: false
        description: ''
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 30
      - name: page
        in: query
        required: false
        description: ''
        schema:
          type: integer
          minimum: 1
          default: 1
      - name: include_archived
        in: query
        required: false
        description: Include archived repositories in the results
        schema:
          type: boolean
          default: false
      - name: workspace
        in: query
        required: false
        description: Filter repositories by workspace. When provided (including empty string), only repos in that workspace are returned.
        schema:
          type: string
      security:
      - bearerAuth:
        - repo:list
      - basicAuth:
        - repo:list
      description: 'Lists repositories for the specified organization.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo:list'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                description: ''
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        id:
                          type: string
                          description: The ID of the repository
                          default: ''
                        created_at:
                          type: string
                          description: The creation date of the repository
                          default: ''
                        updated_at:
                          type: string
                          description: The last update date of the repository
                          default: ''
                        html_url:
                          type: string
                          description: The URL to the repository dashboard page
                          default: ''
                        head_full_scan_id:
                          type:
                          - string
                          - 'null'
                          description: The ID of the head full scan of the repository
                          default: ''
                        integration_meta:
                          anyOf:
                          - type: object
                            additionalProperties: false
                            properties:
                              type:
                                type: string
                                enum:
                                - github
                              value:
                                type: object
                                additionalProperties: false
                                description: ''
                                properties:
                                  installation_id:
                                    type: string
                                    description: The GitHub installation_id of the active associated Socket GitHub App
                                    default: ''
                                  installation_login:
                                    type: string
                                    description: The GitHub login name that the active Socket GitHub App installation is installed to
                                    default: ''
                                  repo_name:
                                    type:
                                    - string
                                    - 'null'
                                    description: The name of the associated GitHub repo.
                                    default: ''
                                  repo_id:
                                    type:
                                    - string
                                    - 'null'
                                    description: The id of the associated GitHub repo.
                                    default: ''
                                required:
                                - installation_id
                                - installation_login
                                - repo_id
                                - repo_name
                        slug:
                          type: string
                          description: The slug of the repository.
                          default: ''
                        name:
                          type: string
                          description: The name of the repository
                          default: ''
                        description:
                          type:
                          - string
                          - 'null'
                          description: The description of the repository
                          default: ''
                        homepage:
                          type:
                          - string
                          - 'null'
                          description: The homepage URL of the repository
                          default: ''
                        visibility:
                          type: string
                          enum:
                          - public
                          - private
                          description: The visibility of the repository
                          default: private
                        archived:
                          type: boolean
                          default: false
                          description: Whether the repository is archived or not
                        default_branch:
                          type:
                          - string
                          - 'null'
                          description: The default branch of the repository
                          default: main
                        workspace:
                          type: string
                          description: The workspace of the repository
                          default: ''
                      description: ''
                    description: ''
                  nextPage:
                    type:
                    - integer
                    - 'null'
                    description: ''
                    default: 0
                required:
                - nextPage
                - results
          description: Lists repositories for the specified organization. The authenticated user must be a member of the organization.
        '400':
          $ref: '#/components/responses/SocketBadRequest'
        '401':
          $ref: '#/components/responses/SocketUnauthorized'
        '403':
          $ref: '#/components/responses/SocketForbidden'
        '404':
          $ref: '#/components/responses/SocketNotFoundResponse'
        '429':
          $ref: '#/components/responses/SocketTooManyRequestsResponse'
      x-readme: {}
    post:
      tags:
      - repos
      summary: Create repository
      operationId: createOrgRepo
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: on_duplicate
        in: query
        required: false
        description: Set to "redirect" to receive a 302 redirect to the existing repo instead of a 409 error when a duplicate slug is detected.
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                name:
                  type: string
                  description: The display name of the repository. When provided without a slug, the slug is automatically derived from the name. When omitted, the slug is used as the name. At least one of name or slug must be provided.
                  default: ''
                description:
                  type:
                  - string
                  - 'null'
                  description: The description of the repository
                  default: ''
                homepage:
                  type:
                  - string
                  - 'null'
                  description: The homepage URL of the repository
                  default: ''
                visibility:
                  type: string
                  enum:
                  - public
                  - private
                  description: The visibility of the repository
                  default: private
                archived:
                  type: boolean
                  default: false
                  description: Whether the repository is archived or not
                default_branch:
                  type:
                  - string
                  - 'null'
                  description: The default branch of the repository
                  default: main
                workspace:
                  type: string
                  description: The workspace of the repository
                  default: ''
                slug:
                  type: string
                  description: The slug of the repository. If provided, used directly instead of being derived from name. Must only contain ASCII letters, digits, and the characters ., -, and _.
                  default: ''
              description: ''
        required: false
      security:
      - bearerAuth:
        - repo:create
      - basicAuth:
        - repo:create
      description: 'Create a repository.


        Repos collect Full scans and Diff scans and are typically associated with a git repo.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo:create'
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    description: The ID of the repository
                    default: ''
                  created_at:
                    type: string
                    description: The creation date of the repository
                    default: ''
                  updated_at:
                    type: string
                    description: The last update date of the repository
                    default: ''
                  html_url:
                    type: string
                    description: The URL to the repository dashboard page
                    default: ''
                  head_full_scan_id:
                    type:
                    - string
                    - 'null'
                    description: The ID of the head full scan of the repository
                    default: ''
                  integration_meta:
                    anyOf:
                    - type: object
                      additionalProperties: false
                      properties:
                        type:
                          type: string
                          enum:
                          - github
                        value:
                          type: object
                          additionalProperties: false
                          description: ''
                          properties:
                            installation_id:
                              type: string
                              description: The GitHub installation_id of the active associated Socket GitHub App
                              default: ''
                            installation_login:
                              type: string
                              description: The GitHub login name that the active Socket GitHub App installation is installed to
                              default: ''
                            repo_name:
                              type:
                              - string
                              - 'null'
                              description: The name of the associated GitHub repo.
                              default: ''
                            repo_id:
                              type:
                              - string
                              - 'null'
                              description: The id of the associated GitHub repo.
                              default: ''
                          required:
                          - installation_id
                          - installation_login
                          - repo_id
                          - repo_name
                  slug:
                    type: string
                    description: The slug of the repository.
                    default: ''
                  name:
                    type: string
                    description: The name of the repository
                    default: ''
                  description:
                    type:
                    - string
                    - 'null'
                    description: The description of the repository
                    default: ''
                  homepage:
                    type:
                    - string
                    - 'null'
                    description: The homepage URL of the repository
                    default: ''
                  visibility:
                    type: string
                    enum:
                    - public
                    - private
                    description: The visibility of the repository
                    default: private
                  archived:
                    type: boolean
                    default: false
                    description: Whether the repository is archived or not
                  default_branch:
                    type:
                    - string
                    - 'null'
                    description: The default branch of the repository
                    default: main
                  workspace:
                    type: string
                    description: The workspace of the repository
                    default: ''
                description: ''
          description: Lists repositories for the specified organization. The authenticated user must be a member of the organization.
        '302':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    description: The ID of the repository
                    default: ''
                  created_at:
                    type: string
                    description: The creation date of the repository
                    default: ''
                  updated_at:
                    type: string
                    description: The last update date of the repository
                    default: ''
                  html_url:
                    type: string
                    description: The URL to the repository dashboard page
                    default: ''
                  head_full_scan_id:
                    type:
                    - string
                    - 'null'
                    description: The ID of the head full scan of the repository
                    default: ''
                  integration_meta:
                    anyOf:
                    - type: object
                      additionalProperties: false
                      properties:
                        type:
                          type: string
                          enum:
                          - github
                        value:
                          type: object
                          additionalProperties: false
                          description: ''
                          properties:
                            installation_id:
                              type: string
                              description: The GitHub installation_id of the active associated Socket GitHub App
                              default: ''
                            installation_login:
                              type: string
                              description: The GitHub login name that the active Socket GitHub App installation is installed to
                              default: ''
                            repo_name:
                              type:
                              - string
                              - 'null'
                              description: The name of the associated GitHub repo.
                              default: ''
                            repo_id:
                              type:
                              - string
                              - 'null'
                              description: The id of the associated GitHub repo.
                              default: ''
                          required:
                          - installation_id
                          - installation_login
                          - repo_id
                          - repo_name
                  slug:
                    type: string
                    description: The slug of the repository.
                    default: ''
                  name:
                    type: string
                    description: The name of the repository
                    default: ''
                  description:
                    type:
                    - string
                    - 'null'
                    description: The description of the repository
                    default: ''
                  homepage:
                    type:
                    - string
                    - 'null'
                    description: The homepage URL of the repository
                    default: ''
                  visibility:
                    type: string
                    enum:
                    - public
                    - private
                    description: The visibility of the repository
                    default: private
                  archived:
                    type: boolean
                    default: false
                    description: Whether the repository is archived or not
                  default_branch:
                    type:
                    - string
                    - 'null'
                    description: The default branch of the repository
                    default: main
                  workspace:
                    type: string
                    description: The workspace of the repository
                    default: ''
                description: ''
          description: Redirects to the existing repository when on_duplicate=redirect is set and a duplicate slug is detected.
        '400':
          $ref: '#/components/responses/SocketBadRequest'
        '401':
          $ref: '#/components/responses/SocketUnauthorized'
        '403':
          $ref: '#/components/responses/SocketForbidden'
        '404':
          $ref: '#/components/responses/SocketNotFoundResponse'
        '409':
          $ref: '#/components/responses/SocketConflict'
        '429':
          $ref: '#/components/responses/SocketTooManyRequestsResponse'
      x-readme: {}
  /orgs/{org_slug}/repos/{repo_slug}:
    get:
      tags:
      - repos
      summary: Get repository
      operationId: getOrgRepo
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: repo_slug
        in: path
        required: true
        description: The slug of the repository
        schema:
          type: string
      - name: workspace
        in: query
        required: false
        description: The workspace of the repository
        schema:
          type: string
      security:
      - bearerAuth:
        - repo:list
      - basicAuth:
        - repo:list
      description: 'Retrieve a repository associated with an organization.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo:list'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                description: ''
                properties:
                  id:
                    type: string
                    description: The ID of the repository
                    default: ''
                  created_at:
                    type: string
                    description: The creation date of the repository
                    default: ''
                  updated_at:
                    type: string
                    description: The last update date of the repository
                    default: ''
                  html_url:
                    type: string
                    description: The URL to the repository dashboard page
                    default: ''
                  head_full_scan_id:
                    type:
                    - string
                    - 'null'
                    description: The ID of the head full scan of the repository
                    default: ''
                  integration_meta:
                    anyOf:
                    - type: object
                      additionalProperties: false
                      properties:
                        type:
                          type: string
                          enum:
                          - github
                        value:
                          type: object
                          additionalProperties: false
                          description: ''
                          properties:
                            installation_id:
                              type: string
                              description: The GitHub installation_id of the active associated Socket GitHub App
                              default: ''
                            installation_login:
                              type: string
                              description: The GitHub login name that the active Socket GitHub App installation is installed to
                              default: ''
                            repo_name:
                              type:
                              - string
                              - 'null'
                              description: The name of the associated GitHub repo.
                              default: ''
                            repo_id:
                              type:
                              - string
                              - 'null'
                              description: The id of the associated GitHub repo.
                              default: ''
                          required:
                          - installation_id
                          - installation_login
                          - repo_id
                          - repo_name
                  slug:
                    type: string
                    description: The slug of the repository.
                    default: ''
                  name:
                    type: string
                    description: The name of the repository
                    default: ''
                  description:
                    type:
                    - string
                    - 'null'
                    description: The description of the repository
                    default: ''
                  homepage:
                    type:
                    - string
                    - 'null'
                    description: The homepage URL of the repository
                    default: ''
                  visibility:
                    type: string
                    enum:
                    - public
                    - private
                    description: The visibility of the repository
                    default: private
                  archived:
                    type: boolean
                    default: false
                    description: Whether the repository is archived or not
                  default_branch:
                    type:
                    - string
                    - 'null'
                    description: The default branch of the repository
                    default: main
                  workspace:
                    type: string
                    description: The workspace of the repository
                    default: ''
                  slig:
                    type: string
                    description: The slug of the repository. This typo is intentionally preserved for backwards compatibility reasons.
                    default: ''
                required:
                - archived
                - created_at
                - default_branch
                - description
                - head_full_scan_id
                - homepage
                - html_url
                - id
                - integration_meta
                - name
                - slig
                - slug
                - updated_at
                - visibility
                - workspace
          description: Lists repositories for the specified organization. The authenticated user must be a member of the organization.
        '400':
          $ref: '#/components/responses/SocketBadRequest'
        '401':
          $ref: '#/components/responses/SocketUnauthorized'
        '403':
          $ref: '#/components/responses/SocketForbidden'
        '404':
          $ref: '#/components/responses/SocketNotFoundResponse'
        '429':
          $ref: '#/components/responses/SocketTooManyRequestsResponse'
      x-readme: {}
    post:
      tags:
      - repos
      summary: Update repository
      operationId: updateOrgRepo
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: repo_slug
        in: path
        required: true
        description: The slug of the repository
        schema:
          type: string
      - name: workspace
        in: query
        required: false
        description: The workspace of the repository
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                name:
                  type: string
                  description: The name of the repository
                  default: ''
                description:
                  type:
                  - string
                  - 'null'
                  description: The description of the repository
                  default: ''
                homepage:
                  type:
                  - string
                  - 'null'
                  description: The homepage URL of the repository
                  default: ''
                visibility:
                  type: string
                  enum:
                  - public
                  - private
                  description: The visibility of the repository
                  default: private
                archived:
                  type: boolean
                  default: false
                  description: Whether the repository is archived or not
                default_branch:
                  type:
                  - string
                  - 'null'
                  description: The default branch of the repository
                  default: main
                workspace:
                  type: string
                  description: The workspace of the repository
                  default: ''
              description: ''
        required: false
      security:
      - bearerAuth:
        - repo:update
      - basicAuth:
        - repo:update
      description: 'Update details of an existing repository.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo:update'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    description: The ID of the repository
                    default: ''
                  created_at:
                    type: string
                    description: The creation date of the repository
                    default: ''
                  updated_at:
                    type: string
                    description: The last update date of the repository
                    default: ''
                  html_url:
                    type: string
                    description: The URL to the repository dashboard page
                    default: ''
                  head_full_scan_id:
                    type:
                    - string
                    - 'null'
                    description: The ID of the head full scan of the repository
                    default: ''
                  integration_meta:
                    anyOf:
                    - type: object
                      additionalProperties: false
                      properties:
                        type:
                          type: string
                          enum:
                          - github
                        value:
                          type: object
                          additionalProperties: false
                          description: ''
                          properties:
                            installation_id:
                              type: string
                              description: The GitHub installation_id of the active associated Socket GitHub App
                              default: ''
                            installation_login:
                              type: string
                              description: The GitHub login name that the active Socket GitHub App installation is installed to
                              default: ''
                            repo_name:
                              type:
                              - string
                              - 'null'
                              description: The name of the associated GitHub repo.
                              default: ''
                            repo_id:
                              type:
                              - string
                              - 'null'
                              description: The id of the associated GitHub repo.
                              default: ''
                          required:
                          - installation_id
                          - installation_login
                          - repo_id
                          - repo_name
                  slug:
                    type: string
                    description: The slug of the repository.
                    default: ''
                  name:
                    type: string
                    description: The name of the repository
       

# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/socket/refs/heads/main/openapi/socket-repos-api-openapi.yml