Documentation Index
Fetch the complete documentation index at: https://mintlify.com/auth0/go-auth0/llms.txt
Use this file to discover all available pages before exploring further.
Forms allow you to customize authentication experiences with custom form fields and styling. Use these methods to manage forms in your Auth0 tenant.
Retrieve a list of forms in your tenant.
func (c *Client) List(
ctx context.Context,
request *management.ListFormsRequestParameters,
opts ...option.RequestOption,
) (*core.Page[*int, *management.FormSummary, *management.ListFormsOffsetPaginatedResponseContent], error)
request
*management.ListFormsRequestParameters
Optional query parameters for listing forms
Number of results per page (default: 50)
Include total count in response (default: true)
*core.Page[*int, *management.FormSummary, *management.ListFormsOffsetPaginatedResponseContent]
Paginated list of form summaries
Example
page, err := managementClient.Forms.List(context.Background(), &management.ListFormsRequestParameters{
PerPage: auth0.Int(10),
})
if err != nil {
// Handle error
}
for _, form := range page.Results {
fmt.Printf("Form: %s\n", form.GetName())
}
Create a new form in your tenant.
func (c *Client) Create(
ctx context.Context,
request *management.CreateFormRequestContent,
opts ...option.RequestOption,
) (*management.CreateFormResponseContent, error)
request
*management.CreateFormRequestContent
required
The form to create
Custom messages for the form
Supported languages for the form
Form nodes (fields and components)
Custom styling for the form
*management.CreateFormResponseContent
The created form with server-generated fields
Unique identifier for the form
When the form was created
When the form was last updated
Example
form, err := managementClient.Forms.Create(context.Background(), &management.CreateFormRequestContent{
Name: "Custom Login Form",
})
if err != nil {
// Handle error
}
fmt.Printf("Created form: %s\n", form.GetID())
Retrieve a specific form by ID.
func (c *Client) Get(
ctx context.Context,
id string,
request *management.GetFormRequestParameters,
opts ...option.RequestOption,
) (*management.GetFormResponseContent, error)
The ID of the form to retrieve
*management.GetFormResponseContent
The requested form with all details including nodes, styling, and translations
Example
form, err := managementClient.Forms.Get(context.Background(), "form_abc123", &management.GetFormRequestParameters{})
if err != nil {
// Handle error
}
fmt.Printf("Form name: %s\n", form.GetName())
Update an existing form.
func (c *Client) Update(
ctx context.Context,
id string,
request *management.UpdateFormRequestContent,
opts ...option.RequestOption,
) (*management.UpdateFormResponseContent, error)
The ID of the form to update
request
*management.UpdateFormRequestContent
required
*management.UpdateFormResponseContent
The updated form
Example
form, err := managementClient.Forms.Update(context.Background(), "form_abc123", &management.UpdateFormRequestContent{
Name: auth0.String("Updated Form Name"),
})
if err != nil {
// Handle error
}
Delete a form.
func (c *Client) Delete(
ctx context.Context,
id string,
opts ...option.RequestOption,
) error
The ID of the form to delete
Example
err := managementClient.Forms.Delete(context.Background(), "form_abc123")
if err != nil {
// Handle error
}