> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Applications

> SDK reference for the Applications resource (TypeScript & Python)

## Create Application

`POST /v1/applications` — createApplication

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.createApplication({
    body: {
      source: 'https://example.com'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.create_application(
      source="https://example.com",
  )
  print(result)
  ```
</CodeGroup>

## List Applications

`GET /v1/applications` — listApplications

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.listApplications();
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.list_applications()
  print(result)
  ```
</CodeGroup>

## Get Application

`GET /v1/applications/{applicationId}` — getApplication

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.getApplication({
    path: {
      applicationId: 'your-applicationId'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.get_application(
      "your-application-id",
  )
  print(result)
  ```
</CodeGroup>

## Delete Application

`DELETE /v1/applications/{applicationId}` — deleteApplication

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.deleteApplication({
    path: {
      applicationId: 'your-applicationId'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.delete_application(
      "your-application-id",
  )
  print(result)
  ```
</CodeGroup>

## List Application Identities

`GET /v1/applications/{applicationId}/identities` — listApplicationIdentities

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.listApplicationIdentities({
    path: {
      applicationId: 'your-applicationId'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.list_application_identities(
      "your-application-id",
  )
  print(result)
  ```
</CodeGroup>

## List Application Authentication Flows

`GET /v1/applications/{applicationId}/auth-flows` — listAuthFlows

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.listAuthFlows({
    path: {
      applicationId: 'your-applicationId'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.list_auth_flows(
      "your-application-id",
  )
  print(result)
  ```
</CodeGroup>

## Create Authentication Flow

`POST /v1/applications/{applicationId}/auth-flows` — createAuthFlow

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.createAuthFlow({
    path: {
      applicationId: 'your-applicationId'
    },
    body: {
      name: 'string',
      methods: ['username_password']
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.create_auth_flow(
      "your-application-id",
      name="string",
      methods=["username_password"],
  )
  print(result)
  ```
</CodeGroup>

## Update Authentication Flow

`PATCH /v1/applications/{applicationId}/auth-flows/{authFlowId}` — updateAuthFlow

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.updateAuthFlow({
    path: {
      applicationId: 'your-applicationId',
      authFlowId: 'your-authFlowId'
    },
    body: {}
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.update_auth_flow(
      "your-application-id",
      "your-auth-flow-id",
  )
  print(result)
  ```
</CodeGroup>

## Delete Authentication Flow

`DELETE /v1/applications/{applicationId}/auth-flows/{authFlowId}` — deleteAuthFlow

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.deleteAuthFlow({
    path: {
      applicationId: 'your-applicationId',
      authFlowId: 'your-authFlowId'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.delete_auth_flow(
      "your-application-id",
      "your-auth-flow-id",
  )
  print(result)
  ```
</CodeGroup>

## Create Identity Token

`POST /v1/applications/{applicationId}/tokens` — createIdentityToken

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Applications } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Applications.createIdentityToken({
    path: {
      applicationId: 'your-applicationId'
    },
    body: {
      callbackUrl: 'https://example.com/callback'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.applications.create_identity_token(
      "your-application-id",
      callback_url="https://example.com/callback",
  )
  print(result)
  ```
</CodeGroup>
