Sending and accepting an invitation to a SourceCraft organization

Sending an invitation

Warning

You need at least the Organization admin role to send an invitation to an organization.

You can invite a user with a Yandex account to a SourceCraft organization.

Tip

To authorize corporate accounts in SourceCraft using single sign-on (SSO), you can use Yandex Cloud SAML-compatiable identity federations.

  1. Open the SourceCraft home page.

  2. On the Home tab, navigate to Organizations.

  3. Select the organization you want to invite a user to.

  4. On the organization page, under  People, go to the  Members & roles section.

  5. In the top-right corner, click New member.

  6. In the window that opens, select the invitation principle:

    1. In the Users to invite field, start typing the public name, e.g., John Smith, or nickname, e.g., ivanov-2000, and select one of the suggested options. You can add multiple users.
    2. Optionally, assign a role to the users you invite:
      1. Click Add role.
      2. Select the role you need from the Role drop-down list.
    3. In the Invite Expires In drop-down list, select how long the invitation to the organization will remain valid.
    4. Click Invite to organization.

    The user will receive an email invitation to join your organization. They can do so using the link in the email.

    Note

    Registered users will also see the invitation on the SourceCraft home page.

    1. In the People to invite field, enter the user's email address and click Add email. You can add multiple emails.
    2. Optionally, assign a role to the users you are inviting:
      1. Click Add role.
      2. Select the role you need from the Role drop-down list.
    3. In the Invite Expires In drop-down list, select how long the invitation to the organization will remain valid.
    4. Click Invite to organization.

    The user will receive an email invitation to join your organization. They can do so using the link in the email.

    Note

    Registered users will also see the invitation on the SourceCraft home page.

    You can generate unique invitation links for ad-hoc users. Each link has its own expiration date and can only be used once.

    This is useful if you do not know the logins or emails of your users or want to automate role assignment and repository access management.

    A user accepts the invitation by clicking the link and gets access to your organization and its repositories.

    To generate invitation links:

    1. Optionally, assign a role to the user you are inviting:

      1. Click Add role.
      2. Select the role you need from the Role drop-down list.
    2. In the Invite Expires In drop-down list, select how long the link will remain valid.

    3. In the Quantity field, specify the number of unique invitation links.

    4. In the Prefix field, specify a prefix for the invitation links, e.g., team-sourcecraft.

    5. Click Invite to organization.

    6. In the window that opens, copy the links to the clipboard or download them as a file, then close the window.

      Warning

      After closing the window, the links you generated will no longer be available. However, you can create new ones.

    7. Send the invitation links to the users.

    You can generate a single multi-use link that allows one or more users to join the organization. You can create a multi-use link either for specific users or for anyone with the link.

    Multi-invite links are managed via a Yandex Identity and Access Management service account with the organization-manager.passportUserAdmin role. You can select an existing service account or create a new one.

    To generate a multi-use link:

    1. In the Invite Expires In drop-down list, select how long the multi-use link will remain valid.

    2. Optionally, in the Invitee limit field, specify the maximum number of users who can accept this multi-use link. For an unlimited number of users, leave this field empty.

    3. Optionally, in the Unique invite link name field, enter a unique name for the multi-use link. Leave this field empty to generate a name automatically.

    4. Optionally, assign a role to the users you are inviting:

      1. Click Add role.
      2. Select the role you need from the Role drop-down list.
    5. Under Can accept, select an invitation limit:

      • Everyone: Any user can accept the invitation.
      • Specific users: Only specific users can accept the invitation:
        • SourceCraft users (optional): Start typing the public name, e.g., John Smith, or nickname, e.g., jsmith-2000, and select one of the suggested options. You can add multiple users.
        • Yandex logins (optional): Enter a user login and click Add login. You can add multiple users.
    6. Under Service account, select one of the following options:

      • Auto: Yandex Cloud will automatically create a new service account with the organization-manager.passportUserAdmin role.
      • Choose existing: Select a Yandex Identity and Access Management service account to use for creating invites.
    7. Click Invite to organization.

    8. In the window that opens, copy the multi-use link to the clipboard, then close the window.

      Warning

      After you close the window, the multi-use link you generated will no longer be available. However, you can create a new one.

    9. Send your multi-use link to the users.

Accepting an invitation

  1. Perform these actions depending on the invitation method:
    • Email from SourceCraft: Open it and click Open invitation.
    • Link: Follow the link.
  2. To view info about the organization you have been invited to, click View organization on the page that opens.
  3. To accept the invitation, click Join organization.
  1. Perform these actions depending on the invitation method:

    • Email from SourceCraft: Open it and click Accept invitation.
    • Link: Follow the link.
  2. On the page that opens, click Accept.

  3. Log in with your Yandex ID.

    If you do not have a Yandex ID yet, sign up.

    If using your social network profile to log in to Yandex, create a username and password.

  4. Select an account to join the organization with and confirm your selection.

  5. Complete your registration.

Working with invitations via the API

You can use the SourceCraft REST API to automate your invitation management routine.

For example, you can integrate the process of issuing invitations into your website or access management system.

For more information, see Organization | Invites.

Warning

You can authenticate in the SourceCraft API to work with invitations only using an IAM token from Yandex Identity and Access Management. For more information, see Getting an IAM token.

Creating an invitation to an organization via the API

export IAM_TOKEN=<IAM_token>
curl \
  --request POST \
  --url "https://api.sourcecraft.tech/orgs/<organization_slug>/invites" \
  --header "Authorization: Bearer $IAM_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "invitees": [
      {
        "email": "<user_email>"
      },
      {
        "slug": "<user_1_slug>"
      },
      {
        "alias": "<text_record_for identification>"
      },
      {
        "slug": "<user_2_slug>"
      }
    ],
    "ttl_in_days": 1
  }' | jq

Where:

  • invitees: List of invited users and the principle of issuing an invitation to a user:
    • To invite specific users, use one of the following parameters:
      • email: User's email. You can invite either users already registered in SourceCraft or new users.
      • slug: User slug in SourceCraft. Only for registered SourceCraft users.
    • To invite an ad-hoc user, use the alias parameter for an invitation via a one-time link. It contains a text record to identify the invitation, e.g., my-first-invite.
  • ttl_in_days: Invitation validity period in days.

Result:

{
  "operation_id": "cq9gajzloslj********",
  "status_url": "/operations/create-invites/id:cq9gajzloslj********",
  "status": "scheduled",
  "created_at": "2026-01-23T07:42:03.062925Z",
  "modified_at": "2026-01-23T07:42:03.062925Z"
}

The operation is executed asynchronously. Save its ID (operation_id) to get information about its progress status.

For more information, see Organization | Invites.

Getting information about an operation of creating an invitation via the API

export IAM_TOKEN=<personal_access_token>
curl \
  --request GET \
  --url "https://api.sourcecraft.tech/operations/create-invites/id:<operation_ID>" \
  --header "Authorization: Bearer $IAM_TOKEN" \
  --header "Content-Type: application/json"

Result:

{
  "operation_id": "cq9gajzloslj********",
  "status_url": "operations/create-invites/id:cq9gajzloslj********",
  "status": "success",
  "created_at": "2026-01-23T07:42:03.062925Z",
  "modified_at": "2026-01-23T07:42:09.612256Z",
  "response": {
    "invites": [
      {
        "id": "bpf65vedallc********",
        "email": "<user_email>",
        "alias": "",
        "invite_link": "",
        "status": "pending",
        "subject": {
          "type": "invitee",
          "id": "ajeth710l8gi********"
        },
        "created_at": "1970-01-01T00:00:00Z",
        "expires_at": "1970-01-01T00:00:00Z"
      },
      {
        "id": "bpf4q13jhnod********",
        "email": "",
        "alias": "",
        "invite_link": "",
        "invitee": {
          "id": "01971bf5-6751-7eea-a07f-2e29********",
          "slug": "<user_1_slug>"
        },
        "status": "pending",
        "subject": {
          "type": "invitee",
          "id": "ajehmssc34ob********"
        },
        "created_at": "1970-01-01T00:00:00Z",
        "expires_at": "1970-01-01T00:00:00Z"
      },
      {
        "id": "bpfrvnq2qd81********",
        "email": "",
        "alias": "<text_record_for identification>",
        "invite_link": "https://sourcecraft.dev/me/accept-invite/9emq5q98ym4cJU********",
        "status": "pending",
        "subject": {
          "type": "invitee",
          "id": "ajebuh02o909********"
        },
        "created_at": "2026-02-05T07:34:20.736642Z",
        "expires_at": "2026-02-06T07:34:20.673905Z"
      }
    ],
    "errors": [
      {
        "invitee": {
          "email": "",
          "slug": "<user_2_slug>",
          "alias": ""
        },
        "error_code": "InviteeHasAlreadyJoined",
        "message": "Invited user is already a member"
      }
     ]
  }
}

Where:

  • status: Invitation status.

  • invite_link: One-time invitation link for an ad-hoc user. Available only with the alias invitation type.

    Warning

    The invitation link is displayed only once. You cannot retrieve it later. However, you can create a new one.

  • errors: Errors that occur when creating an invitation, e.g., if the user is already a member of the organization.

For more information, see Get invitation creation operation status (By Operation ID).

Listing active invitations using the API

The invitation is active if the user has not accepted it yet.

export IAM_TOKEN=<personal_access_token>
curl \
  --request GET \
  --url "https://api.sourcecraft.tech/orgs/<organization_slug>/invites" \
  --header "Authorization: Bearer $IAM_TOKEN" \
  --header "Content-Type: application/json"

Result:

{
  "invites": [
    {
      "id": "bpf65vedallc********",
      "email": "<user_email>",
      "alias": "",
      "invite_link": "",
      "status": "pending",
      "subject": {
        "type": "invitee",
        "id": "ajeth710l8gi********"
      },
      "created_at": "2026-01-23T07:42:06.938436Z",
      "expires_at": "2026-01-24T07:42:06.847107Z"
    }
  ],
  "next_page_token": ""
}

For more information, see List Organization Invitations.

Useful links