Unable to update repo via API due to repo ownership

Good day, friends!

tl;dr:

When trying to update a repo via the API I receive an error back:

{"message":"user should be an owner or a collaborator with admin write of a repository","url":"https://gitea.mydomain.com/api/swagger"}

Even though the API token used is by a user who is in the “Owner” group on the organization/repo

Deeper Context:

I have a Jenkins pipeline that, using the Gitea API and an access token tied to a user called jenkins, creates a repository in an organization based on a template (the template also exists in the same organization). This operation happens just fine, the repo is created no problem.

Later in the pipeline (with the same jenkins user and API token) I want to go back and update some information on the repo based on other bits of data that have been collected from earlier pipeline steps. For example, I want to set the repo’s avatar

When I make the request, I receive this error in response:

{"message":"user should be an owner or a collaborator with admin write of a repository","url":"https://gitea.mydomain.com/api/swagger"}

But I’m a little confused why this happens, I believe my jenkins user is an “owner”, for example here’s the organization (services) members:

jenkins is listed as an owner. In the template repo (that the other repos are created based off), it shows that the Owners team (which jenkins is a part of) is set to be a team. (I was hoping to upload a screenshot here to prove it out, but as a new user I can’t upload more than one media item - but when I navigate to the repository → settings → Collaborators it shows Owners as one of the Teams)

Similarly, if I look at a test repo I created, it also shows the same ownership permissions (again, can’t upload more than one media item, but same thing Repository → Settings → Collaborators shows Owners as one of the Teams on the repo)

So my jenkins user (I think) is a repo “owner”. Is there any other step I need to do to get the permissioning to be happy with the new repo and allow updates to it?

I’m on Gitea version 1.23.8 if it makes any difference