{
  "opencollection": "1.0.0",
  "info": {
    "name": "OpenRelay Account Organizations API",
    "version": "0.1.0"
  },
  "items": [
    {
      "info": {
        "name": "Organizations",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create an organization (caller becomes owner)",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/orgs",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Requires a signed-in dashboard session token; API keys cannot call this endpoint."
        },
        {
          "info": {
            "name": "Get an organization",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get an organization"
        },
        {
          "info": {
            "name": "Update an organization (owner/admin)",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Update an organization (owner/admin)"
        },
        {
          "info": {
            "name": "List an org's pending invites (owner/admin)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId/invites",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List an org's pending invites (owner/admin)"
        },
        {
          "info": {
            "name": "Revoke a pending invite (owner/admin)",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId/invites/:email",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              },
              {
                "name": "email",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Revoke a pending invite (owner/admin)"
        },
        {
          "info": {
            "name": "List an org's members",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId/members",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List an org's members"
        },
        {
          "info": {
            "name": "Invite a member by email (owner/admin)",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId/members/add",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Records a pending invite and emails the address. The response status is always \"invited\"; the user becomes a member only after they accept (POST /v1/me/invites/{orgId}/accept). Re-inviting the same email refreshes the invite's role and expiry. 409 if the email already belongs to a member."
        },
        {
          "info": {
            "name": "Update a member's role (owner/admin)",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId/members/:userId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              },
              {
                "name": "userId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Update a member's role (owner/admin)"
        },
        {
          "info": {
            "name": "Remove a member (owner/admin)",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId/members/:userId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              },
              {
                "name": "userId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Remove a member (owner/admin)"
        }
      ]
    }
  ],
  "bundled": true
}