# Create Access Code Form

## \<CreateAccessCodeForm /> [(preview)](https://react.seam.co/?path=/docs/components-createaccesscodeform--docs)

The create access code form component allows you to create an access code.

```
<CreateAccessCodeForm deviceId={deviceId}/>
```

### Size: Mobile

### Props

| Name      | Type     | Description                                                                                                                                                                             |
| --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| deviceId  | string   | Optional. The ID for the device for which the access code will be created for. When set, it will skip the device selection pane.                                                        |
| onSuccess | function | <p>Optional callback fired when an access code is created.<br><br>Signature: <code>(accessCode: AccessCode) => void</code></p>                                                          |
| onError   | function | <p>Optional callback triggered if an error occurs during the creation of an access code.<br><br>Signature: <code>(err: SeamError, params: UseCreateAccessCodeParams) => void</code></p> |
| onBack    | function | <p>Optional callback fired when the Back chevron button is clicked.<br><br>Signature: <code>() => void</code></p>                                                                       |
| className | string   | Optional class name to add to the rendered component's containing element.                                                                                                              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seam.co/latest/ui-components/overview/react-components/create-access-code-form.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
