| `email` | string | yes | Public email address of the user |
| `size` | integer | no | Single pixel dimension (since images are squares). Only used for avatar lookups at `Gravatar` or at the configured `Libravatar` server |
| `email` | string | yes | Public email address of the user. |
| `size` | integer | no | Single pixel dimension (since images are squares). Only used for avatar lookups at `Gravatar` or at the configured `Libravatar` server. |
| `id` | integer | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. |
| `branch` | string | yes | Name of the branch. |
| `ref` | string | yes | Branch name or commit SHA to create branch from. |
| Attribute | Type | Required | Description |
Example request:
| --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `branch` | string | yes | The name of the branch |
| `ref` | string | yes | The branch name or commit SHA to create branch from |
```bash
```sh
curl --request POST --header"PRIVATE-TOKEN: <your_access_token>""https://gitlab.example.com/api/v4/projects/5/repository/branches?branch=newbranch&ref=master"
curl --request POST --header"PRIVATE-TOKEN: <your_access_token>"https://gitlab.example.com/api/v4/projects/5/repository/branches?branch=newbranch&ref=master
```
```
Example response:
Example response:
...
@@ -247,36 +177,47 @@ Example response:
...
@@ -247,36 +177,47 @@ Example response:
## Delete repository branch
## Delete repository branch
```
Delete a branch from the repository.
NOTE: **Note:**
In the case of an error, an explanation message is provided.
```text
DELETE /projects/:id/repository/branches/:branch
DELETE /projects/:id/repository/branches/:branch
```
```
| Attribute | Type | Required | Description |
Parameters:
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| Attribute | Type | Required | Description |
| `branch` | string | yes | The name of the branch |