TrylleDocs
API ReferenceOpenAPI 3 reference

Account

GET
/v1/accounts/installable

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/v1/accounts/installable"
"abc123"
GET
/v1/inbox/unread

List the authenticated viewer's unread, non-archived inbox notifications.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer

Maximum unread notifications to return. The total count is not limited.

Formatint64
Range1 <= value <= 100
Default20

Response Body

application/json

curl -X GET "https://example.com/v1/inbox/unread?limit=2"
{  "items": [    {      "actorLogin": "abc123",      "draft": false,      "number": 1,      "owner": "aa",      "provider": "aa",      "reason": "aa",      "repo": "aa",      "state": "abc123",      "subjectId": "aa",      "targetKind": "issue",      "title": "abc123",      "updatedAt": "aa"    }  ],  "total": 1}
GET
/v1/me/org-invitations

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/v1/me/org-invitations"
"abc123"
POST
/v1/me/org-invitations/{invite_id}/accept

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

invite_id*integer

Pending invitation id.

Formatint64

Response Body

application/json

curl -X POST "https://example.com/v1/me/org-invitations/1/accept"
"abc123"
POST
/v1/me/org-invitations/{invite_id}/decline

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

invite_id*integer

Pending invitation id.

Formatint64

Response Body

application/json

curl -X POST "https://example.com/v1/me/org-invitations/1/decline"
"abc123"
GET
/v1/me/repo-invitations

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/v1/me/repo-invitations"
"abc123"
POST
/v1/me/repo-invitations/{invite_id}/accept

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

invite_id*integer

Pending repository invitation id.

Formatint64

Response Body

application/json

curl -X POST "https://example.com/v1/me/repo-invitations/1/accept"
"abc123"
POST
/v1/me/repo-invitations/{invite_id}/decline

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

invite_id*integer

Pending repository invitation id.

Formatint64

Response Body

application/json

curl -X POST "https://example.com/v1/me/repo-invitations/1/decline"
"abc123"
GET
/v1/users/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Platform user id. Must match the authenticated viewer id.

Response Body

application/json

curl -X GET "https://example.com/v1/users/abc123"
"abc123"
POST
/v1/users/{login}/git-ssh-token/rotate

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login whose Git SSH token should be rotated.

Length1 <= length

Response Body

application/json

curl -X POST "https://example.com/v1/users/aa/git-ssh-token/rotate"
"abc123"
GET
/v1/viewer

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/v1/viewer"
{  "admin": false,  "avatarUrl": "abc123",  "bio": "abc123",  "company": "abc123",  "email": "abc123",  "id": "abc123",  "location": "abc123",  "login": "abc123",  "name": "abc123",  "pronouns": "abc123",  "settings": "abc123",  "website": "abc123"}
PATCH
/v1/viewer

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/v1/viewer" \  -H "Content-Type: application/json" \  -d '{    "bio": "aaa",    "company": "aaa",    "location": "aaa",    "name": "aaa",    "pronouns": "aaa",    "website": "aaa"  }'
{  "admin": false,  "avatarUrl": "abc123",  "bio": "abc123",  "company": "abc123",  "email": "abc123",  "id": "abc123",  "location": "abc123",  "login": "abc123",  "name": "abc123",  "pronouns": "abc123",  "settings": "abc123",  "website": "abc123"}
DELETE
/v1/viewer

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X DELETE "https://example.com/v1/viewer"
"abc123"
DELETE
/v1/viewer/avatar

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X DELETE "https://example.com/v1/viewer/avatar"
{  "admin": false,  "avatarUrl": "abc123",  "bio": "abc123",  "company": "abc123",  "email": "abc123",  "id": "abc123",  "location": "abc123",  "login": "abc123",  "name": "abc123",  "pronouns": "abc123",  "settings": "abc123",  "website": "abc123"}
PUT
/v1/viewer/avatar

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/v1/viewer/avatar" \  -H "Content-Type: application/json" \  -d '{    "image": "aa"  }'
{  "admin": false,  "avatarUrl": "abc123",  "bio": "abc123",  "company": "abc123",  "email": "abc123",  "id": "abc123",  "location": "abc123",  "login": "abc123",  "name": "abc123",  "pronouns": "abc123",  "settings": "abc123",  "website": "abc123"}
POST
/v1/viewer/provision

Provision or refresh the authenticated viewer and their Forgejo identity.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X POST "https://example.com/v1/viewer/provision"
{  "admin": false,  "avatarUrl": "abc123",  "bio": "abc123",  "company": "abc123",  "email": "abc123",  "id": "abc123",  "location": "abc123",  "login": "abc123",  "name": "abc123",  "pronouns": "abc123",  "settings": "abc123",  "website": "abc123"}
PATCH
/v1/viewer/settings

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/v1/viewer/settings" \  -H "Content-Type: application/json" \  -d '{    "settings": "abc123"  }'
{  "admin": false,  "avatarUrl": "abc123",  "bio": "abc123",  "company": "abc123",  "email": "abc123",  "id": "abc123",  "location": "abc123",  "login": "abc123",  "name": "abc123",  "pronouns": "abc123",  "settings": "abc123",  "website": "abc123"}
POST
/v1/viewer/username

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/viewer/username" \  -H "Content-Type: application/json" \  -d '{    "newLogin": "aa"  }'
{  "admin": false,  "avatarUrl": "abc123",  "bio": "abc123",  "company": "abc123",  "email": "abc123",  "id": "abc123",  "location": "abc123",  "login": "abc123",  "name": "abc123",  "pronouns": "abc123",  "settings": "abc123",  "website": "abc123"}