# signup

The signup() method for the SurrealDB Swift SDK signs a new record-access user up.

Signs a new record-access user up and returns the issued tokens.

```swift title="Method Syntax"
let tokens = try await client.signup(credentials)
```

## Arguments

<table>
    <thead>
        <tr>
            <th colspan="2" scope="col">Arguments</th>
            <th colspan="2" scope="col">Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="2" scope="row" data-label="Arguments">
                <code>credentials</code>
                <label label="required" />
            </td>
            <td colspan="2" scope="row" data-label="Description">
                The record-access credentials to sign up with, created via <code>.accessRecord</code>.
            </td>
        </tr>
    </tbody>
</table>

## Example usage

```swift
let tokens = try await client.signup(.accessRecord(
    namespace: "myapp",
    database: "mydb",
    access: "account",
        variables: ["email": .string("new@example.com"),
        "pass": .string("secret")]
))
```

See [Authentication](/docs/reference/swift/concepts/authentication.md) for more detail.
