v0

v0 git API

The git API from v0 — 8 operation(s) for git.

OpenAPI Specification

v0-git-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: v0 App agent git API
  version: '0'
  description: Full stack vibe coding API
  termsOfService: https://vercel.com/legal/api-terms
servers:
- url: https://api.v0.dev/v1
tags:
- name: git
paths:
  /git/{org}/repos:
    get:
      operationId: git.findRepos
      tags:
      - git
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: true
                    value:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            description: The name of the repository.
                          updatedAt:
                            type: string
                            description: ISO timestamp of last update.
                          url:
                            type: string
                            description: The URL of the repository.
                        required:
                        - name
                        - updatedAt
                        - url
                        additionalProperties: false
                  required:
                  - ok
                  - value
                  additionalProperties: false
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: false
                    error:
                      type: object
                      properties:
                        error:
                          type: string
                        statusCode:
                          type: number
                        errorCode:
                          type: string
                      required:
                      - error
                      - statusCode
                      - errorCode
                      additionalProperties: false
                  required:
                  - ok
                  - error
                  additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadTooLargeError'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
        description: The namespace ID (organization or user).
      - name: search
        in: query
        required: false
        schema:
          description: Search query to filter repositories.
          type: string
        description: Search query to filter repositories.
      security:
      - apiKey: []
  /git/{org}/{repo}:
    get:
      operationId: git.{org}.{repo}.find
      tags:
      - git
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: true
                    value:
                      type: object
                      properties:
                        hasWritePermission:
                          type: boolean
                          description: Whether the user has write permission to the repository.
                        defaultBranch:
                          type: string
                          description: The default branch of the repository.
                        repoId:
                          type: number
                          description: The GitHub repository ID.
                        size:
                          type: number
                          description: The size of the repository in KB.
                        language:
                          description: The primary language of the repository.
                          type:
                          - string
                          - 'null'
                        description:
                          description: The repository description.
                          type:
                          - string
                          - 'null'
                        topics:
                          type: array
                          items:
                            type: string
                          description: Repository topics/tags.
                      required:
                      - hasWritePermission
                      - defaultBranch
                      - repoId
                      - size
                      - language
                      - description
                      - topics
                      additionalProperties: false
                  required:
                  - ok
                  - value
                  additionalProperties: false
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: false
                    error:
                      type: object
                      properties:
                        error:
                          type: string
                        statusCode:
                          type: number
                        errorCode:
                          type: string
                      required:
                      - error
                      - statusCode
                      - errorCode
                      additionalProperties: false
                  required:
                  - ok
                  - error
                  additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadTooLargeError'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
        description: The namespace (organization or user).
      - name: repo
        in: path
        required: true
        schema:
          type: string
        description: The repository name.
      security:
      - apiKey: []
  /git/{org}/{repo}/branches:
    get:
      operationId: git.findBranches
      tags:
      - git
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: true
                    value:
                      type: array
                      items:
                        type: string
                      description: List of branch names in the repository.
                  required:
                  - ok
                  - value
                  additionalProperties: false
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: false
                    error:
                      type: object
                      properties:
                        error:
                          type: string
                        statusCode:
                          type: number
                        errorCode:
                          type: string
                      required:
                      - error
                      - statusCode
                      - errorCode
                      additionalProperties: false
                  required:
                  - ok
                  - error
                  additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadTooLargeError'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
        description: The namespace (organization or user).
      - name: repo
        in: path
        required: true
        schema:
          type: string
        description: The repository name.
      - name: search
        in: query
        required: false
        schema:
          description: Search query to filter branches.
          type: string
        description: Search query to filter branches.
      security:
      - apiKey: []
  /git/{org}/{repo}/projects:
    get:
      operationId: git.findProjects
      tags:
      - git
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: true
                    value:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            description: The name from package.json.
                            type: string
                          framework:
                            type: string
                            enum:
                            - next
                            - nuxt
                            - vite
                            - svelte
                            - astro
                            - services
                            - other
                            description: The detected framework.
                          path:
                            type: string
                            description: The path to the project directory.
                          size:
                            description: The size of the package.json in bytes.
                            type: number
                          dependencies:
                            description: List of dependencies.
                            type: array
                            items:
                              type: string
                        required:
                        - framework
                        - path
                        additionalProperties: false
                  required:
                  - ok
                  - value
                  additionalProperties: false
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: false
                    error:
                      type: object
                      properties:
                        error:
                          type: string
                        statusCode:
                          type: number
                        errorCode:
                          type: string
                      required:
                      - error
                      - statusCode
                      - errorCode
                      additionalProperties: false
                  required:
                  - ok
                  - error
                  additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadTooLargeError'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
        description: The namespace (organization or user).
      - name: repo
        in: path
        required: true
        schema:
          type: string
        description: The repository name.
      - name: branch
        in: query
        required: false
        schema:
          description: The branch to detect projects from.
          type: string
        description: The branch to detect projects from.
      security:
      - apiKey: []
  /git/projects:
    get:
      operationId: git.projects.find
      tags:
      - git
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: true
                    value:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: The Vercel project ID.
                          name:
                            type: string
                            description: The name of the Vercel project.
                          accountId:
                            type: string
                            description: The account ID that owns the project.
                          createdAt:
                            type: number
                            description: Timestamp when the project was created.
                          updatedAt:
                            type: number
                            description: Timestamp when the project was last updated.
                          framework:
                            description: The framework detected for the project.
                            type:
                            - string
                            - 'null'
                          latestDeployments:
                            description: Recent deployments for the project.
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: The deployment ID.
                                createdAt:
                                  type: number
                                  description: Timestamp when the deployment was created.
                                url:
                                  type: string
                                  description: The deployment URL.
                                alias:
                                  type: array
                                  items:
                                    type: string
                                  description: Aliases for this deployment.
                              required:
                              - id
                              - createdAt
                              - url
                              - alias
                              additionalProperties: false
                        required:
                        - id
                        - name
                        - accountId
                        - createdAt
                        - updatedAt
                        additionalProperties: false
                  required:
                  - ok
                  - value
                  additionalProperties: false
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: false
                    error:
                      type: object
                      properties:
                        error:
                          type: string
                        statusCode:
                          type: number
                        errorCode:
                          type: string
                      required:
                      - error
                      - statusCode
                      - errorCode
                      additionalProperties: false
                  required:
                  - ok
                  - error
                  additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadTooLargeError'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: namespace
        in: query
        required: true
        schema:
          type: string
          description: The namespace (organization or user).
        description: The namespace (organization or user).
      - name: repo
        in: query
        required: true
        schema:
          type: string
          description: The repository name.
        description: The repository name.
      security:
      - apiKey: []
  /git/namespaces:
    get:
      operationId: git.namespaces.find
      tags:
      - git
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: true
                    value:
                      type: object
                      properties:
                        userNamespace:
                          description: User's personal GitHub namespace.
                          type: object
                          properties:
                            id:
                              description: The namespace ID.
                              type:
                              - string
                              - number
                            installationId:
                              description: GitHub App installation ID.
                              type: number
                            isAccessRestricted:
                              description: Whether access is restricted.
                              type: boolean
                            name:
                              description: Display name of the namespace.
                              type: string
                            ownerType:
                              type: string
                              enum:
                              - team
                              - user
                              description: Whether this is a team or user namespace.
                            provider:
                              type: string
                              description: Git provider (e.g., "github").
                            requireReauth:
                              description: Whether reauthentication is required.
                              type: boolean
                            slug:
                              type: string
                              description: The namespace slug/username.
                          required:
                          - id
                          - ownerType
                          - provider
                          - slug
                          additionalProperties: false
                        orgNamespaces:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: The namespace ID.
                                type:
                                - string
                                - number
                              installationId:
                                description: GitHub App installation ID.
                                type: number
                              isAccessRestricted:
                                description: Whether access is restricted.
                                type: boolean
                              name:
                                description: Display name of the namespace.
                                type: string
                              ownerType:
                                type: string
                                enum:
                                - team
                                - user
                                description: Whether this is a team or user namespace.
                              provider:
                                type: string
                                description: Git provider (e.g., "github").
                              requireReauth:
                                description: Whether reauthentication is required.
                                type: boolean
                              slug:
                                type: string
                                description: The namespace slug/username.
                            required:
                            - id
                            - ownerType
                            - provider
                            - slug
                            additionalProperties: false
                          description: Organization namespaces the user has access to.
                        verifiedGitHubUser:
                          description: Verified GitHub user information (only set if user.verified is true).
                          type: object
                          properties:
                            createdAt:
                              description: Unix timestamp of creation.
                              type: number
                            email:
                              description: User email address.
                              type:
                              - string
                              - 'null'
                            login:
                              description: GitHub username.
                              type: string
                            name:
                              description: Display name.
                              type:
                              - string
                              - 'null'
                            updatedAt:
                              description: Unix timestamp of last update.
                              type: number
                            userId:
                              description: GitHub user ID.
                              type: number
                            verified:
                              description: Whether the user is verified.
                              type: boolean
                          additionalProperties: false
                        user:
                          description: GitHub user information.
                          type: object
                          properties:
                            createdAt:
                              description: Unix timestamp of creation.
                              type: number
                            email:
                              description: User email address.
                              type:
                              - string
                              - 'null'
                            login:
                              description: GitHub username.
                              type: string
                            name:
                              description: Display name.
                              type:
                              - string
                              - 'null'
                            updatedAt:
                              description: Unix timestamp of last update.
                              type: number
                            userId:
                              description: GitHub user ID.
                              type: number
                            verified:
                              description: Whether the user is verified.
                              type: boolean
                          additionalProperties: false
                      required:
                      - orgNamespaces
                      additionalProperties: false
                  required:
                  - ok
                  - value
                  additionalProperties: false
                - type: object
                  properties:
                    ok:
                      type: boolean
                      const: false
                    error:
                      type: object
                      properties:
                        error:
                          type: string
                        statusCode:
                          type: number
                        errorCode:
                          type: string
                      required:
                      - error
                      - statusCode
                      - errorCode
                      additionalProperties: false
                  required:
                  - ok
                  - error
                  additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadTooLargeError'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
  

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