Skip to main content
PUT
/
repos
/
{owner}
/
{repo}
/
collaborators
/
{collaborator}
Add a collaborator
curl --request PUT \
  --url https://gogs.example.com/api/v1/repos/{owner}/{repo}/collaborators/{collaborator} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "permission": "write"
}
'

Authorizations

Authorization
string
header
required

Personal access token. Use format: token {YOUR_ACCESS_TOKEN}

Path Parameters

owner
string
required

Repository owner

repo
string
required

Repository name

collaborator
string
required

Collaborator username

Body

application/json
permission
enum<string>
default:write
Available options:
read,
write,
admin

Response

Collaborator has been added.