{
  "opencollection": "1.0.0",
  "info": {
    "name": "InstantDB Admin HTTP Auth API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Auth",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a refresh token for a user",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.instantdb.com/admin/refresh_tokens",
            "headers": [
              {
                "name": "App-Id",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Generates an auth (refresh) token for a user identified by email or id, creating the user if they do not already exist. Optionally set custom `$users` fields with `extra-fields`."
        },
        {
          "info": {
            "name": "Create a magic code",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.instantdb.com/admin/magic_code",
            "headers": [
              {
                "name": "App-Id",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a magic code for the given email without sending it, so you can deliver it through your own provider."
        },
        {
          "info": {
            "name": "Create and send a magic code",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.instantdb.com/admin/send_magic_code",
            "headers": [
              {
                "name": "App-Id",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a magic code and sends it to the email via Instant's provider."
        },
        {
          "info": {
            "name": "Verify a magic code",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.instantdb.com/admin/verify_magic_code",
            "headers": [
              {
                "name": "App-Id",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Verifies a magic code for an email and returns the user, creating it if needed. Optionally set custom `$users` fields with `extra-fields`."
        },
        {
          "info": {
            "name": "Look up a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.instantdb.com/admin/users",
            "headers": [
              {
                "name": "App-Id",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "email",
                "value": "",
                "type": "query"
              },
              {
                "name": "id",
                "value": "",
                "type": "query"
              },
              {
                "name": "refresh_token",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Fetches an app user by email, id, or refresh_token."
        },
        {
          "info": {
            "name": "Delete a user",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.instantdb.com/admin/users",
            "headers": [
              {
                "name": "App-Id",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "email",
                "value": "",
                "type": "query"
              },
              {
                "name": "id",
                "value": "",
                "type": "query"
              },
              {
                "name": "refresh_token",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Permanently deletes an app user by email, id, or refresh_token."
        },
        {
          "info": {
            "name": "Sign a user out",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.instantdb.com/admin/sign_out",
            "headers": [
              {
                "name": "App-Id",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Invalidates a user's sessions / refresh tokens. Identify the user by email, id, or refresh_token."
        },
        {
          "info": {
            "name": "Verify a refresh token",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.instantdb.com/runtime/auth/verify_refresh_token",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Validates a refresh token for an app and returns the associated user."
        }
      ]
    }
  ],
  "bundled": true
}