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"
}
'Collaborators and deploy keys
Add a collaborator
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
Personal access token. Use format: token {YOUR_ACCESS_TOKEN}
Path Parameters
Repository owner
Repository name
Collaborator username
Body
application/json
Available options:
read, write, admin Response
Collaborator has been added.