---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.2
alternate:
  - https://sourcecraft.dev/portal/docs/en/api-ref/Invites-or-MultiLinks/UpdateMultiLinkByID.md
  - https://sourcecraft.dev/portal/docs/ru/api-ref/Invites-or-MultiLinks/UpdateMultiLinkByID.md
  - https://sourcecraft.dev/portal/docs/ru/api-ref/Invites-or-MultiLinks/UpdateMultiLinkByID.md
  - href: https://sourcecraft.dev/portal/docs/ru/api-ref/Invites-or-MultiLinks/UpdateMultiLinkByID.md
    type: text/markdown
    title: Markdown version
  - href: https://sourcecraft.dev/portal/docs/ru/llms.txt?revision=r22161526
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/ru/llms.txt?revision=r22161526

<div class="openapi">

# Update Multi-Link (By Multi-LinkID)

<!-- markdownlint-disable-file -->

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-patch);margin-bottom: 12px">

<div class="openapi__request">

PATCH {.openapi__method}
```text translate=no
https://api.sourcecraft.tech/invite-multilinks/id:{link_id}
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_link_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "ttl_in_days": 0,
  "invitee_count": 0,
  "org_role": "viewer",
  "repo_role": null,
  "team_id": "example"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_invitee_count_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer
{.table-cell}
||
||

_org_role_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [RepoRole](#entity-RepoRole)

_Enum:_{.json-schema-reset .json-schema-value} `viewer`, `contributor`, `developer`, `maintainer`, `admin`
{.table-cell}
||
||

_repo_role_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [RepoRole](#entity-RepoRole)

_Enum:_{.json-schema-reset .json-schema-value} `viewer`, `contributor`, `developer`, `maintainer`, `admin`
{.table-cell}
||
||

_team_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

IAM group ID of the team users join upon acceptance. Obtain it from
GET /orgs/{org_slug}/teams.
Must belong to this organization. The caller must be able to manage its members.
Include team_id in update_mask and omit or clear its value to remove the assignment.
Without team_id in update_mask, the assignment is unchanged. Changes affect only
acceptances scheduled after the update; existing team members are not moved.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_ttl_in_days_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Time-to-live in days. If unset, the link never expires.
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### RepoRole {#entity-RepoRole}

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `viewer`, `contributor`, `developer`, `maintainer`, `admin`

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

A successful response.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "id": "example",
  "org_id": "example",
  "org_slug": "example",
  "slug": "example",
  "url": "example",
  "ttl_in_days": 0,
  "expires_at": "2025-01-01T00:00:00Z",
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z",
  "accepted_count": 0,
  "invitee_count": 0,
  "org_role": "viewer",
  "repo": {
    "repo_id": "example",
    "repo_slug": "example",
    "repo_role": null
  },
  "team_id": "example",
  "restricted_to_count": 0
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_accepted_count_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer
{.table-cell}
||
||

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_expires_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_invitee_count_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Maximum number of invitees who can accept the invitation. Unset means unlimited.
{.table-cell}
||
||

_org_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_org_role_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [RepoRole](#entity-RepoRole)

_Enum:_{.json-schema-reset .json-schema-value} `viewer`, `contributor`, `developer`, `maintainer`, `admin`
{.table-cell}
||
||

_org_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_repo_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [RepoAssignment](#entity-RepoAssignment)

RepoAssignment specifies a repository and the role granted to a multi-link invitee.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "repo_id": "example",
  "repo_slug": "example",
  "repo_role": "viewer"
}
```

{% endcut %}
{.table-cell}
||
||

_restricted_to_count_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Number of invitee restrictions configured on the multi-link. When zero, the
link is open to anyone; otherwise only the invitees listed via the invitees
sub-resource are allowed to accept it. Use ListMultiLinkInvitees to fetch
the full list.
{.table-cell}
||
||

_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_team_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

IAM group ID of the team users join upon acceptance. Obtain it from
GET /orgs/{org_slug}/teams. The team belongs to this multi-link's organization.
Unset means no team assignment.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_ttl_in_days_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Time-to-live in days. If unset, the link never expires.
{.table-cell}
||
||

_updated_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_url_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### RepoAssignment {#entity-RepoAssignment}

RepoAssignment specifies a repository and the role granted to a multi-link invitee.

#|
|| **Name** | **Description** ||
||

_repo_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_repo_role_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [RepoRole](#entity-RepoRole)

_Enum:_{.json-schema-reset .json-schema-value} `viewer`, `contributor`, `developer`, `maintainer`, `admin`
{.table-cell}
||
||

_repo_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "repo_id": "example",
  "repo_slug": "example",
  "repo_role": "viewer"
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__default">

## default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: unknown

_Example:_{.json-schema-reset .json-schema-example} `null`
{.table-cell}
||
||

_error_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_request_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.