Skip to main content

Create git repository

POST 

/v2/integrations/git/:providerId/create-repo

Creates a repository through a connected git account and commits the initial files into it, either the given files or the files of an Actor template archive (templateArchiveUrl).

Request

Path Parameters

    providerId string required

    The connected git account to use: github-app for the GitHub App, or the ID of a connected GitLab or Bitbucket integration, as returned by Get git provider integrations.


    Example: github-app

Bodyrequired

  • workspace string required

    Where to create the repository, as the id of one of the provider's workspaces. On GitLab, this is the numeric namespace ID.


    Example: janedoe
  • repoName string required
    Example: my-actor
  • isPrivate boolean required
    Example: true
  • files object[]

    Files to commit as the initial commit. Can't be combined with templateArchiveUrl.

    • path string required
      Example: src/main.js
    • content string required
      Example: console.log('Hello');
    • encoding string required

      Possible values: [utf-8, base64]


      Example: utf-8
  • templateArchiveUrl string

    URL of an Actor template archive whose files are committed as the initial commit. Can't be combined with files.


    Example: https://github.com/apify/actor-templates/blob/master/dist/templates/js-start.zip?raw=true

Status 201

Response Headers
    {
    "data": {
    "sshUrl": "git@github.com:janedoe/my-actor.git",
    "httpsUrl": "https://github.com/janedoe/my-actor.git",
    "htmlUrl": "https://github.com/janedoe/my-actor"
    }
    }