# List org invites


[API catalog](/reference/api/) · [Docker Hub overview](/reference/api/hub/latest/) · [Product manual](https://docs.docker.com/docker-hub/) · [OpenAPI specification](/reference/api/hub/latest.yaml)

API version: 2-beta



`GET /v2/orgs/{org_name}/invites`

Return all pending invites for a given org, only team owners can call this endpoint

This operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.


## Connection and access

[API connection and authentication guidance](/reference/api/hub/latest/#authentication)


Server: `https://hub.docker.com`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "bearerAuth": []
  }
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request GET \
  --header "Authorization: Bearer ${TOKEN}" \
  --header 'Accept: application/json' \
  'https://hub.docker.com/v2/orgs/myorganization/invites'
```

## Parameters

### org_name

Location: path. Required: yes.

Name of the organization (namespace).

```json
{
  "description": "Name of the organization (namespace).",
  "example": "myorganization",
  "in": "path",
  "name": "org_name",
  "pointer": "/paths/~1v2~1orgs~1{org_name}~1invites/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 application/json




Schema:

```json
{
  "examples": [
    {
      "data": [
        {
          "created_at": "2021-10-28T18:30:19.520861Z",
          "id": "e36eca69-4cc8-4f17-9845-ae8c2b832691",
          "invitee": "invitee@docker.com",
          "inviter_username": "moby",
          "org": "docker",
          "team": "owners"
        }
      ]
    }
  ],
  "properties": {
    "data": {
      "items": {
        "$ref": "#/components/schemas/invite"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```




Schema example:
```json
{
  "data": [
    {
      "created_at": "2021-10-28T18:30:19.520861Z",
      "id": "e36eca69-4cc8-4f17-9845-ae8c2b832691",
      "invitee": "invitee@docker.com",
      "inviter_username": "moby",
      "org": "docker",
      "team": "owners"
    }
  ]
}
```


### Response 401 application/json

Unauthorized


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "unauthorized"
}
```


### Response 403 application/json

Forbidden


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "permission denied"
}
```


### Response 404 application/json

Not Found


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "not found"
}
```


## Complete operation contract

```json
{
  "description": "Return all pending invites for a given org, only team owners can call this endpoint\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
  "operationId": "getV2OrgsByOrgNameInvites",
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "examples": [
              {
                "data": [
                  {
                    "created_at": "2021-10-28T18:30:19.520861Z",
                    "id": "e36eca69-4cc8-4f17-9845-ae8c2b832691",
                    "invitee": "invitee@docker.com",
                    "inviter_username": "moby",
                    "org": "docker",
                    "team": "owners"
                  }
                ]
              }
            ],
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/invite"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        }
      },
      "description": ""
    },
    "401": {
      "$ref": "#/components/responses/unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/forbidden"
    },
    "404": {
      "$ref": "#/components/responses/not_found"
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "summary": "List org invites",
  "tags": [
    "invites"
  ]
}
```

## Referenced schemas

- `#/components/responses/forbidden`

- `#/components/responses/not_found`

- `#/components/responses/unauthorized`

- [#/components/schemas/invite](/reference/api/hub/latest/schemas/invite/)




