Skip to content
Navigation

createRepo

Create an empty repo in the org and answer it. Takes createRepos on the org. The body is {"name": name, "idempotency_key": key}, with an optional "description" of at most 280 characters: retrying with the same key resumes the same creation, and a new key creates another repo. The repo's slug, its address in the org, comes from its name: lowercase ASCII letters and digits in words joined by single hyphens, at most 64 characters, so "Acme Standards" gives acme-standards. A name another repo in the org holds, in any case and archived or not, is refused with RepoNameTaken; a name whose slug another repo holds, such as one that differs only in punctuation, with RepoSlugTaken; and a name with no ASCII letter or digit with RepoNameNeedsLetterOrDigit.

POST
/orgs/{org_id}/repos

Path parameters

  • org_id
    string
    required
    pattern: ^org_[0-7][0-9a-hjkmnp-tv-z]{25}$

Request body JSON required

  • name
    string
    required
    minLength: 1
  • idempotency_key
    string
    required
    minLength: 1
  • description
    optional

    One of the following:

    • RepoDescription
    • null

Returns

201

Repo

JSON
  • id
    string
    required
    pattern: ^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • org_id
    string
    required
    pattern: ^org_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • name
    string
    required
    minLength: 1
  • description
    required

    One of the following:

    • string
    • null
  • slug
    string
    required
    maxLength: 64 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
  • creator_id
    string
    required
    pattern: ^(?:user|extension)_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • archived_at
    required

    One of the following:

    • string
    • null
  • archived_by_id
    required

    One of the following:

    • ActorId
    • null

400

InvalidRequest | RequestBodyTooDeep
JSON

One of the following:

  • InvalidRequestEncoded
    • _tag
      InvalidRequest
      required
    • part
      path
      or
      query
      or
      headers
      or
      body
      required
    • issues
      array of
      object
      required
      • path
        array of
        required

        One of the following:

        • string
        • integer
      • message
        string
        required
  • RequestBodyTooDeepEncoded
    • _tag
      RequestBodyTooDeep
      required
    • max_depth
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991

401

InvalidCredentials
JSON
  • _tag
    InvalidCredentials
    required

403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired
JSON

One of the following:

  • ForbiddenEncoded
    • _tag
      Forbidden
      required
    • message
      string
      required
  • ForbiddenOriginEncoded
    • _tag
      ForbiddenOrigin
      required
  • RequiresPersonalSessionEncoded
    • _tag
      RequiresPersonalSession
      required
  • RunBranchRequiredEncoded
    • _tag
      RunBranchRequired
      required
    • branch
      string
      required
      minLength: 1
    • message
      string
      required

404

OrgNotFound | RepoNotFound
JSON

One of the following:

  • OrgNotFoundEncoded
    • _tag
      OrgNotFound
      required
  • RepoNotFoundEncoded
    • _tag
      RepoNotFound
      required

409

RepoCreationConflict | RepoNameTaken | RepoSlugTaken
JSON

One of the following:

  • RepoCreationConflictEncoded
    • _tag
      RepoCreationConflict
      required
  • RepoNameTakenEncoded
    • _tag
      RepoNameTaken
      required
  • RepoSlugTakenEncoded
    • _tag
      RepoSlugTaken
      required
    • slug
      string
      required
      minLength: 1

413

RequestBodyTooLarge
JSON
  • _tag
    RequestBodyTooLarge
    required
  • max_bytes
    integer
    required
    maximum: 9007199254740991 · minimum: -9007199254740991

422

RepoNameNeedsLetterOrDigit
JSON
  • _tag
    RepoNameNeedsLetterOrDigit
    required

429

RateLimited
JSON
  • _tag
    RateLimited
    required

500

OrgFailure | RepoFailure
JSON

One of the following:

  • OrgFailureEncoded
    • _tag
      OrgFailure
      required
    • reason
      string
      required
  • RepoFailureEncoded
    • _tag
      RepoFailure
      required
    • reason
      string
      required

503

SessionUnavailable | RateLimitUnavailable
JSON

One of the following:

  • SessionUnavailableEncoded
    • _tag
      SessionUnavailable
      required
  • RateLimitUnavailableEncoded
    • _tag
      RateLimitUnavailable
      required

Type to search…

↑↓ navigate↵ selectEsc close