---
title: "DynamicTrigger: register() instance method"
sidebarTitle: "register()"
description: "Use this method to register a new configuration with the DynamicTrigger."
---

## Parameters

<ResponseField name="id" type="string" required>
  The id of the registration. The identifier you use will be available in the `context.source.id`
  when the Job runs. It will also be used to unregister.
</ResponseField>
<ResponseField name="params" type="Object" required>
  The shape of this object will depend on the type of event you set when constructing the
  `DynamicTrigger`.
</ResponseField>
<ResponseField name="options" type="object">
  <Expandable title="fields" defaultOpen>
    <ResponseField name="accountId" type="string">
      An optional account ID to use when running the job. This will be available in the Job
      [context](/sdk/context) and can be used in [auth
      resolvers](/sdk/triggerclient/instancemethods/define-auth-resolver)
    </ResponseField>
    <ResponseField name="filter" type="EventFilter">
      An optional filter to apply to the event. See our [EventFilter
      guide](/documentation/guides/event-filter) for more
    </ResponseField>
  </Expandable>
</ResponseField>

## Returns

<ResponseField name="id" type="string">
  The id of the schedule that was registered.
</ResponseField>

<RequestExample>

```typescript GitHub issue opened
await dynamicOnIssueOpenedTrigger.register(`${owner}/${repo}`, {
  owner,
  repo,
});
```

</RequestExample>
