# dev.knotless.putOrgMember

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

Invites an account to an organization, or changes a member's role, through the gateway the organization delegated writes to, which writes as the organization. The caller must be an admin of it who joined. Requires a service token from the caller's PDS, audience the gateway's DID, for this method.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.putOrgMember)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.putOrgMember/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.putOrgMember/examples)

## Definitions

### `dev.knotless.putOrgMember`

**Type**: `procedure`

The invitation is kept in the organization's space where its PDS has spaces, else in its public records. Invited again, an invitation that lapsed starts over.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `member` | `string` (did) | Yes | The account to invite. |
| `org` | `string` (did) | Yes | The organization. |
| `role` | `string` | No | Their role; member when absent. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `first` | `boolean` | Yes | Whether this made the account an organization. |
| `had` | `string` | No | The role they had before, if they had one. |
| `org` | `string` | Yes | The organization's handle, or its DID when none resolves back to it. |
| `private` | `boolean` | Yes | Whether the invitation is in the organization's space, which only it and its members read; else in its public records. |
| `role` | `string` | Yes | Their role now. |
| `was` | `string` | No | Where they stood before: invited, lapsed (invited over 7 days ago), or a public or hidden member. Absent when they were not invited. |
| `who` | `string` | Yes | The invitee's handle, or their DID when none resolves back to it. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The invitation is kept in the organization's space where its PDS has spaces, else in its public records. Invited again, an invitation that lapsed starts over.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "member": {
              "description": "The account to invite.",
              "format": "did",
              "type": "string"
            },
            "org": {
              "description": "The organization.",
              "format": "did",
              "type": "string"
            },
            "role": {
              "description": "Their role; member when absent.",
              "knownValues": [
                "admin",
                "member"
              ],
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "org",
            "member"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "first": {
              "description": "Whether this made the account an organization.",
              "type": "boolean"
            },
            "had": {
              "description": "The role they had before, if they had one.",
              "knownValues": [
                "admin",
                "member"
              ],
              "maxLength": 64,
              "type": "string"
            },
            "org": {
              "description": "The organization's handle, or its DID when none resolves back to it.",
              "maxLength": 300,
              "type": "string"
            },
            "private": {
              "description": "Whether the invitation is in the organization's space, which only it and its members read; else in its public records.",
              "type": "boolean"
            },
            "role": {
              "description": "Their role now.",
              "knownValues": [
                "admin",
                "member"
              ],
              "maxLength": 64,
              "type": "string"
            },
            "was": {
              "description": "Where they stood before: invited, lapsed (invited over 7 days ago), or a public or hidden member. Absent when they were not invited.",
              "knownValues": [
                "invited",
                "lapsed",
                "public",
                "hidden"
              ],
              "maxLength": 64,
              "type": "string"
            },
            "who": {
              "description": "The invitee's handle, or their DID when none resolves back to it.",
              "maxLength": 300,
              "type": "string"
            }
          },
          "required": [
            "org",
            "who",
            "role",
            "first",
            "private"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Invites an account to an organization, or changes a member's role, through the gateway the organization delegated writes to, which writes as the organization. The caller must be an admin of it who joined. Requires a service token from the caller's PDS, audience the gateway's DID, for this method.",
  "id": "dev.knotless.putOrgMember",
  "lexicon": 1
}
```
