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

# Create a Subscription

export const ParamList = ({items = [], is_child = false}) => {
  return items.map(item => {
    const field_props = {
      id: Math.random().toString(),
      body: item.name,
      name: item.name,
      type: item.type,
      required: item.required
    };
    const enums = item.enums || [];
    const items = item.items || [];
    const has_items = items?.length > 0;
    const has_enums = enums?.length > 0;
    const should_default_open = item.defaultOpen || false;
    const render_child_item = () => {
      const child_props = {
        title: has_enums ? "Possible enum values" : "properties"
      };
      if (should_default_open) child_props.defaultOpen = true;
      const has_inline_enums = has_enums && enums.every(enum_item => typeof enum_item === 'string') && enums.map((enum_item, idx) => {
        const is_last = idx === enums.length - 1;
        const is_2nd_to_last = idx === enums.length - 2;
        return <>
            <code>{enum_item}</code>
            {is_last && ''}
            {is_2nd_to_last && ' or '}
            {!is_last && !is_2nd_to_last && ', '}
          </>;
      });
      const enum_list = has_enums && !has_inline_enums && <Accordion {...child_props}>
          {enums.map((enum_item, index) => <div key={`enum-${index}`}>
              <code>{enum_item.name}</code>
              <br />
              <p>{enum_item.description}</p>
            </div>)}
        </Accordion>;
      const item_list = has_items && <Expandable {...child_props}>
          <ParamList items={items || []} is_child />
        </Expandable>;
      return <>
          <p>
            {item.description}
            {has_inline_enums && [has_inline_enums.length > 1 ? ' One of ' : ' Must be ', ...has_inline_enums]}
          </p>

          {enum_list}
          {item_list}
        </>;
    };
    return is_child ? <ResponseField {...field_props}>{render_child_item()}</ResponseField> : <ParamField {...field_props}>{render_child_item()}</ParamField>;
  });
};

Enrolls an Entity to a Subscription. Once
enrolled, the Subscription name and details will be present
on the response object.

## Path Parameters

<ParamList
  items={[
{
  name: "ent_id",
  type: "string",
  required: true,
  description: "ID of the Entity.",
},
]}
/>

## Body

<ParamList
  items={[
{
  name: "enroll",
  type: "enum",
  required: true,
  description: (
    <>
      A{" "}
      <a href="/2026-03-30/reference/entities/subscriptions/overview#subscription-names">
        Subscription Name.
      </a>
    </>
  ),
},
{
  name: 'payload',
  type: 'object',
  required: false,
  items: [
    {
      name: 'attributes',
      type: 'object',
      required: false,
      description: (
        <>
          Used when subscribing to <a href="/2026-03-30/reference/entities/attributes/overview">Attributes.</a> At least one of <code>requested_attributes</code> or <code>bundles</code> must be provided.
        </>
      ),
      items: [
        {
          name: 'requested_attributes',
          type: 'array',
          required: false,
          description: (
            <>
              The attributes to subscribe to.
              See <a href="/2026-03-30/reference/entities/attributes/overview#available-attributes">Available Attributes</a> for the full list.
              Required if <code>bundles</code> is not provided.
            </>
          )
        },
        {
          name: 'bundles',
          type: 'array',
          required: false,
          description: (
            <>
              A list of bundle names to subscribe to. Bundles are pre-defined groupings of
              attributes that let you onboard a category of attributes without listing each
              one individually. See <a href="/2026-03-30/reference/entities/attributes/overview#available-bundles">Available Bundles</a> for
              the full list of bundle names and the attributes each one expands to.
              Required if <code>requested_attributes</code> is not provided.
              Can be combined with <code>requested_attributes</code> to subscribe to a bundle
              plus additional individual attributes.
            </>
          )
        }
      ]
    }
  ]
}
]}
/>

## Returns

Returns a Subscription object.

<Note>
  When subscribing to `attribute`, you must provide at least one of `requested_attributes` or `bundles`.
  Use `requested_attributes` to specify individual attributes by name (see <a href="/2026-03-30/reference/entities/attributes/overview#available-attributes">Available Attributes</a>),
  or `bundles` to subscribe to a pre-defined grouping of attributes (see <a href="/2026-03-30/reference/entities/attributes/overview#available-bundles">Available Bundles</a>
  for the full list and what each bundle expands to). The two can be combined to enroll in a bundle plus extra individual attributes.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl https://production.methodfi.com/entities/ent_TYHMaRJUUeJ7U/subscriptions \
    -X POST \
    -H "Method-Version: 2026-03-30" \
    -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
    -H "Content-Type: application/json" \
    -d '{
      "enroll": "attribute",
      "payload": {
        "attributes": {
          "bundles": ["portfolio_intelligence"],
          "requested_attributes": ["credit_card_utilization", "revolving_credit_card_balance_total"]
        }
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await method
    .entities('ent_TYHMaRJUUeJ7U')
    .subscriptions
    .create({
      enroll: 'attribute',
      payload: {
        attributes: {
          bundles: ['portfolio_intelligence'],
          requested_attributes: ['credit_card_utilization', 'revolving_credit_card_balance_total'],
        },
      },
    });
  ```

  ```python Python theme={null}
  response = method
    .entities('ent_TYHMaRJUUeJ7U')
    .subscriptions
    .create({
      'enroll': 'attribute',
      'payload': {
        'attributes': {
          'bundles': ['portfolio_intelligence'],
          'requested_attributes': ['credit_card_utilization', 'revolving_credit_card_balance_total'],
        },
      },
    })
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "sub_c3a7hVjHCJzF3",
    "name": "attribute",
    "status": "active",
    "payload": {
      "attributes": {
        "bundles": ["portfolio_intelligence"],
        "requested_attributes": ["credit_card_utilization", "revolving_credit_card_balance_total"]
      }
    },
    "latest_request_id": null,
    "created_at": "2026-04-09T17:02:47.910Z",
    "updated_at": "2026-04-09T17:02:47.910Z"
  }
  ```
</ResponseExample>
