# dev.knotless.putOrgMember

> 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.

- Kind: procedure
- Authority: knotless.dev
- Lexicon: 1
- Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.putOrgMember)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.putOrgMember/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.putOrgMember/analytics)

## Procedure (`dev.knotless.putOrgMember`)

Type: procedure · POST

### Input (application/json)

- `member` (string · did, required): The account to invite.
- `org` (string · did, required): The organization.
- `role` (string): Their role; member when absent.
  - Constraints: maxLength: 64, knownValues: admin | member

### Output (application/json)

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

## 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
}
```
