object OTP
{
  "type": "object",
  "required": [
    "status",
    "attempts",
    "strategy",
    "expire_at"
  ],
  "properties": {
    "status": {
      "enum": [
        "unverified",
        "verified",
        "failed",
        "expired"
      ],
      "type": "string"
    },
    "attempts": {
      "type": "integer"
    },
    "strategy": {
      "enum": [
        "phone_code",
        "email_code",
        "reset_password_email_code"
      ],
      "type": "string"
    },
    "expire_at": {
      "type": "integer"
    }
  }
}
object Oauth
{
  "type": "object",
  "required": [
    "status",
    "strategy",
    "expire_at"
  ],
  "properties": {
    "error": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/components/schemas/ClerkError"
        }
      ],
      "nullable": true
    },
    "status": {
      "enum": [
        "unverified",
        "verified",
        "failed",
        "expired",
        "transferable"
      ],
      "type": "string"
    },
    "attempts": {
      "type": "integer",
      "nullable": true
    },
    "strategy": {
      "enum": [
        "oauth_google",
        "oauth_mock"
      ],
      "type": "string"
    },
    "expire_at": {
      "type": "integer"
    },
    "external_verification_redirect_url": {
      "type": "string"
    }
  }
}
object Organization
{
  "type": "object",
  "required": [
    "object",
    "id",
    "name",
    "slug",
    "max_allowed_memberships",
    "public_metadata",
    "private_metadata",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "object": {
      "enum": [
        "organization"
      ],
      "type": "string"
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation.\n"
    },
    "created_by": {
      "type": "string"
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update.\n"
    },
    "members_count": {
      "type": "integer",
      "nullable": true
    },
    "public_metadata": {
      "type": "object"
    },
    "private_metadata": {
      "type": "object"
    },
    "admin_delete_enabled": {
      "type": "boolean"
    },
    "max_allowed_memberships": {
      "type": "integer"
    }
  }
}
object OrganizationInvitation
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "object": {
      "enum": [
        "organization_invitation"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value.\n"
    },
    "status": {
      "type": "string"
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation."
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update."
    },
    "email_address": {
      "type": "string"
    },
    "organization_id": {
      "type": "string"
    },
    "public_metadata": {
      "type": "object"
    },
    "private_metadata": {
      "type": "object"
    }
  },
  "description": "An organization invitation"
}
object OrganizationInvitations
{
  "type": "object",
  "required": [
    "data",
    "total_count"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/OrganizationInvitation"
      }
    },
    "total_count": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of organization invitations\n"
    }
  }
}
array OrganizationInvitationsBulkCreateAndSendRequest
{
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "email_address",
      "inviter_user_id",
      "role"
    ],
    "properties": {
      "role": {
        "type": "string",
        "description": "The role of the new member in the organization."
      },
      "redirect_url": {
        "type": "string",
        "description": "Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email."
      },
      "email_address": {
        "type": "string",
        "description": "The email address of the new member that is going to be invited to the organization"
      },
      "inviter_user_id": {
        "type": "string",
        "description": "The ID of the user that invites the new member to the organization.\nMust be an administrator in the organization."
      },
      "public_metadata": {
        "type": "object",
        "description": "Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API."
      },
      "private_metadata": {
        "type": "object",
        "description": "Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API."
      }
    }
  }
}
object OrganizationInvitationsCreateAndSendRequest
{
  "type": "object",
  "required": [
    "email_address",
    "inviter_user_id",
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "description": "The role of the new member in the organization"
    },
    "redirect_url": {
      "type": "string",
      "description": "Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email."
    },
    "email_address": {
      "type": "string",
      "description": "The email address of the new member that is going to be invited to the organization"
    },
    "inviter_user_id": {
      "type": "string",
      "description": "The ID of the user that invites the new member to the organization.\nMust be an administrator in the organization."
    },
    "public_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API."
    },
    "private_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API."
    }
  }
}
object OrganizationInvitationsRevokeInvitationRequest
{
  "type": "object",
  "required": [
    "requesting_user_id"
  ],
  "properties": {
    "requesting_user_id": {
      "type": "string",
      "description": "The ID of the user that revokes the invitation.\nMust be an administrator in the organization."
    }
  }
}
object OrganizationMembership
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "object": {
      "enum": [
        "organization_membership"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value.\n"
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation."
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "organization": {
      "$ref": "#/components/schemas/Organization"
    },
    "public_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization membership, accessible from both Frontend and Backend APIs"
    },
    "private_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization membership, accessible only from the Backend API"
    },
    "public_user_data": {
      "type": "object",
      "properties": {
        "user_id": {
          "type": "string",
          "nullable": false
        },
        "has_image": {
          "type": "boolean"
        },
        "image_url": {
          "type": "string"
        },
        "last_name": {
          "type": "string",
          "nullable": true
        },
        "first_name": {
          "type": "string",
          "nullable": true
        },
        "identifier": {
          "type": "string",
          "nullable": true
        },
        "profile_image_url": {
          "type": "string",
          "nullable": true,
          "deprecated": true
        }
      }
    }
  },
  "description": "Hello world",
  "x-konfig-properties": {
    "organization": {
      "type": "object",
      "nullable": false
    }
  }
}
object OrganizationMemberships
{
  "type": "object",
  "required": [
    "data",
    "total_count"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/OrganizationMembership"
      }
    },
    "total_count": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of organization memberships\n"
    }
  }
}
object OrganizationMembershipsAddUserToOrganizationRequest
{
  "type": "object",
  "required": [
    "user_id",
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "description": "The role that the new member will have in the organization."
    },
    "user_id": {
      "type": "string",
      "description": "The ID of the user that will be added as a member in the organization.\nThe user needs to exist in the same instance as the organization and must not be a member of the given organization already."
    }
  }
}
object OrganizationMembershipsUpdateMembershipMetadataRequest
{
  "type": "object",
  "properties": {
    "public_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization membership, that is visible to both your frontend and backend.\nThe new object will be merged with the existing value."
    },
    "private_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization membership that is only visible to your backend.\nThe new object will be merged with the existing value."
    }
  }
}
object OrganizationMembershipsUpdateMembershipPropertiesRequest
{
  "type": "object",
  "required": [
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "description": "The new role of the given membership."
    }
  }
}
object OrganizationSettings
{
  "type": "object",
  "required": [
    "object",
    "enabled",
    "max_allowed_memberships",
    "creator_role",
    "admin_delete_enabled",
    "domains_enabled",
    "domains_enrollment_modes",
    "domains_default_role"
  ],
  "properties": {
    "object": {
      "enum": [
        "organization_settings"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value."
    },
    "enabled": {
      "type": "boolean"
    },
    "creator_role": {
      "type": "string",
      "description": "The role key that a user will be assigned after creating an organization."
    },
    "domains_enabled": {
      "type": "boolean"
    },
    "max_allowed_roles": {
      "type": "integer"
    },
    "admin_delete_enabled": {
      "type": "boolean",
      "description": "The default for whether an admin can delete an organization with the Frontend API."
    },
    "domains_default_role": {
      "type": "string",
      "description": "The role key that it will be used in order to create an organization invitation or suggestion."
    },
    "max_allowed_memberships": {
      "type": "integer"
    },
    "max_allowed_permissions": {
      "type": "integer"
    },
    "domains_enrollment_modes": {
      "type": "array",
      "items": {
        "enum": [
          "manual_invitation",
          "automatic_invitation",
          "automatic_suggestion"
        ],
        "type": "string"
      }
    }
  }
}
object OrganizationWithLogo
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Organization"
    },
    {
      "type": "object",
      "required": [
        "image_url"
      ],
      "properties": {
        "logo_url": {
          "type": "string",
          "deprecated": true
        },
        "has_image": {
          "type": "boolean"
        },
        "image_url": {
          "type": "string"
        }
      }
    }
  ]
}
object Organizations
{
  "type": "object",
  "required": [
    "data",
    "total_count"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Organization"
      }
    },
    "total_count": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of organizations\n"
    }
  }
}
object OrganizationsCreateNewOrganizationRequest
{
  "type": "object",
  "required": [
    "name",
    "created_by"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the new organization"
    },
    "slug": {
      "type": "string",
      "description": "A slug for the new organization.\nCan contain only lowercase alphanumeric characters and the dash \"-\".\nMust be unique for the instance."
    },
    "created_by": {
      "type": "string",
      "description": "The ID of the User who will become the administrator for the new organization"
    },
    "public_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API"
    },
    "private_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization, accessible only from the Backend API"
    },
    "max_allowed_memberships": {
      "type": "integer",
      "description": "The maximum number of memberships allowed for this organization"
    }
  }
}
object OrganizationsMergeOrganizationMetadataRequest
{
  "type": "object",
  "properties": {
    "public_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization, that is visible to both your frontend and backend.\nThe new object will be merged with the existing value."
    },
    "private_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization that is only visible to your backend.\nThe new object will be merged with the existing value."
    }
  }
}
object OrganizationsUpdateOrganizationLogoRequest
{
  "type": "object",
  "required": [
    "uploader_user_id",
    "file"
  ],
  "properties": {
    "file": {
      "type": "string",
      "format": "binary"
    },
    "uploader_user_id": {
      "type": "string",
      "description": "The ID of the user that will be credited with the image upload."
    }
  }
}
object OrganizationsUpdateOrganizationRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "nullable": true,
      "description": "The new name of the organization"
    },
    "slug": {
      "type": "string",
      "nullable": true,
      "description": "The new slug of the organization, which needs to be unique in the instance"
    },
    "public_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization, that is visible to both your frontend and backend."
    },
    "private_metadata": {
      "type": "object",
      "description": "Metadata saved on the organization that is only visible to your backend."
    },
    "admin_delete_enabled": {
      "type": "boolean",
      "nullable": true,
      "description": "If true, an admin can delete this organization with the Frontend API."
    },
    "max_allowed_memberships": {
      "type": "integer",
      "nullable": true,
      "description": "The maximum number of memberships allowed for this organization"
    }
  }
}
object Passkey
{
  "type": "object",
  "required": [
    "status",
    "strategy"
  ],
  "properties": {
    "nonce": {
      "enum": [
        "nonce"
      ],
      "type": "string"
    },
    "status": {
      "enum": [
        "verified"
      ],
      "type": "string"
    },
    "attempts": {
      "type": "integer",
      "nullable": true
    },
    "strategy": {
      "enum": [
        "passkey"
      ],
      "type": "string"
    },
    "expire_at": {
      "type": "integer",
      "nullable": true
    }
  }
}
object PhoneNumber
{
  "type": "object",
  "required": [
    "object",
    "phone_number",
    "verification",
    "linked_to",
    "reserved",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "enum": [
        "phone_number"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value.\n"
    },
    "reserved": {
      "type": "boolean"
    },
    "linked_to": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/IdentificationLink"
      }
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation\n"
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation\n"
    },
    "backup_codes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "nullable": true
    },
    "phone_number": {
      "type": "string"
    },
    "verification": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/components/schemas/OTP"
        },
        {
          "$ref": "#/components/schemas/Admin"
        }
      ],
      "nullable": true
    },
    "default_second_factor": {
      "type": "boolean"
    },
    "reserved_for_second_factor": {
      "type": "boolean"
    }
  }
}
object PhoneNumbersCreateNewPhoneNumberRequest
{
  "type": "object",
  "properties": {
    "primary": {
      "type": "boolean",
      "nullable": true,
      "description": "Create this phone number as the primary phone number for the user.\nDefault: false, unless it is the first phone number."
    },
    "user_id": {
      "type": "string",
      "description": "The ID representing the user"
    },
    "verified": {
      "type": "boolean",
      "nullable": true,
      "description": "When created, the phone number will be marked as verified."
    },
    "phone_number": {
      "type": "string",
      "description": "The new phone number. Must adhere to the E.164 standard for phone number format."
    },
    "reserved_for_second_factor": {
      "type": "boolean",
      "nullable": true,
      "description": "Create this phone number as reserved for multi-factor authentication.\nThe phone number must also be verified.\nIf there are no other reserved second factors, the phone number will be set as the default second factor."
    }
  }
}
object PhoneNumbersUpdateDetailsRequest
{
  "type": "object",
  "properties": {
    "primary": {
      "type": "boolean",
      "nullable": true,
      "description": "Set this phone number as the primary phone number for the user."
    },
    "verified": {
      "type": "boolean",
      "nullable": true,
      "description": "The phone number will be marked as verified."
    },
    "reserved_for_second_factor": {
      "type": "boolean",
      "nullable": true,
      "description": "Set this phone number as reserved for multi-factor authentication.\nThe phone number must also be verified.\nIf there are no other reserved second factors, the phone number will be set as the default second factor."
    }
  }
}
object ProxyCheck
{
  "type": "object",
  "required": [
    "object",
    "id",
    "domain_id",
    "last_run_at",
    "proxy_url",
    "successful",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "enum": [
        "proxy_check"
      ],
      "type": "string"
    },
    "domain_id": {
      "type": "string"
    },
    "proxy_url": {
      "type": "string"
    },
    "created_at": {
      "type": "integer"
    },
    "successful": {
      "type": "boolean"
    },
    "updated_at": {
      "type": "integer"
    },
    "last_run_at": {
      "type": "integer"
    }
  }
}
object ProxyChecksVerifyProxyConfigurationRequest
{
  "type": "object",
  "properties": {
    "domain_id": {
      "type": "string",
      "description": "The ID of the domain that will be updated."
    },
    "proxy_url": {
      "type": "string",
      "description": "The full URL of the proxy which will forward requests to the Clerk Frontend API for this domain. e.g. https://example.com/__clerk"
    }
  }
}
object RedirectURL
{
  "type": "object",
  "required": [
    "object",
    "id",
    "url",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "object": {
      "enum": [
        "redirect_url"
      ],
      "type": "string"
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation.\n"
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update.\n"
    }
  }
}
object RedirectUrLsCreateNewUrlRequest
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "nullable": false,
      "description": "The full url value prefixed with `https://` or a custom scheme e.g. `\"https://my-app.com/oauth-callback\"` or `\"my-app://oauth-callback\"`"
    }
  }
}
array RedirectUrLsListAllResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/RedirectURL"
  }
}
object SAML
{
  "type": "object",
  "required": [
    "status",
    "strategy",
    "external_verification_redirect_url",
    "expire_at"
  ],
  "properties": {
    "error": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/components/schemas/ClerkError"
        }
      ],
      "nullable": true
    },
    "status": {
      "enum": [
        "unverified",
        "verified",
        "failed",
        "expired",
        "transferable"
      ],
      "type": "string"
    },
    "attempts": {
      "type": "integer",
      "nullable": true
    },
    "strategy": {
      "enum": [
        "saml"
      ],
      "type": "string"
    },
    "expire_at": {
      "type": "integer"
    },
    "external_verification_redirect_url": {
      "type": "string",
      "nullable": true
    }
  }
}
object SAMLAccount
{
  "type": "object",
  "required": [
    "id",
    "object",
    "provider",
    "active",
    "email_address",
    "verification"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "object": {
      "enum": [
        "saml_account"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value.\n"
    },
    "provider": {
      "type": "string"
    },
    "last_name": {
      "type": "string",
      "nullable": true
    },
    "first_name": {
      "type": "string",
      "nullable": true
    },
    "verification": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/components/schemas/SAML"
        },
        {
          "$ref": "#/components/schemas/Ticket"
        }
      ],
      "nullable": true
    },
    "email_address": {
      "type": "string"
    },
    "public_metadata": {
      "type": "object"
    },
    "provider_user_id": {
      "type": "string",
      "nullable": true
    }
  }
}
object SAMLConnection
{
  "type": "object",
  "required": [
    "object",
    "id",
    "name",
    "domain",
    "idp_entity_id",
    "idp_sso_url",
    "idp_certificate",
    "acs_url",
    "sp_entity_id",
    "sp_metadata_url",
    "active",
    "provider",
    "user_count",
    "sync_user_attributes",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "domain": {
      "type": "string"
    },
    "object": {
      "enum": [
        "saml_connection"
      ],
      "type": "string"
    },
    "acs_url": {
      "type": "string"
    },
    "provider": {
      "type": "string"
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation.\n"
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update.\n"
    },
    "user_count": {
      "type": "integer"
    },
    "idp_sso_url": {
      "type": "string",
      "nullable": true
    },
    "idp_metadata": {
      "type": "string",
      "nullable": true
    },
    "sp_entity_id": {
      "type": "string"
    },
    "idp_entity_id": {
      "type": "string",
      "nullable": true
    },
    "idp_certificate": {
      "type": "string",
      "nullable": true
    },
    "sp_metadata_url": {
      "type": "string"
    },
    "allow_subdomains": {
      "type": "boolean"
    },
    "idp_metadata_url": {
      "type": "string",
      "nullable": true
    },
    "attribute_mapping": {
      "type": "object",
      "properties": {
        "user_id": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "email_address": {
          "type": "string"
        }
      }
    },
    "allow_idp_initiated": {
      "type": "boolean"
    },
    "sync_user_attributes": {
      "type": "boolean"
    }
  }
}
object SAMLConnections
{
  "type": "object",
  "required": [
    "data",
    "total_count"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SAMLConnection"
      }
    },
    "total_count": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of SAML Connections\n"
    }
  }
}
object SamlConnectionsBetaCreateNewConnectionRequest
{
  "type": "object",
  "required": [
    "name",
    "domain",
    "provider"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name to use as a label for this SAML Connection"
    },
    "domain": {
      "type": "string",
      "description": "The domain of your organization. Sign in flows using an email with this domain, will use this SAML Connection."
    },
    "provider": {
      "enum": [
        "saml_custom",
        "saml_okta",
        "saml_google",
        "saml_microsoft"
      ],
      "type": "string",
      "description": "The IdP provider of the connection."
    },
    "idp_sso_url": {
      "type": "string",
      "nullable": true,
      "description": "The Single-Sign On URL as provided by the IdP"
    },
    "idp_metadata": {
      "type": "string",
      "nullable": true,
      "description": "The XML content of the IdP metadata file. If present, it takes priority over the corresponding individual properties"
    },
    "idp_entity_id": {
      "type": "string",
      "nullable": true,
      "description": "The Entity ID as provided by the IdP"
    },
    "idp_certificate": {
      "type": "string",
      "nullable": true,
      "description": "The X.509 certificate as provided by the IdP"
    },
    "idp_metadata_url": {
      "type": "string",
      "nullable": true,
      "description": "The URL which serves the IdP metadata. If present, it takes priority over the corresponding individual properties"
    },
    "attribute_mapping": {
      "type": "object",
      "nullable": true,
      "properties": {
        "user_id": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "email_address": {
          "type": "string"
        }
      },
      "description": "Define the attribute name mapping between Identity Provider and Clerk's user properties"
    }
  }
}
object SamlConnectionsBetaUpdateConnectionByIdRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "nullable": true,
      "description": "The name of the new SAML Connection"
    },
    "active": {
      "type": "boolean",
      "nullable": true,
      "description": "Activate or de-activate the SAML Connection"
    },
    "domain": {
      "type": "string",
      "nullable": true,
      "description": "The domain to use for the new SAML Connection"
    },
    "idp_sso_url": {
      "type": "string",
      "nullable": true,
      "description": "The SSO url as provided by the IdP"
    },
    "idp_metadata": {
      "type": "string",
      "nullable": true,
      "description": "The XML content of the IdP metadata file. If present, it takes priority over the corresponding individual properties"
    },
    "idp_entity_id": {
      "type": "string",
      "nullable": true,
      "description": "The entity id as provided by the IdP"
    },
    "idp_certificate": {
      "type": "string",
      "nullable": true,
      "description": "The x509 certificated as provided by the IdP"
    },
    "allow_subdomains": {
      "type": "boolean",
      "nullable": true,
      "description": "Allow users with an email address subdomain to use this connection in order to authenticate"
    },
    "idp_metadata_url": {
      "type": "string",
      "nullable": true,
      "description": "The URL which serves the IdP metadata. If present, it takes priority over the corresponding individual properties and replaces them"
    },
    "attribute_mapping": {
      "type": "object",
      "nullable": true,
      "properties": {
        "user_id": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "email_address": {
          "type": "string"
        }
      },
      "description": "Define the atrtibute name mapping between Identity Provider and Clerk's user properties"
    },
    "allow_idp_initiated": {
      "type": "boolean",
      "nullable": true,
      "description": "Enable or deactivate IdP-initiated flows"
    },
    "sync_user_attributes": {
      "type": "boolean",
      "nullable": true,
      "description": "Controls whether to update the user's attributes in each sign-in"
    }
  }
}
object Session
{
  "type": "object",
  "required": [
    "object",
    "id",
    "user_id",
    "client_id",
    "status",
    "last_active_at",
    "expire_at",
    "abandon_at",
    "updated_at",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "actor": {
      "type": "object",
      "nullable": true
    },
    "object": {
      "enum": [
        "session"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value.\n"
    },
    "status": {
      "enum": [
        "active",
        "revoked",
        "ended",
        "expired",
        "removed",
        "abandoned",
        "replaced"
      ],
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "client_id": {
      "type": "string"
    },
    "expire_at": {
      "type": "integer"
    },
    "abandon_at": {
      "type": "integer"
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation.\n"
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update.\n"
    },
    "last_active_at": {
      "type": "integer"
    },
    "last_active_organization_id": {
      "type": "string",
      "nullable": true
    }
  }
}
object SessionsCreateSessionTokenFromTemplateResponse
{
  "type": "object",
  "properties": {
    "jwt": {
      "type": "string"
    },
    "object": {
      "enum": [
        "token"
      ],
      "type": "string"
    }
  }
}
array SessionsListSortedByCreationDateResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/Session"
  }
}
object SessionsVerifySessionRequest
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "The JWT that is sent via the `__session` cookie from your frontend.\nNote: this JWT must be associated with the supplied session ID."
    }
  }
}
object SignInToken
{
  "type": "object",
  "required": [
    "object",
    "id",
    "user_id",
    "status",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "nullable": true
    },
    "token": {
      "type": "string"
    },
    "object": {
      "enum": [
        "sign_in_token"
      ],
      "type": "string"
    },
    "status": {
      "enum": [
        "pending",
        "accepted",
        "revoked"
      ],
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation.\n"
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update.\n"
    }
  }
}
object SignUp
{
  "type": "object",
  "required": [
    "object",
    "id",
    "status",
    "password_enabled",
    "custom_action",
    "abandon_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "enum": [
        "sign_up_attempt"
      ],
      "type": "string"
    },
    "status": {
      "enum": [
        "missing_requirements",
        "complete",
        "abandoned"
      ],
      "type": "string"
    },
    "username": {
      "type": "string",
      "nullable": true
    },
    "last_name": {
      "type": "string",
      "nullable": true
    },
    "abandon_at": {
      "type": "integer"
    },
    "first_name": {
      "type": "string",
      "nullable": true
    },
    "external_id": {
      "type": "string",
      "nullable": true
    },
    "web3_wallet": {
      "type": "string",
      "nullable": true
    },
    "phone_number": {
      "type": "string",
      "nullable": true
    },
    "custom_action": {
      "type": "boolean"
    },
    "email_address": {
      "type": "string",
      "nullable": true
    },
    "verifications": {
      "type": "object"
    },
    "missing_fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "created_user_id": {
      "type": "string",
      "nullable": true
    },
    "optional_fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "public_metadata": {
      "type": "object"
    },
    "required_fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "unsafe_metadata": {
      "type": "object"
    },
    "external_account": {
      "type": "object"
    },
    "password_enabled": {
      "type": "boolean"
    },
    "unverified_fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "created_session_id": {
      "type": "string",
      "nullable": true
    }
  }
}
object SigninTokensCreateTokenRequest
{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string",
      "description": "The ID of the user that can use the newly created sign in token"
    },
    "expires_in_seconds": {
      "type": "integer",
      "default": 2592000,
      "description": "Optional parameter to specify the life duration of the sign in token in seconds.\nBy default, the duration is 30 days."
    }
  }
}
object SignupsUpdateSignUpByIdRequest
{
  "type": "object",
  "properties": {
    "external_id": {
      "type": "string",
      "nullable": true,
      "description": "The ID of the guest attempting to sign up as used in your external systems or your previous authentication solution.\nThis will be copied to the resulting user when the sign-up is completed."
    },
    "custom_action": {
      "type": "boolean",
      "description": "Specifies whether a custom action has run for this sign-up attempt.\nThis is important when your instance has been configured to require a custom action to run before converting a sign-up into a user.\nAfter executing any external business logic you deem necessary, you can mark the sign-up as ready-to-convert by setting `custom_action` to `true`."
    }
  }
}
object SvixURL
{
  "type": "object",
  "required": [
    "svix_url"
  ],
  "properties": {
    "svix_url": {
      "type": "string"
    }
  }
}
object Template
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "body": {
      "type": "string",
      "description": "the template body before variable interpolation"
    },
    "name": {
      "type": "string",
      "description": "user-friendly name of the template"
    },
    "slug": {
      "type": "string",
      "description": "machine-friendly name of the template"
    },
    "markup": {
      "type": "string",
      "description": "the editor markup used to generate the body of the template"
    },
    "object": {
      "enum": [
        "template"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value.\n"
    },
    "subject": {
      "type": "string",
      "nullable": true,
      "description": "email subject"
    },
    "position": {
      "type": "integer",
      "description": "position with the listing of templates"
    },
    "can_delete": {
      "type": "boolean",
      "description": "whether this template can be deleted"
    },
    "can_revert": {
      "type": "boolean",
      "description": "whether this template can be reverted to the corresponding system default"
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation.\n"
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update.\n"
    },
    "instance_id": {
      "type": "string",
      "nullable": true,
      "description": "the id of the instance the template belongs to"
    },
    "resource_type": {
      "type": "string",
      "description": "whether this is a system (default) or user overridden) template"
    },
    "template_type": {
      "type": "string",
      "description": "whether this is an email or SMS template"
    },
    "from_email_name": {
      "type": "string"
    },
    "delivered_by_clerk": {
      "type": "boolean"
    },
    "required_variables": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "list of variables that must be contained in the template body"
    },
    "available_variables": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "list of variables that are available for use in the template body"
    }
  }
}
object Ticket
{
  "type": "object",
  "required": [
    "status",
    "strategy"
  ],
  "properties": {
    "status": {
      "enum": [
        "unverified",
        "verified",
        "expired"
      ],
      "type": "string"
    },
    "attempts": {
      "type": "integer",
      "nullable": true
    },
    "strategy": {
      "enum": [
        "ticket"
      ],
      "type": "string"
    },
    "expire_at": {
      "type": "integer",
      "nullable": true
    }
  }
}
object TotalCount
{
  "type": "object",
  "required": [
    "object",
    "total_count"
  ],
  "properties": {
    "object": {
      "enum": [
        "total_count"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value.\n"
    },
    "total_count": {
      "type": "integer",
      "format": "int64"
    }
  }
}
object User
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "banned": {
      "type": "boolean",
      "description": "Flag to denote whether user is banned or not.\n"
    },
    "locked": {
      "type": "boolean",
      "description": "Flag to denote whether user is currently locked, i.e. restricted from signing in or not.\n"
    },
    "object": {
      "enum": [
        "user"
      ],
      "type": "string",
      "description": "String representing the object's type. Objects of the same type share the same value.\n"
    },
    "passkeys": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/schemas-Passkey"
      }
    },
    "username": {
      "type": "string",
      "nullable": true
    },
    "has_image": {
      "type": "boolean"
    },
    "image_url": {
      "type": "string"
    },
    "last_name": {
      "type": "string",
      "nullable": true
    },
    "created_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of creation.\n"
    },
    "first_name": {
      "type": "string",
      "nullable": true
    },
    "updated_at": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp of last update.\n"
    },
    "external_id": {
      "type": "string",
      "nullable": true
    },
    "totp_enabled": {
      "type": "boolean"
    },
    "web3_wallets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Web3Wallet"
      }
    },
    "phone_numbers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PhoneNumber"
      }
    },
    "saml_accounts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SAMLAccount"
      }
    },
    "last_active_at": {
      "type": "integer",
      "format": "int64",
      "example": 1700690400000,
      "nullable": true,
      "description": "Unix timestamp of the latest session activity, with day precision.\n"
    },
    "email_addresses": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EmailAddress"
      }
    },
    "last_sign_in_at": {
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "description": "Unix timestamp of last sign-in.\n"
    },
    "public_metadata": {
      "type": "object"
    },
    "unsafe_metadata": {
      "type": "object"
    },
    "password_enabled": {
      "type": "boolean"
    },
    "private_metadata": {
      "type": "object",
      "nullable": true
    },
    "external_accounts": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "profile_image_url": {
      "type": "string",
      "deprecated": true
    },
    "two_factor_enabled": {
      "type": "boolean"
    },
    "backup_code_enabled": {
      "type": "boolean"
    },
    "delete_self_enabled": {
      "type": "boolean",
      "description": "If enabled, user can delete themselves via FAPI.\n"
    },
    "primary_web3_wallet_id": {
      "type": "string",
      "nullable": true
    },
    "primary_phone_number_id": {
      "type": "string",
      "nullable": true
    },
    "primary_email_address_id": {
      "type": "string",
      "nullable": true
    },
    "lockout_expires_in_seconds": {
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "description": "The number of seconds remaining until the lockout period expires for a locked user. A null value for a locked user indicates that lockout never expires.\n"
    },
    "create_organization_enabled": {
      "type": "boolean",
      "description": "If enabled, user can create organizations via FAPI.\n"
    },
    "verification_attempts_remaining": {
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "description": "The number of verification attempts remaining until the user is locked. Null if account lockout is not enabled. Note: if a user is locked explicitly via the Backend API, they may still have verification attempts remaining.\n"
    }
  }
}
object UsersCreateNewUserRequest
{
  "type": "object",
  "properties": {
    "password": {
      "type": "string",
      "nullable": true,
      "description": "The plaintext password to give the user.\nMust be at least 8 characters long, and can not be in any list of hacked passwords."
    },
    "username": {
      "type": "string",
      "nullable": true,
      "description": "The username to give to the user.\nIt must be unique across your instance."
    },
    "last_name": {
      "type": "string",
      "nullable": true,
      "description": "The last name to assign to the user"
    },
    "created_at": {
      "type": "string",
      "description": "A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`)."
    },
    "first_name": {
      "type": "string",
      "nullable": true,
      "description": "The first name to assign to the user"
    },
    "external_id": {
      "type": "string",
      "nullable": true,
      "description": "The ID of the user as used in your external systems or your previous authentication solution.\nMust be unique across your instance."
    },
    "totp_secret": {
      "type": "string",
      "description": "In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.\nPlease note that currently the supported options are:\n* Period: 30 seconds\n* Code length: 6 digits\n* Algorithm: SHA1"
    },
    "web3_wallet": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Web3 wallets to add to the user.\nMust be unique across your instance.\nThe first wallet will be set as the user's primary wallet."
    },
    "backup_codes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them.\nYou must provide the backup codes in plain format or the corresponding bcrypt digest."
    },
    "phone_number": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Phone numbers to add to the user.\nMust be unique across your instance.\nThe first phone number will be set as the user's primary phone number."
    },
    "email_address": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Email addresses to add to the user.\nMust be unique across your instance.\nThe first email address will be set as the user's primary email address."
    },
    "password_digest": {
      "type": "string",
      "description": "In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.\nThe digests should be generated with one of the supported algorithms.\nThe hashing algorithm can be specified using the `password_hasher` property."
    },
    "password_hasher": {
      "enum": [
        "argon2i",
        "argon2id",
        "bcrypt",
        "bcrypt_sha256_django",
        "md5",
        "pbkdf2_sha256",
        "pbkdf2_sha256_django",
        "pbkdf2_sha1",
        "phpass",
        "scrypt_firebase",
        "scrypt_werkzeug",
        "sha256"
      ],
      "type": "string",
      "description": "The hashing algorithm that was used to generate the password digest.\nThe algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), [bcrypt_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/),\n[md5](https://en.wikipedia.org/wiki/MD5), pbkdf2_sha256, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/),\n[phpass](https://www.openwall.com/phpass/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/),\n[scrypt_werkzeug](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash), [sha256](https://en.wikipedia.org/wiki/SHA-2)\nand the [argon2](https://argon2.online/) variants argon2i and argon2id.\n\nIf you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support).\n\nNote: for password hashers considered insecure (at this moment MD5 and SHA256), the corresponding user password hashes will be transparently migrated to Bcrypt (a secure hasher) upon the user's first successful password sign in.\nInsecure schemes are marked with `(insecure)` in the list below.\n\nEach of the supported hashers expects the incoming digest to be in a particular format. Specifically:\n\n**bcrypt:** The digest should be of the following form:\n\n`$<algorithm version>$<cost>$<salt & hash>`\n\n**bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django):\n\n`bcrypt_sha256$$<algorithm version>$<cost>$<salt & hash>`\n\n**md5** (insecure): The digest should follow the regular form e.g.:\n\n`5f4dcc3b5aa765d61d8327deb882cf99`\n\n**pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows:\n\n`pbkdf2_sha256$<iterations>$<salt>$<hash>`\n\nNote: Both the salt and the hash are expected to be base64-encoded.\n\n**pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django):\n\n`pbkdf2_sha256$<iterations>$<salt>$<hash>`\n\nNote: The salt is expected to be un-encoded, the hash is expected base64-encoded.\n\n**pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences:\n1. uses sha1 instead of sha256\n2. accepts the hash as a hex-encoded string\n\nThe format is the following:\n\n`pbkdf2_sha1$<iterations>$<salt>$<hash-as-hex-string>`\n\n**phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections:\n\nThe format is the following:\n\n`$P$<rounds><salt><encoded-checksum>`\n\n- $P$ is the prefix used to identify phpass hashes.\n- rounds is a single character encoding a 6-bit integer representing the number of rounds used.\n- salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt.\n- checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5.\n\n**scrypt_firebase:** The Firebase-specific variant of scrypt.\nThe value is expected to have 6 segments separated by the $ character and include the following information:\n\n_hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase.\n_salt:_ The salt used to generate the above hash. Again, this is given when exporting the user.\n_signer key:_ The base64 encoded signer key.\n_salt separator:_ The base64 encoded salt separator.\n_rounds:_ The number of rounds the algorithm needs to run.\n_memory cost:_ The cost of the algorithm run\n\nThe first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase.\nThe other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters.\n\nOnce you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it:\n\n`<hash>$<salt>$<signer key>$<salt separator>$<rounds>$<memory cost>`\n\n**scrypt_werkzeug:** The Werkzeug-specific variant of scrypt.\n\n  The value is expected to have 3 segments separated by the $ character and include the following information:\n\n  _algorithm args:_ The algorithm used to generate the hash.\n  _salt:_ The salt used to generate the above hash.\n  _hash:_ The actual Base64 hash.\n\n  The algorithm args are the parameters used to generate the hash and are included in the digest.\n\n**argon2i:** Algorithms in the argon2 family generate digests that encode the following information:\n\n_version (v):_ The argon version, version 19 is assumed\n_memory (m):_ The memory used by the algorithm (in kibibytes)\n_iterations (t):_ The number of iterations to perform\n_parallelism (p):_ The number of threads to use\n\nParts are demarcated by the `$` character, with the first part identifying the algorithm variant.\nThe middle part is a comma-separated list of the encoding options (memory, iterations, parallelism).\nThe final part is the actual digest.\n\n`$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc`\n\n**argon2id:** See the previous algorithm for an explanation of the formatting.\n\nFor the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`:\n\n`$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU`\n\n**sha256** (insecure): The digest should be a 64-length hex string, e.g.:\n\n`9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08`"
    },
    "public_metadata": {
      "type": "object",
      "description": "Metadata saved on the user, that is visible to both your Frontend and Backend APIs"
    },
    "unsafe_metadata": {
      "type": "object",
      "description": "Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.\nNote: Since this data can be modified from the frontend, it is not guaranteed to be safe."
    },
    "private_metadata": {
      "type": "object",
      "description": "Metadata saved on the user, that is only visible to your Backend API"
    },
    "skip_password_checks": {
      "type": "boolean",
      "description": "When set to `true` all password checks are skipped.\nIt is recommended to use this method only when migrating plaintext passwords to Clerk.\nUpon migration the user base should be prompted to pick stronger password."
    },
    "skip_password_requirement": {
      "type": "boolean",
      "description": "When set to `true`, `password` is not required anymore when creating the user and can be omitted.\nThis is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords.\nPlease note that you cannot use this flag if password is the only way for a user to sign into your instance."
    }
  }
}
object UsersDisableMfaResponse
{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string",
      "nullable": false
    }
  }
}
Load more schemas