Socket repo-labels API

The repo-labels API from Socket — 5 operation(s) for repo-labels.

Operations 10

POST /orgs/{org_slug}/repos/labels/{label_id}/associate Associate repository label (beta) #
POST /orgs/{org_slug}/repos/labels Create repository label (beta) #
GET /orgs/{org_slug}/repos/labels List repository labels (beta) #
DELETE /orgs/{org_slug}/repos/labels/{label_id} Delete repository label (beta) #
GET /orgs/{org_slug}/repos/labels/{label_id} Get repository label (beta) #
PUT /orgs/{org_slug}/repos/labels/{label_id} Update repository label (beta) #
DELETE /orgs/{org_slug}/repos/labels/{label_id}/label-setting Delete repository label setting (beta) #
GET /orgs/{org_slug}/repos/labels/{label_id}/label-setting Get repository label setting (beta) #
PUT /orgs/{org_slug}/repos/labels/{label_id}/label-setting Update repository label setting (beta) #
POST /orgs/{org_slug}/repos/labels/{label_id}/disassociate Disassociate repository label (beta) #

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-repo-labels-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-repo-labels-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Specification of the Socket API endpoints
  title: Endpoints alerts Repo Labels API
  version: '0'
servers:
- url: https://api.socket.dev/v0
tags:
- name: repo-labels
paths:
  /orgs/{org_slug}/repos/labels/{label_id}/associate:
    post:
      tags:
      - repo-labels
      summary: Associate repository label (beta)
      operationId: associateOrgRepoLabel
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: label_id
        in: path
        required: true
        description: The ID of the label
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                repository_id:
                  type: string
                  description: The ID of the repository to associate with the label
                  default: ''
              description: ''
        required: false
      security:
      - bearerAuth:
        - repo-label:update
      - basicAuth:
        - repo-label:update
      description: 'Associate a repository label with a repository.


        Labels can be used to group and organize repositories and to apply security/license policies.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo-label:update'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  status:
                    type: string
                    description: Status of the operation
                    default: ''
                description: ''
          description: Associates a repository label with the specified repository. 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: {}
  /orgs/{org_slug}/repos/labels:
    post:
      tags:
      - repo-labels
      summary: Create repository label (beta)
      operationId: createOrgRepoLabel
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              description: ''
              properties:
                name:
                  type: string
                  description: The name of the label
                  default: ''
              required:
              - name
        required: true
      security:
      - bearerAuth:
        - repo-label:create
      - basicAuth:
        - repo-label:create
      description: 'Create a repository label.


        Labels can be used to group and organize repositories and to apply security/license policies.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo-label:create'
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    description: The ID of the label
                    default: ''
                  name:
                    type: string
                    description: The name of the label
                    default: ''
                  repository_ids:
                    type: array
                    items:
                      type: string
                      description: Repository ID
                      default: ''
                    description: The IDs of repositories this label is associated with
                  has_security_policy:
                    type: boolean
                    default: false
                    description: Whether the label has a security policy
                  has_license_policy:
                    type: boolean
                    default: false
                    description: Whether the label has a license policy
                description: ''
          description: Creates a new repository label for the specified organization. The authenticated user must be a member of the organization. Label names must be non-empty and less than 1000 characters.
        '400':
          $ref: '#/components/responses/SocketBadRequest'
        '401':
          $ref: '#/components/responses/SocketUnauthorized'
        '403':
          $ref: '#/components/responses/SocketForbidden'
        '404':
          $ref: '#/components/responses/SocketNotFoundResponse'
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                description: ''
                properties:
                  error:
                    type: object
                    additionalProperties: false
                    description: ''
                    properties:
                      message:
                        type: string
                        description: ''
                        default: ''
                      details:
                        type:
                        - object
                        - 'null'
                        description: ''
                        default: null
                    required:
                    - details
                    - message
                required:
                - error
          description: Conflict
        '429':
          $ref: '#/components/responses/SocketTooManyRequestsResponse'
      x-readme: {}
    get:
      tags:
      - repo-labels
      summary: List repository labels (beta)
      operationId: getOrgRepoLabelList
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - 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
      security:
      - bearerAuth:
        - repo-label:list
      - basicAuth:
        - repo-label:list
      description: 'Lists repository labels for the specified organization.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo-label: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 label
                          default: ''
                        name:
                          type: string
                          description: The name of the label
                          default: ''
                        repository_ids:
                          type: array
                          items:
                            type: string
                            description: Repository ID
                            default: ''
                          description: The IDs of repositories this label is associated with
                        has_security_policy:
                          type: boolean
                          default: false
                          description: Whether the label has a security policy
                        has_license_policy:
                          type: boolean
                          default: false
                          description: Whether the label has a license policy
                      description: ''
                    description: ''
                  nextPage:
                    type:
                    - integer
                    - 'null'
                    description: ''
                    default: 0
                required:
                - nextPage
                - results
          description: Lists repository labels 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: {}
  /orgs/{org_slug}/repos/labels/{label_id}:
    delete:
      tags:
      - repo-labels
      summary: Delete repository label (beta)
      operationId: deleteOrgRepoLabel
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: label_id
        in: path
        required: true
        description: The ID of the label
        schema:
          type: string
      security:
      - bearerAuth:
        - repo-label:delete
      - basicAuth:
        - repo-label:delete
      description: 'Delete a repository label and all of its associations (repositories, security policy, license policy, etc.).


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo-label:delete'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                description: ''
                properties:
                  status:
                    type: string
                    description: ''
                    default: ok
                required:
                - status
          description: Success
        '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: {}
    get:
      tags:
      - repo-labels
      summary: Get repository label (beta)
      operationId: getOrgRepoLabel
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: label_id
        in: path
        required: true
        description: The ID of the label
        schema:
          type: string
      security:
      - bearerAuth:
        - repo-label:list
      - basicAuth:
        - repo-label:list
      description: 'Retrieve a repository label associated with an organization and label ID.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo-label:list'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    description: The ID of the label
                    default: ''
                  name:
                    type: string
                    description: The name of the label
                    default: ''
                  repository_ids:
                    type: array
                    items:
                      type: string
                      description: Repository ID
                      default: ''
                    description: The IDs of repositories this label is associated with
                  has_security_policy:
                    type: boolean
                    default: false
                    description: Whether the label has a security policy
                  has_license_policy:
                    type: boolean
                    default: false
                    description: Whether the label has a license policy
                description: ''
          description: Returns a specific repository label 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: {}
    put:
      tags:
      - repo-labels
      summary: Update repository label (beta)
      operationId: updateOrgRepoLabel
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: label_id
        in: path
        required: true
        description: The ID of the label
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              description: ''
              properties:
                name:
                  type: string
                  description: The name of the label
                  default: ''
              required:
              - name
        required: true
      security:
      - bearerAuth:
        - repo-label:update
      - basicAuth:
        - repo-label:update
      description: 'Update a repository label name.


        Labels can be used to group and organize repositories and to apply security/license policies.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo-label:update'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    description: The ID of the label
                    default: ''
                  name:
                    type: string
                    description: The name of the label
                    default: ''
                  repository_ids:
                    type: array
                    items:
                      type: string
                      description: Repository ID
                      default: ''
                    description: The IDs of repositories this label is associated with
                  has_security_policy:
                    type: boolean
                    default: false
                    description: Whether the label has a security policy
                  has_license_policy:
                    type: boolean
                    default: false
                    description: Whether the label has a license policy
                description: ''
          description: Updates an existing repository label for the specified organization. The authenticated user must be a member of the organization. Label names must be non-empty and less than 1000 characters.
        '400':
          $ref: '#/components/responses/SocketBadRequest'
        '401':
          $ref: '#/components/responses/SocketUnauthorized'
        '403':
          $ref: '#/components/responses/SocketForbidden'
        '404':
          $ref: '#/components/responses/SocketNotFoundResponse'
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                description: ''
                properties:
                  error:
                    type: object
                    additionalProperties: false
                    description: ''
                    properties:
                      message:
                        type: string
                        description: ''
                        default: ''
                      details:
                        type:
                        - object
                        - 'null'
                        description: ''
                        default: null
                    required:
                    - details
                    - message
                required:
                - error
          description: Conflict
        '429':
          $ref: '#/components/responses/SocketTooManyRequestsResponse'
      x-readme: {}
  /orgs/{org_slug}/repos/labels/{label_id}/label-setting:
    delete:
      tags:
      - repo-labels
      summary: Delete repository label setting (beta)
      operationId: deleteOrgRepoLabelSetting
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: label_id
        in: path
        required: true
        description: The ID of the label
        schema:
          type: string
      - name: setting_key
        in: query
        required: true
        description: Setting key to delete from the repository label. Valid values include issueRules, issueRulesPolicyDefault, licensePolicy, and recentlyPublishedThresholdMs
        schema:
          type: string
      security:
      - bearerAuth:
        - repo-label:update
      - basicAuth:
        - repo-label:update
      description: 'Delete the setting (e.g. security/license policy) for a repository label.



        Note that repository label settings currently only support `issueRules`,

        `issueRulesPolicyDefault`, `licensePolicy`, and

        `recentlyPublishedThresholdMs`. A policy is considered "active"

        for a given repository label if the `issueRulesPolicyDefault` is

        set, and inactive when not set. `issueRules` can be used to further

        refine the alert triage strategy.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo-label:update'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                description: ''
                properties:
                  status:
                    type: string
                    description: ''
                    default: ok
                required:
                - status
          description: Success
        '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: {}
    get:
      tags:
      - repo-labels
      summary: Get repository label setting (beta)
      operationId: getOrgRepoLabelSetting
      parameters:
      - name: org_slug
        in: path
        required: true
        description: The slug of the organization
        schema:
          type: string
      - name: label_id
        in: path
        required: true
        description: The ID of the label
        schema:
          type: string
      - name: setting_key
        in: query
        required: true
        description: Setting key to query for in the repository label. Valid values include issueRules, issueRulesPolicyDefault, licensePolicy, and recentlyPublishedThresholdMs
        schema:
          type: string
      security:
      - bearerAuth:
        - repo-label:list
      - basicAuth:
        - repo-label:list
      description: 'Retrieve the setting (e.g. security/license policy) for a repository label.



        Note that repository label settings currently only support `issueRules`,

        `issueRulesPolicyDefault`, `licensePolicy`, and

        `recentlyPublishedThresholdMs`. A policy is considered "active"

        for a given repository label if the `issueRulesPolicyDefault` is

        set, and inactive when not set. `issueRules` can be used to further

        refine the alert triage strategy.


        This endpoint consumes 1 unit of your quota.


        This endpoint requires the following org token scopes:

        - repo-label:list'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  issueRules:
                    type:
                    - object
                    - 'null'
                    additionalProperties: false
                    properties:
                      gptSecurity:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for gptSecurity issues.
                        required:
                        - action
                      gptAnomaly:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for gptAnomaly issues.
                        required:
                        - action
                      gptMalware:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for gptMalware issues.
                        required:
                        - action
                      filesystemAccess:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for filesystemAccess issues.
                        required:
                        - action
                      networkAccess:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for networkAccess issues.
                        required:
                        - action
                      shellAccess:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for shellAccess issues.
                        required:
                        - action
                      debugAccess:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for debugAccess issues.
                        required:
                        - action
                      chromePermission:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for chromePermission issues.
                        required:
                        - action
                      chromeHostPermission:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for chromeHostPermission issues.
                        required:
                        - action
                      chromeWildcardHostPermission:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for chromeWildcardHostPermission issues.
                        required:
                        - action
                      chromeContentScript:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for chromeContentScript issues.
                        required:
                        - action
                      criticalCVE:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for criticalCVE issues.
                        required:
                        - action
                      cve:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for cve issues.
                        required:
                        - action
                      mediumCVE:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for mediumCVE issues.
                        required:
                        - action
                      mildCVE:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for mildCVE issues.
                        required:
                        - action
                      emptyPackage:
                        type: object
                        additionalProperties: false
                        description: ''
                        properties:
                          action:
                            type: string
                            enum:
                            - defer
                            - error
                            - warn
                            - monitor
                            - ignore
                            description: The action to take for emptyPackage issues.
                        required:
                        - action
                      trivialPackage:
                        type: object
                        additionalProperties: fa

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