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

# List Benefits

> ### Intent

Reads the available benefits as a pageable collection without changing them.

### When to call it

Call this when an interface, sync, or support workflow needs to inspect benefits. Use the filters and paging controls shown below to limit the result.

### Access boundary

Authorize the request with a token that carries `benefits:read` or `benefits:write`.

### Successful result

A successful request returns `200`. The response schema below defines the body your integration receives.

export const RubaSocials = () => {
  if (typeof document === "undefined") {
    return null;
  }
  const inject = () => {
    const footer = document.getElementById("footer");
    if (!footer || document.getElementById("ruba-socials")) {
      return false;
    }
    const isDark = document.querySelector("html.dark") || document.querySelector('html[class*="dark"]');
    const lineColor = isDark ? "#383838" : "#e8e8ed";
    const iconColor = isDark ? "#8e8e93" : "#86868b";
    const markColor = isDark ? "#ffffff" : "#08080c";
    const hoverColor = "#0071e3";
    const div = document.createElement("div");
    div.id = "ruba-socials";
    div.style.cssText = `display:flex;align-items:center;gap:20px;padding-top:20px;margin-top:20px;border-top:1px solid ${lineColor};width:100%`;
    const logo = `<a href="https://getruba.com" style="display:inline-flex;height:24px;align-items:center;gap:8px;text-decoration:none;color:${markColor};line-height:1;"><svg width="24" height="24" viewBox="0 0 120 120" aria-hidden="true" style="display:block;flex:none;"><g transform="translate(2.5 0)"><path d="M19 25h59L65.43 47H19a4 4 0 0 1-4-4V29a4 4 0 0 1 4-4Z" fill="${markColor}"/><path d="M19 73h31.57L38 95H19a4 4 0 0 1-4-4V77a4 4 0 0 1 4-4Z" fill="${markColor}"/><path d="M85 25h25L70 95H45Z" fill="#007AFF"/></g></svg><span style="display:inline-flex;height:24px;align-items:center;font-weight:600;font-size:15px;color:${markColor};letter-spacing:-0.01em;line-height:1;">Ruba</span></a>`;
    const spacer = `<div style="flex:1"></div>`;
    const ig = `<a href="https://instagram.com/getruba" target="_blank" rel="noopener" aria-label="Instagram" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"/><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"/><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"/></svg></a>`;
    const li = `<a href="https://linkedin.com/company/getruba" target="_blank" rel="noopener" aria-label="LinkedIn" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect x="2" y="9" width="4" height="12"/><circle cx="4" cy="4" r="2"/></svg></a>`;
    const x = `<a href="https://x.com/getruba" target="_blank" rel="noopener" aria-label="X" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg></a>`;
    const github = `<a href="https://github.com/rubadot" target="_blank" rel="noopener" aria-label="GitHub" style="display:flex;align-items:center;color:${iconColor};transition:color 0.15s ease;" onmouseover="this.style.color='${hoverColor}'" onmouseout="this.style.color='${iconColor}'"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 .7a11.5 11.5 0 0 0-3.64 22.4c.58.1.79-.25.79-.56v-2.24c-3.22.7-3.9-1.37-3.9-1.37-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.16.08 1.78 1.2 1.78 1.2 1.04 1.77 2.72 1.26 3.38.96.1-.75.4-1.26.74-1.55-2.57-.3-5.27-1.29-5.27-5.69 0-1.26.45-2.29 1.19-3.09-.12-.29-.52-1.47.11-3.05 0 0 .97-.31 3.16 1.18A10.96 10.96 0 0 1 12 6.09c.98 0 1.94.13 2.86.39 2.2-1.49 3.16-1.18 3.16-1.18.63 1.58.23 2.76.11 3.05.74.8 1.19 1.83 1.19 3.09 0 4.42-2.7 5.39-5.28 5.68.42.36.79 1.06.79 2.14v3.28c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .7Z"/></svg></a>`;
    div.innerHTML = logo + spacer + ig + li + x + github;
    footer.appendChild(div);
    return true;
  };
  if (!document.documentElement.dataset.rubaSocialsObserver) {
    document.documentElement.dataset.rubaSocialsObserver = "true";
    const observer = new MutationObserver(() => {
      if (!document.getElementById("ruba-socials")) {
        inject();
      }
    });
    observer.observe(document.body, {
      childList: true,
      subtree: true
    });
  }
  setTimeout(() => {
    if (!inject()) {
      const interval = setInterval(() => {
        if (inject()) {
          clearInterval(interval);
        }
      }, 500);
      setTimeout(() => clearInterval(interval), 10000);
    }
  }, 300);
  return null;
};

<link rel="stylesheet" href="/style.css" />

<RubaSocials />


## OpenAPI

````yaml get /v1/benefits/
openapi: 3.1.0
info:
  title: Ruba API
  summary: Ruba HTTP and Webhooks API
  description: '**Details:** Read the docs at https://docs.getruba.com/api-reference.'
  version: 2026-04
servers:
  - url: https://api.getruba.com
    description: '**Details:** Production environment.'
    x-speakeasy-server-id: production
  - url: https://sandbox-api.getruba.com
    description: '**Details:** Sandbox environment.'
    x-speakeasy-server-id: sandbox
security: []
tags:
  - name: public
    description: >-
      **Details:** Endpoints shown and documented in the Ruba API documentation
      and available in our SDKs.
  - name: private
    description: >-
      **Details:** Endpoints that should appear in the schema only in
      development to generate our internal JS SDK.
paths:
  /v1/benefits/:
    get:
      tags:
        - benefits
        - public
      summary: List Benefits
      description: >-
        ### Intent


        Reads the available benefits as a pageable collection without changing
        them.


        ### When to call it


        Call this when an interface, sync, or support workflow needs to inspect
        benefits. Use the filters and paging controls shown below to limit the
        result.


        ### Access boundary


        Authorize the request with a token that carries `benefits:read` or
        `benefits:write`.


        ### Successful result


        A successful request returns `200`. The response schema below defines
        the body your integration receives.
      operationId: benefits:list
      parameters:
        - name: organization_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid4
                description: Identifier of the organization.
                examples:
                  - 1dbfc517-0bbf-4301-9ba8-555ca42b9737
                x-ruba-selector-widget:
                  displayProperty: name
                  resourceName: Organization
                  resourceRoot: /v1/organizations
              - type: array
                items:
                  type: string
                  format: uuid4
                  description: Identifier of the organization.
                  examples:
                    - 1dbfc517-0bbf-4301-9ba8-555ca42b9737
                  x-ruba-selector-widget:
                    displayProperty: name
                    resourceName: Organization
                    resourceRoot: /v1/organizations
              - type: 'null'
            title: OrganizationID Filter
            description: Return only records matching organization ID.
          description: Return only records matching organization ID.
        - name: type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/BenefitType'
              - type: array
                items:
                  $ref: '#/components/schemas/BenefitType'
              - type: 'null'
            title: BenefitType Filter
            description: Return only records matching benefit type.
          description: Return only records matching benefit type.
        - name: id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid4
                description: Identifier of the benefit.
                x-ruba-selector-widget:
                  displayProperty: description
                  resourceName: Benefit
                  resourceRoot: /v1/benefits
              - type: array
                items:
                  type: string
                  format: uuid4
                  description: Identifier of the benefit.
                  x-ruba-selector-widget:
                    displayProperty: description
                    resourceName: Benefit
                    resourceRoot: /v1/benefits
              - type: 'null'
            title: Filter IDs
            description: Return only records matching benefit IDs.
          description: Return only records matching benefit IDs.
        - name: exclude_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid4
                description: Identifier of the benefit.
                x-ruba-selector-widget:
                  displayProperty: description
                  resourceName: Benefit
                  resourceRoot: /v1/benefits
              - type: array
                items:
                  type: string
                  format: uuid4
                  description: Identifier of the benefit.
                  x-ruba-selector-widget:
                    displayProperty: description
                    resourceName: Benefit
                    resourceRoot: /v1/benefits
              - type: 'null'
            title: Exclude IDs
            description: '**Parameter:** Exclude benefits with these IDs.'
          description: '**Parameter:** Exclude benefits with these IDs.'
        - name: query
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Query
            description: Return only records matching description.
          description: Return only records matching description.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            exclusiveMinimum: 0
            description: Results page to return. The first page is used by default.
            default: 1
            title: Page
          description: Results page to return. The first page is used by default.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            exclusiveMinimum: 0
            description: Records returned per page. Defaults to 10 and accepts up to 100.
            default: 10
            title: Limit
          description: Records returned per page. Defaults to 10 and accepts up to 100.
        - name: sorting
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/BenefitSortProperty'
              - type: 'null'
            description: >-
              Sort rules applied from left to right. Prefix any rule with `-` to
              reverse it into descending order.
            default:
              - '-created_at'
            title: Sorting
          description: >-
            Sort rules applied from left to right. Prefix any rule with `-` to
            reverse it into descending order.
        - name: metadata
          in: query
          required: false
          style: deepObject
          schema:
            $ref: '#/components/schemas/MetadataQuery'
          description: >-
            Return only records matching metadata key-value pairs. It uses the
            `deepObject` style, e.g. `?metadata[key]=value`.
      responses:
        '200':
          description: Request completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResource_Benefit_'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - oidc:
            - benefits:read
            - benefits:write
        - pat:
            - benefits:read
            - benefits:write
        - oat:
            - benefits:read
            - benefits:write
components:
  schemas:
    BenefitType:
      type: string
      enum:
        - custom
        - discord
        - github_repository
        - downloadables
        - license_keys
        - meter_credit
        - feature_flag
        - slack_shared_channel
      title: BenefitType
    BenefitSortProperty:
      type: string
      enum:
        - created_at
        - '-created_at'
        - description
        - '-description'
        - type
        - '-type'
        - user_order
        - '-user_order'
      title: BenefitSortProperty
    MetadataQuery:
      anyOf:
        - type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: boolean
              - items:
                  type: string
                type: array
              - type: array
                items:
                  type: integer
              - type: array
                items:
                  type: boolean
        - type: 'null'
      title: MetadataQuery
    ListResource_Benefit_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Benefit'
            title: Benefit
          type: array
          title: Items
        pagination:
          $ref: '#/components/schemas/Pagination'
      type: object
      required:
        - items
        - pagination
      title: ListResource[Benefit]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Benefit:
      oneOf:
        - $ref: '#/components/schemas/BenefitCustom'
        - $ref: '#/components/schemas/BenefitDiscord'
        - $ref: '#/components/schemas/BenefitGitHubRepository'
        - $ref: '#/components/schemas/BenefitDownloadables'
        - $ref: '#/components/schemas/BenefitLicenseKeys'
        - $ref: '#/components/schemas/BenefitMeterCredit'
        - $ref: '#/components/schemas/BenefitFeatureFlag'
        - $ref: '#/components/schemas/BenefitSlackSharedChannel'
      discriminator:
        propertyName: type
        mapping:
          custom:
            $ref: '#/components/schemas/BenefitCustom'
          discord:
            $ref: '#/components/schemas/BenefitDiscord'
          downloadables:
            $ref: '#/components/schemas/BenefitDownloadables'
          feature_flag:
            $ref: '#/components/schemas/BenefitFeatureFlag'
          github_repository:
            $ref: '#/components/schemas/BenefitGitHubRepository'
          license_keys:
            $ref: '#/components/schemas/BenefitLicenseKeys'
          meter_credit:
            $ref: '#/components/schemas/BenefitMeterCredit'
          slack_shared_channel:
            $ref: '#/components/schemas/BenefitSlackSharedChannel'
    Pagination:
      properties:
        total_count:
          type: integer
          title: Total Count
        max_page:
          type: integer
          title: Max Page
      type: object
      required:
        - total_count
        - max_page
      title: Pagination
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    BenefitCustom:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          type: string
          const: custom
          title: Type
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        visibility:
          $ref: '#/components/schemas/BenefitVisibility'
          description: >-
            **Visibility:** Controls whether customers can see this benefit in
            their portal.
        properties:
          $ref: '#/components/schemas/BenefitCustomProperties'
        visibility_configurable:
          type: boolean
          title: Visibility Configurable
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
        - metadata
        - visibility
        - properties
        - visibility_configurable
      title: BenefitCustom
      description: |-
        A benefit of type `custom`.

        Use it to grant any kind of benefit that doesn't fit in the other types.
    BenefitDiscord:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          type: string
          const: discord
          title: Type
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        visibility:
          $ref: '#/components/schemas/BenefitVisibility'
          description: >-
            **Visibility:** Controls whether customers can see this benefit in
            their portal.
        properties:
          $ref: '#/components/schemas/BenefitDiscordProperties'
        visibility_configurable:
          type: boolean
          title: Visibility Configurable
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
        - metadata
        - visibility
        - properties
        - visibility_configurable
      title: BenefitDiscord
      description: |-
        A benefit of type `discord`.

        Use it to automatically invite your backers to a Discord server.
    BenefitGitHubRepository:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          type: string
          const: github_repository
          title: Type
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        visibility:
          $ref: '#/components/schemas/BenefitVisibility'
          description: >-
            **Visibility:** Controls whether customers can see this benefit in
            their portal.
        properties:
          $ref: '#/components/schemas/BenefitGitHubRepositoryProperties'
        visibility_configurable:
          type: boolean
          title: Visibility Configurable
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
        - metadata
        - visibility
        - properties
        - visibility_configurable
      title: BenefitGitHubRepository
      description: >-
        A benefit of type `github_repository`.


        Use it to automatically invite your backers to a private GitHub
        repository.
    BenefitDownloadables:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          type: string
          const: downloadables
          title: Type
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        visibility:
          $ref: '#/components/schemas/BenefitVisibility'
          description: >-
            **Visibility:** Controls whether customers can see this benefit in
            their portal.
        properties:
          $ref: '#/components/schemas/BenefitDownloadablesProperties'
        visibility_configurable:
          type: boolean
          title: Visibility Configurable
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
        - metadata
        - visibility
        - properties
        - visibility_configurable
      title: BenefitDownloadables
    BenefitLicenseKeys:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          type: string
          const: license_keys
          title: Type
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        visibility:
          $ref: '#/components/schemas/BenefitVisibility'
          description: >-
            **Visibility:** Controls whether customers can see this benefit in
            their portal.
        properties:
          $ref: '#/components/schemas/BenefitLicenseKeysProperties'
        visibility_configurable:
          type: boolean
          title: Visibility Configurable
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
        - metadata
        - visibility
        - properties
        - visibility_configurable
      title: BenefitLicenseKeys
    BenefitMeterCredit:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          type: string
          const: meter_credit
          title: Type
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        visibility:
          $ref: '#/components/schemas/BenefitVisibility'
          description: >-
            **Visibility:** Controls whether customers can see this benefit in
            their portal.
        properties:
          $ref: '#/components/schemas/BenefitMeterCreditProperties'
        visibility_configurable:
          type: boolean
          title: Visibility Configurable
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
        - metadata
        - visibility
        - properties
        - visibility_configurable
      title: BenefitMeterCredit
      description: |-
        A benefit of type `meter_unit`.

        Use it to grant a number of units on a specific meter.
    BenefitFeatureFlag:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          type: string
          const: feature_flag
          title: Type
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        visibility:
          $ref: '#/components/schemas/BenefitVisibility'
          description: >-
            **Visibility:** Controls whether customers can see this benefit in
            their portal.
        properties:
          $ref: '#/components/schemas/BenefitFeatureFlagProperties'
        visibility_configurable:
          type: boolean
          title: Visibility Configurable
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
        - metadata
        - visibility
        - properties
        - visibility_configurable
      title: BenefitFeatureFlag
      description: |-
        A benefit of type `feature_flag`.

        Use it to grant feature flags with key-value metadata
        that can be queried via the API and webhooks.
    BenefitSlackSharedChannel:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Unique identifier for the benefit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The time Ruba created this record.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
          description: The time this record last changed.
        type:
          type: string
          const: slack_shared_channel
          title: Type
        description:
          type: string
          title: Description
          description: Description attached to the benefit.
        selectable:
          type: boolean
          title: Selectable
          description: Indicates whether the benefit is selectable when creating a product.
        deletable:
          type: boolean
          title: Deletable
          description: Indicates whether the benefit is deletable.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Indicates whether the benefit is deleted.
        organization_id:
          type: string
          format: uuid4
          title: Organization Id
          description: Unique identifier for the organization owning the benefit.
        metadata:
          $ref: '#/components/schemas/MetadataOutputType'
        visibility:
          $ref: '#/components/schemas/BenefitVisibility'
          description: >-
            **Visibility:** Controls whether customers can see this benefit in
            their portal.
        properties:
          $ref: '#/components/schemas/BenefitSlackSharedChannelProperties'
        visibility_configurable:
          type: boolean
          title: Visibility Configurable
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - modified_at
        - type
        - description
        - selectable
        - deletable
        - is_deleted
        - organization_id
        - metadata
        - visibility
        - properties
        - visibility_configurable
      title: BenefitSlackSharedChannel
    MetadataOutputType:
      additionalProperties:
        anyOf:
          - type: string
          - type: integer
          - type: number
          - type: boolean
      type: object
    BenefitVisibility:
      type: string
      enum:
        - draft
        - private
        - public
      title: Visibility
    BenefitCustomProperties:
      properties:
        note:
          anyOf:
            - anyOf:
                - type: string
                - type: 'null'
              description: >-
                **Note:** Private note to be shared with customers who have this
                benefit granted.
            - type: 'null'
          title: Note
      type: object
      required:
        - note
      title: BenefitCustomProperties
      description: Properties for a benefit of type `custom`.
    BenefitDiscordProperties:
      properties:
        guild_id:
          type: string
          title: Guild Id
          description: Unique identifier for the Discord server.
        role_id:
          type: string
          title: Role Id
          description: Unique identifier for the Discord role to grant.
        kick_member:
          type: boolean
          title: Kick Member
          description: >-
            Indicates whether to kick the member from the Discord server on
            revocation.
        guild_token:
          type: string
          title: Guild Token
          readOnly: true
      type: object
      required:
        - guild_id
        - role_id
        - kick_member
        - guild_token
      title: BenefitDiscordProperties
      description: Properties for a benefit of type `discord`.
    BenefitGitHubRepositoryProperties:
      properties:
        repository_owner:
          type: string
          title: Repository Owner
          description: '**Repository Owner:** Owner of the repository.'
          examples:
            - Rubadot
        repository_name:
          type: string
          title: Repository Name
          description: Name assigned to the repository.
          examples:
            - private_repo
        permission:
          type: string
          enum:
            - pull
            - triage
            - push
            - maintain
            - admin
          title: Permission
          description: >-
            **Permission:** Repository access level granted to the customer. See
            [GitHub repository
            roles](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)
            for the capabilities of each role.
      type: object
      required:
        - repository_owner
        - repository_name
        - permission
      title: BenefitGitHubRepositoryProperties
      description: Properties for a benefit of type `github_repository`.
    BenefitDownloadablesProperties:
      properties:
        archived:
          additionalProperties:
            type: boolean
          propertyNames:
            format: uuid4
          type: object
          title: Archived
        files:
          items:
            type: string
            format: uuid4
          type: array
          title: Files
      type: object
      required:
        - archived
        - files
      title: BenefitDownloadablesProperties
    BenefitLicenseKeysProperties:
      properties:
        prefix:
          anyOf:
            - type: string
            - type: 'null'
          title: Prefix
        expires:
          anyOf:
            - $ref: '#/components/schemas/BenefitLicenseKeyExpirationProperties'
            - type: 'null'
        activations:
          anyOf:
            - $ref: '#/components/schemas/BenefitLicenseKeyActivationProperties'
            - type: 'null'
        limit_usage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit Usage
      type: object
      required:
        - prefix
        - expires
        - activations
        - limit_usage
      title: BenefitLicenseKeysProperties
    BenefitMeterCreditProperties:
      properties:
        units:
          type: integer
          title: Units
        rollover:
          type: boolean
          title: Rollover
        meter_id:
          type: string
          format: uuid4
          title: Meter Id
      type: object
      required:
        - units
        - rollover
        - meter_id
      title: BenefitMeterCreditProperties
      description: Properties for a benefit of type `meter_unit`.
    BenefitFeatureFlagProperties:
      properties: {}
      type: object
      title: BenefitFeatureFlagProperties
      description: Properties for a benefit of type `feature_flag`.
    BenefitSlackSharedChannelProperties:
      properties:
        slack_integration_id:
          type: string
          format: uuid4
          title: Slack Integration Id
          description: >-
            **Slack Integration Id:** Ruba Slack integration linked to this
            benefit.
        channel_name_template:
          type: string
          maxLength: 80
          minLength: 1
          title: Channel Name Template
          description: >-
            **Channel Name Template:** Template for the channel name. Supports
            placeholders: {customer_name}, {customer_email_local}, and
            {metadata.<key>} for any value stored in customer user metadata.
        private:
          type: boolean
          title: Private
          description: '**Private:** Create the channel as private (recommended).'
          default: true
        welcome_message:
          anyOf:
            - type: string
              maxLength: 4000
            - type: 'null'
          title: Welcome Message
          description: >-
            **Welcome Message:** Optional message posted to the channel right
            after creation.
        archive_on_revoke:
          type: boolean
          title: Archive On Revoke
          description: >-
            **Archive On Revoke:** Archive the channel when the benefit is
            revoked.
          default: true
        team_invitees:
          items:
            type: string
          type: array
          title: Team Invitees
          description: >-
            **Team Invitees:** Slack user IDs from the merchant workspace to
            invite to every channel created for this benefit.
      type: object
      required:
        - slack_integration_id
        - channel_name_template
      title: BenefitSlackSharedChannelProperties
    BenefitLicenseKeyExpirationProperties:
      properties:
        ttl:
          type: integer
          exclusiveMinimum: 0
          title: Ttl
        timeframe:
          type: string
          enum:
            - year
            - month
            - day
          title: Timeframe
      type: object
      required:
        - ttl
        - timeframe
      title: BenefitLicenseKeyExpirationProperties
    BenefitLicenseKeyActivationProperties:
      properties:
        limit:
          type: integer
          title: Limit
        enable_customer_admin:
          type: boolean
          title: Enable Customer Admin
      type: object
      required:
        - limit
        - enable_customer_admin
      title: BenefitLicenseKeyActivationProperties
  securitySchemes:
    oidc:
      type: openIdConnect
      openIdConnectUrl: /.well-known/openid-configuration
    pat:
      type: http
      description: >-
        **Authentication:** You can generate a **Personal Access Token** from
        your [settings](https://getruba.com/settings).
      scheme: bearer
    oat:
      type: http
      description: >-
        **Authentication:** You can generate an **Organization Access Token**
        from your organization's settings.
      scheme: bearer

````