## CreateOrganizationInvite `client.Organizations.Invites.New(ctx, body) (*OrganizationInviteNewResponse, error)` **post** `/gitpod.v1.OrganizationService/CreateOrganizationInvite` Creates an invite link for joining an organization. Any existing OrganizationInvites are invalidated and can no longer be used. Use this method to: - Generate shareable invite links - Manage team growth - Control organization access ### Examples - Create organization invite: Generates a new invite link for the organization. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `body OrganizationInviteNewParams` - `OrganizationID param.Field[string]` ### Returns - `type OrganizationInviteNewResponse struct{…}` - `Invite OrganizationInvite` - `InviteID string` invite_id is the unique identifier of the invite to join the organization. Use JoinOrganization with this ID to join the organization. ### Example ```go package main import ( "context" "fmt" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) invite, err := client.Organizations.Invites.New(context.TODO(), gitpod.OrganizationInviteNewParams{ OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", invite.Invite) } ``` #### Response ```json { "invite": { "inviteId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ```