Skip to main content

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.

Flows allow you to customize authentication behavior with visual flow editors. Use these methods to manage flows in your Auth0 tenant.

List Flows

Retrieve a list of flows in your tenant.
func (c *Client) List(
    ctx context.Context,
    request *management.ListFlowsRequestParameters,
    opts ...option.RequestOption,
) (*core.Page[*int, *management.FlowSummary, *management.ListFlowsOffsetPaginatedResponseContent], error)
request
*management.ListFlowsRequestParameters
Optional query parameters for listing flows
*core.Page[*int, *management.FlowSummary, *management.ListFlowsOffsetPaginatedResponseContent]
Paginated list of flow summaries

Example

page, err := managementClient.Flows.List(context.Background(), &management.ListFlowsRequestParameters{
    PerPage: auth0.Int(10),
})
if err != nil {
    // Handle error
}

for _, flow := range page.Results {
    fmt.Printf("Flow: %s\n", flow.GetName())
}

Create Flow

Create a new flow in your tenant.
func (c *Client) Create(
    ctx context.Context,
    request *management.CreateFlowRequestContent,
    opts ...option.RequestOption,
) (*management.CreateFlowResponseContent, error)
request
*management.CreateFlowRequestContent
required
The flow to create
*management.CreateFlowResponseContent
The created flow with server-generated fields

Example

flow, err := managementClient.Flows.Create(context.Background(), &management.CreateFlowRequestContent{
    Name: "My Custom Flow",
})
if err != nil {
    // Handle error
}
fmt.Printf("Created flow: %s\n", flow.GetID())

Get Flow

Retrieve a specific flow by ID.
func (c *Client) Get(
    ctx context.Context,
    id string,
    request *management.GetFlowRequestParameters,
    opts ...option.RequestOption,
) (*management.GetFlowResponseContent, error)
id
string
required
Flow identifier
*management.GetFlowResponseContent
The requested flow with all details

Example

flow, err := managementClient.Flows.Get(context.Background(), "flow_abc123", &management.GetFlowRequestParameters{})
if err != nil {
    // Handle error
}
fmt.Printf("Flow name: %s\n", flow.GetName())

Update Flow

Update an existing flow.
func (c *Client) Update(
    ctx context.Context,
    id string,
    request *management.UpdateFlowRequestContent,
    opts ...option.RequestOption,
) (*management.UpdateFlowResponseContent, error)
id
string
required
Flow identifier
request
*management.UpdateFlowRequestContent
required
Updated flow data
*management.UpdateFlowResponseContent
The updated flow

Example

flow, err := managementClient.Flows.Update(context.Background(), "flow_abc123", &management.UpdateFlowRequestContent{
    Name: auth0.String("Updated Flow Name"),
})
if err != nil {
    // Handle error
}

Delete Flow

Delete a flow.
func (c *Client) Delete(
    ctx context.Context,
    id string,
    opts ...option.RequestOption,
) error
id
string
required
Flow id

Example

err := managementClient.Flows.Delete(context.Background(), "flow_abc123")
if err != nil {
    // Handle error
}

Sub-resources

The Flows client also provides access to related resources:
  • Executions: managementClient.Flows.Executions - Manage flow executions
  • Vault: managementClient.Flows.Vault - Manage flow vault connections

Build docs developers (and LLMs) love