---
title: "POST /v1/orgs/{orgId}/integrations/forgejo-token"
method: POST
path: "/v1/orgs/{orgId}/integrations/forgejo-token"
tags: ["Orgs", "Integrations"]
---

# POST /v1/orgs/{orgId}/integrations/forgejo-token

`POST /v1/orgs/{orgId}/integrations/forgejo-token`

## Request

- Base URL: `https://api.tessl.io`
- URL: `https://api.tessl.io/v1/orgs/{orgId}/integrations/forgejo-token`
- Auth: none declared
- TypeScript: <https://skmtc.dev/tessl/apis/tessl-api/docs/v1/orgs/:orgId/integrations/forgejo-token/post.ts> (a function with typed inputs; its response is checked against the schema)

Attaches a Forgejo personal access token as an integration to an organization. `instanceUrl` is the Forgejo instance (for example `https://codeberg.org`), which must be reachable over public https. With `orgName` the connection scans that organization; without it, every repository the token can read.  Returns 404 for an organization that cannot connect Forgejo.

## Path parameters

- `orgId` string, uuid, required

## Headers

- `Authorization` string

## Request body

- object
  - `accessToken` string, required
  - `instanceUrl` string, uri, required
  - `orgName` string

## Response `201`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
  - `data` object, required
    - `id` string, uuid, required
    - `type` 'integration', required
    - `attributes` object, required
      - `type` 'forgejo-token', required
      - `installedBy` string, uuid, required
      - `connectionData` union, required
        - object
          - `scopeType` 'org', required
          - `host` string, required
          - `orgName` string, required
          - `tokenOwnerRole` union, required
            - 'owner'
            - 'admin'
            - 'member'
        - object
          - `scopeType` 'user', required
          - `host` string, required
          - `username` string, required
      - `metadata` object, required
      - `createdAt` string, required
      - `updatedAt` string, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-11-09** `6302eac59046`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tessl/apis/tessl-api/changes/v1/orgs/:orgId/integrations/forgejo-token/post.md)

---

[API](https://skmtc.dev/tessl/apis/tessl-api.md) - [All operations](https://skmtc.dev/tessl/apis/tessl-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tessl/apis/tessl-api/revisions/6302eac59046?raw)
