> ## Documentation Index
> Fetch the complete documentation index at: https://turnkey-0e7c1f5b-traian-remove-eip-712-note.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Signup

> Onboard a new user.

export const NestedParam = ({parentKey, childKey, type, required, description, children}) => {
  const fullKey = `${parentKey}.${childKey}`;
  const anchorId = `body-${fullKey.replace(/\./g, '-')}`;
  return <div className="py-6 border-gray-100 dark:border-gray-800 border-b last:border-b-0">
  <div className="flex font-mono text-sm group/param-head param-head break-all relative" id={anchorId}>
    <div className="flex-1 flex content-start py-0.5 mr-5">
      <div className="flex items-center flex-wrap gap-2">
        <div className="absolute -top-1.5">
          <a href={`#${anchorId}`} className="-ml-[2.1rem] flex items-center opacity-0 border-0 group-hover/param-head:opacity-100 py-2 [.expandable-content_&]:-ml-[2.1rem]" aria-label="Navigate to header">
            <div className="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20">
              <svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512">
                <path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path>
              </svg>
            </div>
          </a>
        </div>
        <div className="font-semibold text-primary dark:text-primary-light cursor-pointer overflow-wrap-anywhere">
          <span className="text-gray-500 dark:text-gray-400">{parentKey}.</span>
          {childKey}
        </div>
        <div className="inline items-center gap-2 text-xs font-medium [&_div]:inline [&_div]:mr-2 [&_div]:leading-5">
          <div className="flex items-center px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-gray-600 dark:text-gray-200 font-medium break-all">
            <span>{type}</span>
          </div>
          {required && <span className="px-2 py-0.5 rounded-md bg-red-100/50 dark:bg-red-400/10 text-red-600 dark:text-red-300 font-medium whitespace-nowrap">
              required
            </span>}
        </div>
      </div>
    </div>
  </div>
  {children && <div className="mt-4">
      <div className="prose prose-sm prose-gray dark:prose-invert">
        {children}
      </div>
    </div>}
</div>;
};

export const H3Bordered = ({text}) => <h3 id={text.toLowerCase()} className="border-b pb-2.5 border-gray-100 dark:border-gray-800">
    {text}
  </h3>;

<div class="flex w-full flex-col bg-background-light dark:bg-background-dark border-standard rounded-2xl p-1.5 mb-4">
  <div class="flex items-center space-x-1.5">
    <div class="relative flex-1 flex gap-2 min-w-0 rounded-xl items-center cursor-pointer p-1.5 border-standard">
      <div class="rounded-lg font-bold px-1.5 py-0.5 text-sm leading-5 bg-blue-400/20 dark:bg-blue-400/20 text-blue-700 dark:text-blue-400">POST</div>
      <div class="text-sm font-mono text-gray-800 dark:text-white">[https://authproxy.turnkey.com/v1/signup\_v2](https://authproxy.turnkey.com/v1/signup_v2)</div>
    </div>
  </div>
</div>

<H3Bordered text="Authorizations" />

<ParamField header="X-Auth-Proxy-Config-Id" type="string" required={true}>
  Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
</ParamField>

<H3Bordered text="Body" />

<ParamField body="userEmail" type="string" required={false}>
  userEmail field
</ParamField>

<ParamField body="userPhoneNumber" type="string" required={false}>
  userPhoneNumber field
</ParamField>

<ParamField body="userTag" type="string" required={false}>
  userTag field
</ParamField>

<ParamField body="userName" type="string" required={false}>
  userName field
</ParamField>

<ParamField body="organizationName" type="string" required={false}>
  organizationName field
</ParamField>

<ParamField body="verificationToken" type="string" required={false}>
  verificationToken field
</ParamField>

<ParamField body="apiKeys" type="array" required={true} path="apiKeys">
  <p>A list of API Key parameters. This field, if not needed, should be an empty array in your request body.</p>

  <Expandable title="item details">
    <NestedParam parentKey="apiKeys" childKey="apiKeyName" type="string" required={true} default="">
      Human-readable name for an API Key.
    </NestedParam>

    <NestedParam parentKey="apiKeys" childKey="publicKey" type="string" required={true} default="">
      The public component of a cryptographic key pair used to sign messages and transactions.
    </NestedParam>

    <NestedParam parentKey="apiKeys" childKey="curveType" type="enum<string>" required={true} default="">
      Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
    </NestedParam>

    <NestedParam parentKey="apiKeys" childKey="expirationSeconds" type="string" required={false} default="">
      Optional window (in seconds) indicating how long the API Key should last.
    </NestedParam>
  </Expandable>
</ParamField>

<ParamField body="authenticators" type="array" required={true} path="authenticators">
  <p>A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.</p>

  <Expandable title="item details">
    <NestedParam parentKey="authenticators" childKey="authenticatorName" type="string" required={true} default="">
      Human-readable name for an Authenticator.
    </NestedParam>

    <NestedParam parentKey="authenticators" childKey="challenge" type="string" required={true} default="">
      Challenge presented for authentication purposes.
    </NestedParam>

    <ParamField body="attestation" type="object" required={true} path="authenticators.attestation">
      <p>attestation field</p>

      <Expandable title="details">
        <NestedParam parentKey="authenticators.attestation" childKey="credentialId" type="string" required={true} default="">
          The cbor encoded then base64 url encoded id of the credential.
        </NestedParam>

        <NestedParam parentKey="authenticators.attestation" childKey="clientDataJson" type="string" required={true} default="">
          A base64 url encoded payload containing metadata about the signing context and the challenge.
        </NestedParam>

        <NestedParam parentKey="authenticators.attestation" childKey="attestationObject" type="string" required={true} default="">
          A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
        </NestedParam>

        <NestedParam parentKey="authenticators.attestation" childKey="transports" type="enum<string[]>" required={true} default="">
          Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
        </NestedParam>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="oauthProviders" type="array" required={true} path="oauthProviders">
  <p>A list of Oauth providers. This field, if not needed, should be an empty array in your request body.</p>

  <Expandable title="item details">
    <NestedParam parentKey="oauthProviders" childKey="providerName" type="string" required={true} default="">
      Human-readable name to identify a Provider.
    </NestedParam>

    <NestedParam parentKey="oauthProviders" childKey="oidcToken" type="string" required={false} default="">
      Base64 encoded OIDC token
    </NestedParam>

    <ParamField body="oidcClaims" type="object" required={false} path="oauthProviders.oidcClaims">
      <p>oidcClaims field</p>

      <Expandable title="details">
        <NestedParam parentKey="oauthProviders.oidcClaims" childKey="iss" type="string" required={true} default="">
          The issuer identifier from the OIDC token (iss claim)
        </NestedParam>

        <NestedParam parentKey="oauthProviders.oidcClaims" childKey="sub" type="string" required={true} default="">
          The subject identifier from the OIDC token (sub claim)
        </NestedParam>

        <NestedParam parentKey="oauthProviders.oidcClaims" childKey="aud" type="string" required={true} default="">
          The audience from the OIDC token (aud claim)
        </NestedParam>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="wallet" type="object" required={false} path="wallet">
  <p>wallet field</p>

  <Expandable title="details">
    <NestedParam parentKey="wallet" childKey="walletName" type="string" required={true} default="">
      Human-readable name for a Wallet.
    </NestedParam>

    <ParamField body="accounts" type="array" required={true} path="wallet.accounts">
      <p>A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.</p>

      <Expandable title="item details">
        <NestedParam parentKey="wallet.accounts" childKey="curve" type="enum<string>" required={true} default="">
          Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
        </NestedParam>

        <NestedParam parentKey="wallet.accounts" childKey="pathFormat" type="enum<string>" required={true} default="">
          Enum options: `PATH_FORMAT_BIP32`
        </NestedParam>

        <NestedParam parentKey="wallet.accounts" childKey="path" type="string" required={true} default="">
          Path used to generate a wallet Account.
        </NestedParam>

        <NestedParam parentKey="wallet.accounts" childKey="addressFormat" type="enum<string>" required={true} default="">
          Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
        </NestedParam>

        <NestedParam parentKey="wallet.accounts" childKey="name" type="string" required={false} default="">
          Optional human-readable name for the account.
        </NestedParam>
      </Expandable>
    </ParamField>

    <NestedParam parentKey="wallet" childKey="mnemonicLength" type="number" required={false} default="">
      Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
    </NestedParam>
  </Expandable>
</ParamField>

<ParamField body="clientSignature" type="object" required={false} path="clientSignature">
  <p>clientSignature field</p>

  <Expandable title="details">
    <NestedParam parentKey="clientSignature" childKey="publicKey" type="string" required={true} default="">
      The public component of a cryptographic key pair used to create the signature.
    </NestedParam>

    <NestedParam parentKey="clientSignature" childKey="scheme" type="enum<string>" required={true} default="">
      Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
    </NestedParam>

    <NestedParam parentKey="clientSignature" childKey="message" type="string" required={true} default="">
      The message that was signed.
    </NestedParam>

    <NestedParam parentKey="clientSignature" childKey="signature" type="string" required={true} default="">
      The cryptographic signature over the message.
    </NestedParam>
  </Expandable>
</ParamField>

<H3Bordered text="Response" />

A successful response returns the following fields:

<ResponseField name="organizationId" type="string" required={true}>organizationId field</ResponseField>

<ResponseField name="wallet" type="object" required={false}>
  wallet field

  <Expandable title="wallet details">
    <NestedParam parentKey="wallet" childKey="walletId" type="string" required={true}>
      walletId field
    </NestedParam>

    <NestedParam parentKey="wallet" childKey="addresses" type="array" required={true}>
      A list of account addresses.

      <Expandable title="addresses details">
        <NestedParam parentKey="wallet.addresses" childKey="item" type="string" required={true}>
          item field
        </NestedParam>
      </Expandable>
    </NestedParam>
  </Expandable>
</ResponseField>

<ResponseField name="userId" type="string" required={true}>Root user ID created for this sub-organization</ResponseField>

<ResponseField name="appProofs" type="array" required={false}>
  A list of App Proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations.

  <Expandable title="appProofs details">
    <NestedParam parentKey="appProofs" childKey="scheme" type="enum" required={true}>
      scheme field

      Enum options: `SIGNATURE_SCHEME_EPHEMERAL_KEY_P256`
    </NestedParam>

    <NestedParam parentKey="appProofs" childKey="publicKey" type="string" required={true}>
      Ephemeral public key.
    </NestedParam>

    <NestedParam parentKey="appProofs" childKey="proofPayload" type="string" required={true}>
      JSON serialized AppProofPayload.
    </NestedParam>

    <NestedParam parentKey="appProofs" childKey="signature" type="string" required={true}>
      Signature over hashed proof\_payload.
    </NestedParam>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash title="cURL" theme={null}
  curl --request POST \
    --url https://authproxy.turnkey.com/v1/signup_v2 \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --header "X-Auth-Proxy-Config-Id: <string> (see Authorizations)" \
    --data '{
      "userEmail": "<string>",
      "userPhoneNumber": "<string>",
      "userTag": "<string>",
      "userName": "<string>",
      "organizationName": "<string>",
      "verificationToken": "<string>",
      "apiKeys": [
          {
              "apiKeyName": "<string>",
              "publicKey": "<string>",
              "curveType": "<API_KEY_CURVE_P256>",
              "expirationSeconds": "<string>"
          }
      ],
      "authenticators": [
          {
              "authenticatorName": "<string>",
              "challenge": "<string>",
              "attestation": {
                  "credentialId": "<string>",
                  "clientDataJson": "<string>",
                  "attestationObject": "<string>",
                  "transports": [
                      "<AUTHENTICATOR_TRANSPORT_BLE>"
                  ]
              }
          }
      ],
      "oauthProviders": [
          {
              "providerName": "<string>",
              "oidcToken": "<string>",
              "oidcClaims": {
                  "iss": "<string>",
                  "sub": "<string>",
                  "aud": "<string>"
              }
          }
      ],
      "wallet": {
          "walletName": "<string>",
          "accounts": [
              {
                  "curve": "<CURVE_SECP256K1>",
                  "pathFormat": "<PATH_FORMAT_BIP32>",
                  "path": "<string>",
                  "addressFormat": "<ADDRESS_FORMAT_UNCOMPRESSED>",
                  "name": "<string>"
              }
          ],
          "mnemonicLength": "<number>"
      },
      "clientSignature": {
          "publicKey": "<string>",
          "scheme": "<CLIENT_SIGNATURE_SCHEME_API_P256>",
          "message": "<string>",
          "signature": "<string>"
      }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "organizationId": "<string>",
    "wallet": {
      "walletId": "<string>",
      "addresses": [
        "<string>"
      ]
    },
    "userId": "<string>",
    "appProofs": [
      {
        "scheme": "<SIGNATURE_SCHEME_EPHEMERAL_KEY_P256>",
        "publicKey": "<string>",
        "proofPayload": "<string>",
        "signature": "<string>"
      }
    ]
  }
  ```
</ResponseExample>
