List Organization Invitations

Request

GET

https://api.sourcecraft.tech/orgs/{org_slug}/invites

Path parameters

Name

Description

org_slug

Type: string

Example: ``

Query parameters

Name

Description

org_id

Type: string

Example: ``

page_size

Type: string<uint64>

The maximum number of repositories to return. The service may return fewer than
this value

Example: ``

page_token

Type: string

A page token, received from a previous call.
Provide this to retrieve the subsequent page.

When paginating, all other parameters must match
the call that provided the page token.

Example: ``

Responses

200 OK

A successful response.

Body

application/json
{
  "invites": [
    {
      "id": "example",
      "email": "example",
      "alias": "example",
      "invite_link": "example",
      "invitee": {
        "id": "example",
        "slug": "example"
      },
      "status": "creating",
      "subject": {
        "type": "user",
        "id": "example"
      },
      "created_at": "2025-01-01T00:00:00Z",
      "expires_at": "2025-01-01T00:00:00Z"
    }
  ],
  "next_page_token": "example"
}

Name

Description

invites

Type: Invite[]

Example
[
  {
    "id": "example",
    "email": "example",
    "alias": "example",
    "invite_link": "example",
    "invitee": {
      "id": "example",
      "slug": "example"
    },
    "status": "creating",
    "subject": {
      "type": "user",
      "id": "example"
    },
    "created_at": "2025-01-01T00:00:00Z",
    "expires_at": "2025-01-01T00:00:00Z"
  }
]

next_page_token

Type: string

A token, which can be sent as page_token to retrieve the next page.
If this field is omitted, there are no subsequent pages.

Example: example

UserEmbedded

Name

Description

id

Type: string

Example: example

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example"
}

InviteStatus

Type: string

Enum: creating, pending, accepted, rejected

SubjectType

Type: string

Enum: user, invitee, team

Subject

Name

Description

id

Type: string

Example: example

type

Type: SubjectType

Enum: user, invitee, team

Example
{
  "type": "user",
  "id": "example"
}

Invite

Invite represents an organization invitation.
Exactly one of email, alias, or invitee is set depending on invite type.

Name

Description

alias

Type: string

Example: example

created_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

email

Type: string

Example: example

expires_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

id

Type: string

Example: example

invite_link

Type: string

Example: example

invitee

Type: UserEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

status

Type: InviteStatus

Enum: creating, pending, accepted, rejected

subject

Type: Subject

Example
{
  "type": "user",
  "id": "example"
}
Example
{
  "id": "example",
  "email": "example",
  "alias": "example",
  "invite_link": "example",
  "invitee": {
    "id": "example",
    "slug": "example"
  },
  "status": "creating",
  "subject": {
    "type": "user",
    "id": "example"
  },
  "created_at": "2025-01-01T00:00:00Z",
  "expires_at": "2025-01-01T00:00:00Z"
}

default

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

Body

application/json
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": {}
}

Name

Description

details

Type: Optional details. Exact structure depends on error_code

[additional]

Type: string

Example: example

Example
{}

error_code

Type: string

Example: example

message

Type: string

Example: example

request_id

Type: string

Example: example