## Accept Invite

`client.Invites.Accept(ctx, inviteID) (*InviteAcceptResponse, error)`

**post** `/api/v2/invites/{invite_id}/accept`

Accept a pending invitation. Returns the joined organization id.

### Parameters

- `inviteID string`

### Returns

- `type InviteAcceptResponse struct{…}`

  Response for accepting an invitation.

  - `OrganizationID string`

    The organization the user just joined.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llamacloud-admin-go"
  "github.com/run-llama/llamacloud-admin-go/option"
)

func main() {
  client := llamacloudadmin.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Invites.Accept(context.TODO(), "invite_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.OrganizationID)
}
```

#### Response

```json
{
  "organization_id": "organization_id"
}
```
