GitLab CI/CD access_requests API

Operations related to access requests

Operations 8

GET /api/v4/groups/{id}/access_requests Gets a list of access requests for a group. #
POST /api/v4/groups/{id}/access_requests Requests access for the authenticated user to a group. #
PUT /api/v4/groups/{id}/access_requests/{user_id}/approve Approves an access request for the given user. #
DELETE /api/v4/groups/{id}/access_requests/{user_id} Denies an access request for the given user. #
GET /api/v4/projects/{id}/access_requests Gets a list of access requests for a project. #
POST /api/v4/projects/{id}/access_requests Requests access for the authenticated user to a project. #
PUT /api/v4/projects/{id}/access_requests/{user_id}/approve Approves an access request for the given user. #
DELETE /api/v4/projects/{id}/access_requests/{user_id} Denies an access request for the given user. #

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/gitlab-ci-access-requests-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

gitlab-ci-access-requests-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab Access Requests API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: access_requests
  description: Operations related to access requests
paths:
  /api/v4/groups/{id}/access_requests:
    get:
      summary: Gets a list of access requests for a group.
      description: This feature was introduced in GitLab 8.11.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group owned by the authenticated user
        required: true
        schema:
          type: string
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: Gets a list of access requests for a group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_AccessRequester'
      tags:
      - access_requests
      operationId: getApiV4GroupsIdAccessRequests
    post:
      summary: Requests access for the authenticated user to a group.
      description: This feature was introduced in GitLab 8.11.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group owned by the authenticated user
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Requests access for the authenticated user to a group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_AccessRequester'
      tags:
      - access_requests
      operationId: postApiV4GroupsIdAccessRequests
  /api/v4/groups/{id}/access_requests/{user_id}/approve:
    put:
      summary: Approves an access request for the given user.
      description: This feature was introduced in GitLab 8.11.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group owned by the authenticated user
        required: true
        schema:
          type: string
      - in: path
        name: user_id
        description: The user ID of the access requester
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '201':
          description: Approves an access request for the given user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Member'
      tags:
      - access_requests
      operationId: putApiV4GroupsIdAccessRequestsUserIdApprove
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4GroupsIdAccessRequestsUserIdApprove'
        required: true
  /api/v4/groups/{id}/access_requests/{user_id}:
    delete:
      summary: Denies an access request for the given user.
      description: This feature was introduced in GitLab 8.11.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group owned by the authenticated user
        required: true
        schema:
          type: string
      - in: path
        name: user_id
        description: The user ID of the access requester
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '204':
          description: Denies an access request for the given user.
      tags:
      - access_requests
      operationId: deleteApiV4GroupsIdAccessRequestsUserId
  /api/v4/projects/{id}/access_requests:
    get:
      summary: Gets a list of access requests for a project.
      description: This feature was introduced in GitLab 8.11.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: Gets a list of access requests for a project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_AccessRequester'
      tags:
      - access_requests
      operationId: getApiV4ProjectsIdAccessRequests
    post:
      summary: Requests access for the authenticated user to a project.
      description: This feature was introduced in GitLab 8.11.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Requests access for the authenticated user to a project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_AccessRequester'
      tags:
      - access_requests
      operationId: postApiV4ProjectsIdAccessRequests
  /api/v4/projects/{id}/access_requests/{user_id}/approve:
    put:
      summary: Approves an access request for the given user.
      description: This feature was introduced in GitLab 8.11.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      - in: path
        name: user_id
        description: The user ID of the access requester
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '201':
          description: Approves an access request for the given user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Member'
      tags:
      - access_requests
      operationId: putApiV4ProjectsIdAccessRequestsUserIdApprove
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4ProjectsIdAccessRequestsUserIdApprove'
        required: true
  /api/v4/projects/{id}/access_requests/{user_id}:
    delete:
      summary: Denies an access request for the given user.
      description: This feature was introduced in GitLab 8.11.
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        required: true
        schema:
          type: string
      - in: path
        name: user_id
        description: The user ID of the access requester
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '204':
          description: Denies an access request for the given user.
      tags:
      - access_requests
      operationId: deleteApiV4ProjectsIdAccessRequestsUserId
components:
  schemas:
    API_Entities_Member:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        username:
          type: string
          example: admin
        public_email:
          type: string
          example: john@example.com
        name:
          type: string
          example: Administrator
        state:
          type: string
          example: active
        locked:
          type: boolean
        avatar_url:
          type: string
          example: https://gravatar.com/avatar/1
        avatar_path:
          type: string
          example: /user/avatar/28/The-Big-Lebowski-400-400.png
        custom_attributes:
          type: array
          items:
            $ref: '#/components/schemas/API_Entities_CustomAttribute'
        web_url:
          type: string
          example: https://gitlab.example.com/root
        access_level:
          type: string
        created_at:
          type: string
        created_by:
          $ref: '#/components/schemas/API_Entities_UserBasic'
        expires_at:
          type: string
        group_saml_identity:
          $ref: '#/components/schemas/API_Entities_Identity'
        group_scim_identity:
          $ref: '#/components/schemas/API_Entities_ScimIdentity'
        email:
          type: string
        is_using_seat:
          type: string
        override:
          type: string
        membership_state:
          type: string
        member_role:
          $ref: '#/components/schemas/API_Entities_MemberRole'
      required:
      - id
      - username
      - public_email
      - name
      - state
      - locked
      - avatar_url
      - web_url
      - access_level
      - created_at
      - expires_at
      - membership_state
      description: API_Entities_Member model
    API_Entities_CustomAttribute:
      type: object
      properties:
        key:
          type: string
          example: foo
        value:
          type: string
          example: bar
      required:
      - key
      - value
      description: API_Entities_CustomAttribute model
    putApiV4ProjectsIdAccessRequestsUserIdApprove:
      type: object
      properties:
        access_level:
          type: integer
          format: int32
          description: 'A valid access level (defaults: `30`, the Developer role)'
          default: 30
      description: Approves an access request for the given user.
    API_Entities_UserBasic:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        username:
          type: string
          example: admin
        public_email:
          type: string
          example: john@example.com
        name:
          type: string
          example: Administrator
        state:
          type: string
          example: active
        locked:
          type: boolean
        avatar_url:
          type: string
          example: https://gravatar.com/avatar/1
        avatar_path:
          type: string
          example: /user/avatar/28/The-Big-Lebowski-400-400.png
        custom_attributes:
          type: array
          items:
            $ref: '#/components/schemas/API_Entities_CustomAttribute'
        web_url:
          type: string
          example: https://gitlab.example.com/root
      required:
      - id
      - username
      - public_email
      - name
      - state
      - locked
      - avatar_url
      - web_url
      description: API_Entities_UserBasic model
    putApiV4GroupsIdAccessRequestsUserIdApprove:
      type: object
      properties:
        access_level:
          type: integer
          format: int32
          description: 'A valid access level (defaults: `30`, the Developer role)'
          default: 30
      description: Approves an access request for the given user.
    API_Entities_AccessRequester:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        username:
          type: string
          example: admin
        public_email:
          type: string
          example: john@example.com
        name:
          type: string
          example: Administrator
        state:
          type: string
          example: active
        locked:
          type: boolean
        avatar_url:
          type: string
          example: https://gravatar.com/avatar/1
        avatar_path:
          type: string
          example: /user/avatar/28/The-Big-Lebowski-400-400.png
        custom_attributes:
          type: array
          items:
            $ref: '#/components/schemas/API_Entities_CustomAttribute'
        web_url:
          type: string
          example: https://gitlab.example.com/root
        requested_at:
          type: string
      required:
      - id
      - username
      - public_email
      - name
      - state
      - locked
      - avatar_url
      - web_url
      - requested_at
      description: API_Entities_AccessRequester model
    API_Entities_MemberRole:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 2
        group_id:
          type: integer
          format: int32
          example: 2
        name:
          type: text
          example: Custom guest
        description:
          type: text
          example: Guest user who can also read_code
        base_access_level:
          type: integer
          format: int32
          enum:
          - 5
          - 10
          - 15
          - 20
          - 30
          - 40
          example: 40
        apply_security_scan_profiles:
          type: boolean
        admin_merge_request:
          type: boolean
        archive_project:
          type: boolean
        remove_project:
          type: boolean
        remove_group:
          type: boolean
        manage_security_policy_link:
          type: boolean
        admin_compliance_framework:
          type: boolean
        admin_cicd_variables:
          type: boolean
        manage_deploy_tokens:
          type: boolean
        manage_group_access_tokens:
          type: boolean
        admin_group_member:
          type: boolean
        admin_integrations:
          type: boolean
        manage_merge_request_settings:
          type: boolean
        manage_project_access_tokens:
          type: boolean
        admin_protected_branch:
          type: boolean
        admin_protected_environments:
          type: boolean
        manage_protected_tags:
          type: boolean
        admin_push_rules:
          type: boolean
        admin_runners:
          type: boolean
        admin_security_attributes:
          type: boolean
        admin_terraform_state:
          type: boolean
        admin_vulnerability:
          type: boolean
        admin_web_hook:
          type: boolean
        read_compliance_dashboard:
          type: boolean
        read_security_scan_profiles:
          type: boolean
        read_virtual_registry:
          type: boolean
        read_admin_cicd:
          type: boolean
        read_crm_contact:
          type: boolean
        read_dependency:
          type: boolean
        read_admin_groups:
          type: boolean
        read_admin_projects:
          type: boolean
        read_code:
          type: boolean
        read_runners:
          type: boolean
        read_security_attribute:
          type: boolean
        read_admin_subscription:
          type: boolean
        read_admin_monitoring:
          type: boolean
        read_admin_users:
          type: boolean
        read_vulnerability:
          type: boolean
      required:
      - id
      - group_id
      - name
      - description
      - base_access_level
      - apply_security_scan_profiles
      - admin_merge_request
      - archive_project
      - remove_project
      - remove_group
      - manage_security_policy_link
      - admin_compliance_framework
      - admin_cicd_variables
      - manage_deploy_tokens
      - manage_group_access_tokens
      - admin_group_member
      - admin_integrations
      - manage_merge_request_settings
      - manage_project_access_tokens
      - admin_protected_branch
      - admin_protected_environments
      - manage_protected_tags
      - admin_push_rules
      - admin_runners
      - admin_security_attributes
      - admin_terraform_state
      - admin_vulnerability
      - admin_web_hook
      - read_compliance_dashboard
      - read_security_scan_profiles
      - read_virtual_registry
      - read_admin_cicd
      - read_crm_contact
      - read_dependency
      - read_admin_groups
      - read_admin_projects
      - read_code
      - read_runners
      - read_security_attribute
      - read_admin_subscription
      - read_admin_monitoring
      - read_admin_users
      - read_vulnerability
    API_Entities_Identity:
      type: object
      properties:
        provider:
          type: string
        extern_uid:
          type: string
        saml_provider_id:
          type: string
      required:
      - provider
      - extern_uid
      - saml_provider_id
    API_Entities_ScimIdentity:
      type: object
      properties:
        extern_uid:
          type: string
        group_id:
          type: string
        active:
          type: string
      required:
      - extern_uid
      - group_id
      - active
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query