Snippets

Create a snippet for a workspace

Identical to /snippets, except that the new snippet will be created under the workspace specified in the path parameter {workspace}.

post/snippets/{workspace}

Request

  • Base URL
    https://api.bitbucket.org/2.0
  • Auth
    • OAuth 2
      Authorization code: https://bitbucket.org/site/oauth2/authorize
      Token URL: https://bitbucket.org/site/oauth2/access_token scopes: snippet:write
    • or HTTP basic
    • or API key in header Authorization

Request body

typestring required
idinteger
titlestring
scm'git'

The DVCS used to store the snippet.

created_onstring date-time
updated_onstring date-time
is_privateboolean

Response

The newly created snippet object.

typestring required
idinteger
titlestring
scm'git'

The DVCS used to store the snippet.

created_onstring date-time
updated_onstring date-time
is_privateboolean

Changes

No recorded changes to this operation across all 23 revisions of this API.