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

# Create an audience

> Makes a list (people you add) or a condition audience (kept up to date by its conditions). A new condition audience starts empty. The worker fills it with people who match. A project can have 100 condition audiences. Rules read it in `if`. [Audiences](/units#audiences)



## OpenAPI

````yaml /api-reference/openapi.json post /v1/audiences
openapi: 3.1.0
info:
  title: Lurk API
  version: 1.0.0
  description: Events in, rules decide, units change, receipts out.
servers:
  - url: https://api.getlurk.com
security: []
tags:
  - name: events
    description: Send what your users do. Lurk runs your live rules on each event.
    x-group: Events
    x-displayName: Events
  - name: units
    description: What people collect and hold, and their balances.
    x-group: Units
    x-displayName: Units
  - name: rules
    description: What Lurk does when an event comes in. A person takes a rule live.
    x-group: Rules
    x-displayName: Rules
  - name: activity
    description: A receipt for every change, with why it happened.
    x-group: Receipts
    x-displayName: Receipts
  - name: users
    description: The people your events are about.
    x-group: People
    x-displayName: People
  - name: webhook_endpoints
    description: Where Lurk sends signed notices of what changed.
    x-group: Webhooks
    x-displayName: Webhooks
  - name: known_values
    description: The properties of your own events whose values Lurk remembers.
    x-group: Known values
    x-displayName: Known values
  - name: feedback
    description: Tell the Lurk team about a bug, a gap or an idea.
    x-group: Feedback
    x-displayName: Feedback
  - name: annotations
    description: >-
      Short notes on a day of the project, such as a release or a campaign
      start.
    x-group: Annotations
    x-displayName: Annotations
  - name: trusted_issuers
    description: The sign-in providers a project trusts for its app's users.
    x-group: Trusted issuers
    x-displayName: Trusted issuers
  - name: client_events
    description: The events a signed-in device may send, and their caps.
    x-group: Client events
    x-displayName: Client events
  - name: issuer_identities
    description: Which person each sign-in subject is bound to.
    x-group: Issuer identities
    x-displayName: Issuer identities
  - name: proposals
    description: Changes an agent or Lurky asks for and a person approves or declines.
    x-group: Proposals
    x-displayName: Proposals
  - name: holds
    description: Changes a rule parked for a person to give or refuse.
    x-group: Holds
    x-displayName: Holds
  - name: audiences
    description: The groups of people that rules can read.
    x-group: Audiences
    x-displayName: Audiences
  - name: budgets
    description: What each live rule's budgets have given in the window they are in now.
    x-group: Budgets
    x-displayName: Budgets
  - name: templates
    description: Kits that add units and rules to a project in one go.
    x-group: Templates
    x-displayName: Templates
  - name: views
    description: Saved questions about a project, with their answers.
    x-group: Views
    x-displayName: Views
  - name: integrations
    description: Every way events reach Lurk or state leaves it, and the state of each.
    x-group: Integrations
    x-displayName: Integrations
  - name: projects
    description: Where units, rules and events live. An organization can have several.
    x-group: Projects
    x-displayName: Projects
  - name: clocks
    description: A test project's clock, which can be moved to try schedules and expiries.
    x-group: Clocks
    x-displayName: Clocks
paths:
  /v1/audiences:
    post:
      tags:
        - audiences
      summary: Create an audience
      description: >-
        Makes a list (people you add) or a condition audience (kept up to date
        by its conditions). A new condition audience starts empty. The worker
        fills it with people who match. A project can have 100 condition
        audiences. Rules read it in `if`. [Audiences](/units#audiences)
      operationId: audiences.create
      parameters:
        - schema:
            type: string
            description: W3C Trace Context; joins your trace to ours
          required: false
          description: W3C Trace Context; joins your trace to ours
          name: traceparent
          in: header
        - schema:
            type: string
            minLength: 1
            maxLength: 255
            description: A retry with the same key and body returns the first response
          required: true
          description: A retry with the same key and body returns the first response
          name: Idempotency-Key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAudienceInput'
      responses:
        '201':
          description: Create an audience
          headers:
            Request-Id:
              schema:
                type: string
                description: Quote this when you contact support
              required: true
              description: Quote this when you contact support
            traceparent:
              schema:
                type: string
                description: W3C Trace Context for this call, in the caller's trace
              required: true
              description: W3C Trace Context for this call, in the caller's trace
            RateLimit:
              schema:
                type: string
                description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
              required: true
              description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
            RateLimit-Policy:
              schema:
                type: string
                description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
              required: true
              description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Audience'
        '409':
          description: >-
            - `idempotency_conflict`: You used an idempotency key with a
            different request. Use a new key for a new request; reuse a key only
            to retry the same one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            - `validation_failed`: Nothing was changed. Fix what the message
            says is wrong (the field is named in `param` when there is one) and
            send the request again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many requests. Wait `Retry-After` seconds.
          headers:
            Request-Id:
              schema:
                type: string
                description: Quote this when you contact support
              required: true
              description: Quote this when you contact support
            traceparent:
              schema:
                type: string
                description: W3C Trace Context for this call, in the caller's trace
              required: true
              description: W3C Trace Context for this call, in the caller's trace
            RateLimit:
              schema:
                type: string
                description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
              required: true
              description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
            RateLimit-Policy:
              schema:
                type: string
                description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
              required: true
              description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
            Retry-After:
              schema:
                type: string
                description: Seconds to wait
              required: true
              description: Seconds to wait
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            - `unavailable`: This is not available right now (or not set up on
            this server yet). Retry in a moment with the same idempotency key,
            and ask us if it stays unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateAudienceInput:
      oneOf:
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 80
              description: The audience's name, 1 to 80 characters
            key:
              type: string
              pattern: ^[a-z][a-z0-9-]{0,63}$
              description: >-
                Lowercase words joined by dashes, starting with a letter, up to
                64 characters. Defaults to a slug of the name. Must not be taken
                by another audience
            description:
              type: string
              maxLength: 280
              description: What the audience is for, up to 280 characters
            kind:
              type: string
              enum:
                - list
              description: 'A list: people you add by hand or over the API'
          required:
            - name
            - kind
          additionalProperties: false
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 80
              description: The audience's name, 1 to 80 characters
            key:
              type: string
              pattern: ^[a-z][a-z0-9-]{0,63}$
              description: >-
                Lowercase words joined by dashes, starting with a letter, up to
                64 characters. Defaults to a slug of the name. Must not be taken
                by another audience
            description:
              type: string
              maxLength: 280
              description: What the audience is for, up to 280 characters
            kind:
              type: string
              enum:
                - condition
              description: 'A condition audience: kept up to date by its conditions'
            conditions:
              type: array
              items:
                $ref: '#/components/schemas/AudienceCondition'
              minItems: 1
              maxItems: 10
              description: >-
                1 to 10 conditions. A person is in the audience when all of them
                hold
          required:
            - name
            - kind
            - conditions
          additionalProperties: false
    Audience:
      type: object
      properties:
        id:
          type: string
          pattern: ^aud_[0-7][0-9a-hjkmnp-tv-z]{25}$
          description: An audience ID, starting with `aud_`.
        key:
          type: string
          pattern: ^[a-z][a-z0-9-]{0,63}$
          description: >-
            The audience's key: lowercase words joined by dashes, starting with
            a letter, up to 64 characters. A rule or view can name the audience
            by it
        name:
          type: string
          description: The audience's name
        description:
          type:
            - string
            - 'null'
          description: What the audience is for. Null when none was given
        kind:
          $ref: '#/components/schemas/AudienceKind'
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/StoredAudienceCondition'
          description: Empty for a list audience
        summary:
          type: string
          description: >-
            The conditions in words: Active on 2 or more days of the last 21,
            seen in the last 7 days
        status:
          $ref: '#/components/schemas/AudienceStatus'
        problems:
          type: array
          items:
            $ref: '#/components/schemas/AudienceProblem'
          description: >-
            What is wrong with a condition, if anything. Empty when `status` is
            ok
        users:
          type: integer
          minimum: 0
          description: 'Members now (a condition audience: as of its last refresh)'
        unknown:
          type:
            - integer
            - 'null'
          minimum: 0
          description: >-
            People excluded by uncertain holding evidence at the last full
            refresh. Null before the first refresh of a holding audience
        refreshed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When a condition audience's members were last worked out; rules see
            it as it stood then. Null for a list, and before the first run
        used_by:
          type: array
          items:
            $ref: '#/components/schemas/AudienceReader'
          description: The rules that read it
        created_at:
          type: string
          format: date-time
          description: 'When it was created: UTC, ISO 8601'
      required:
        - id
        - key
        - name
        - description
        - kind
        - conditions
        - summary
        - status
        - problems
        - users
        - refreshed_at
        - used_by
        - created_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: integer
            code:
              type: string
              enum:
                - invalid_json
                - invalid_key
                - forbidden
                - approval_required
                - not_found
                - idempotency_conflict
                - conflict
                - unblock_clock_reversed
                - insufficient_balance
                - reference_used
                - validation_failed
                - rate_limited
                - internal
                - unavailable
            message:
              type: string
            param:
              type: string
            next_step:
              type: string
              description: >-
                What to do about this kind of error, in one sentence. Always
                sent by current servers
            request_id:
              type: string
            doc_url:
              type: string
              format: uri
          required:
            - status
            - code
            - message
            - request_id
            - doc_url
      required:
        - error
    AudienceCondition:
      anyOf:
        - type: object
          properties:
            active:
              type: object
              properties:
                days:
                  type: integer
                  minimum: 1
                  maximum: 365
                  description: At least this many different days with an event, 1 to 365
                within_days:
                  type: integer
                  minimum: 1
                  maximum: 730
                  description: Counted over this many days back from now, 1 to 730
              required:
                - days
                - within_days
              additionalProperties: false
              description: >-
                Has events on at least `days` different days within the last
                `within_days` days
          required:
            - active
          additionalProperties: false
        - type: object
          properties:
            first_seen:
              type: object
              properties:
                within_days:
                  type: integer
                  minimum: 1
                  maximum: 730
                  description: How many days back, 1 to 730
              required:
                - within_days
              additionalProperties: false
              description: >-
                Lurk first heard of the person within the last `within_days`
                days
          required:
            - first_seen
          additionalProperties: false
        - type: object
          properties:
            inactive:
              type: object
              properties:
                days:
                  type: integer
                  minimum: 1
                  maximum: 730
                  description: For this many days, 1 to 730
              required:
                - days
              additionalProperties: false
              description: >-
                Known for longer than `days` days and without an event in the
                last `days` days
          required:
            - inactive
          additionalProperties: false
        - type: object
          properties:
            balance:
              type: object
              properties:
                unit:
                  type: string
                  pattern: ^[a-z][a-z0-9_-]{0,63}$
                  description: The unit's key
                gte:
                  type: integer
                  minimum: 1
                  description: At least this much, 1 or more
              required:
                - unit
                - gte
              additionalProperties: false
              description: Holds at least `gte` of a unit
          required:
            - balance
          additionalProperties: false
        - type: object
          properties:
            property_total:
              type: object
              properties:
                event:
                  type: string
                  maxLength: 100
                  pattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
                  description: >-
                    An event's name: lowercase words joined by dots, thing
                    first, such as `checkin.scanned`
                property:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: >-
                    The name of the number property to add up, up to 64
                    characters
                gte:
                  type: integer
                  minimum: 1
                  description: At least this total, 1 or more
                within_days:
                  type: integer
                  minimum: 1
                  maximum: 730
                  description: Over events in this many days back from now, 1 to 730
              required:
                - event
                - property
                - gte
                - within_days
              additionalProperties: false
              description: >-
                The sum of a number property over the person's events of that
                name in the last `within_days` days is at least `gte`. Events
                without a number there add nothing. Money is in cents
          required:
            - property_total
          additionalProperties: false
        - type: object
          properties:
            chat_role:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
                role:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: 'The platform''s ID for the role (Discord: the role''s ID)'
                label:
                  type: string
                  maxLength: 100
                  description: >-
                    The name to show for it (a role's or group's name). Only a
                    label: the ID is what is matched
              required:
                - community
                - role
              additionalProperties: false
              description: >-
                Not available yet. Has this role in a chat community. Matched by
                the role's ID. A person whose roles Lurk does not know is not in
                the audience
          required:
            - chat_role
          additionalProperties: false
        - type: object
          properties:
            chat_group:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
                group:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: 'The platform''s ID for the group (Slack: the user group''s ID)'
                label:
                  type: string
                  maxLength: 100
                  description: >-
                    The name to show for it (a role's or group's name). Only a
                    label: the ID is what is matched
              required:
                - community
                - group
              additionalProperties: false
              description: >-
                Not available yet. Is in this group of a chat community. Matched
                by the group's ID. A person whose groups Lurk does not know is
                not in the audience
          required:
            - chat_group
          additionalProperties: false
        - type: object
          properties:
            chat_tag:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
                tag:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: The tag, exactly as Lurky set it (Telegram's member tag)
              required:
                - community
                - tag
              additionalProperties: false
              description: >-
                Not available yet. Has this tag in a chat community, as Lurky
                set it. A person with no known tag is not in the audience
          required:
            - chat_tag
          additionalProperties: false
        - type: object
          properties:
            chat_admin:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
              required:
                - community
              additionalProperties: false
              description: >-
                Not available yet. Administers a chat community (an owner or
                administrator). Unknown is not an admin
          required:
            - chat_admin
          additionalProperties: false
        - type: object
          properties:
            chat_booster:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
              required:
                - community
              additionalProperties: false
              description: >-
                Not available yet. Boosts a chat community. Unknown is not a
                booster
          required:
            - chat_booster
          additionalProperties: false
        - type: object
          properties:
            chat_tenure:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
                gte:
                  type: integer
                  minimum: 1
                  maximum: 3650
                  description: At least this many days
              required:
                - community
                - gte
              additionalProperties: false
              description: >-
                Not available yet. Has been in a chat community for at least N
                days. Counted from the date the platform gives for when they
                joined; where it gives none (Slack, Telegram), from when Lurky
                first saw them there. With neither, not in the audience
          required:
            - chat_tenure
          additionalProperties: false
        - type: object
          properties:
            held_for:
              type: object
              properties:
                activation:
                  type: string
                  pattern: ^oac_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The on-chain activation whose contract must be held; a
                    display-only activation may be used
                days:
                  type: integer
                  minimum: 1
                  maximum: 3650
                  description: >-
                    Whole days of continuous holding, 1 to 3650; each day is
                    exactly 86,400 seconds, ending at the scan's finalized
                    horizon
                min:
                  type: string
                  maxLength: 78
                  pattern: ^[1-9][0-9]*$
                  description: >-
                    Minimum held throughout: a positive decimal integer of at
                    most 78 digits in smallest token units, or an NFT count
                    across the person's counting wallets. Omit to use the
                    activation's minimum
              required:
                - activation
                - days
              additionalProperties: false
              description: >-
                Continuous holding for an activation; no history before a wallet
                link becomes effective is counted
          required:
            - held_for
          additionalProperties: false
    AudienceKind:
      type: string
      enum:
        - list
        - condition
      description: >-
        list: people added by hand or over the API. condition: kept up to date
        by its conditions
    StoredAudienceCondition:
      anyOf:
        - type: object
          properties:
            active:
              type: object
              properties:
                days:
                  type: integer
                  minimum: 1
                  maximum: 365
                  description: At least this many different days with an event, 1 to 365
                within_days:
                  type: integer
                  minimum: 1
                  maximum: 730
                  description: Counted over this many days back from now, 1 to 730
              required:
                - days
                - within_days
              additionalProperties: false
              description: >-
                Has events on at least `days` different days within the last
                `within_days` days
          required:
            - active
          additionalProperties: false
        - type: object
          properties:
            first_seen:
              type: object
              properties:
                within_days:
                  type: integer
                  minimum: 1
                  maximum: 730
                  description: How many days back, 1 to 730
              required:
                - within_days
              additionalProperties: false
              description: >-
                Lurk first heard of the person within the last `within_days`
                days
          required:
            - first_seen
          additionalProperties: false
        - type: object
          properties:
            inactive:
              type: object
              properties:
                days:
                  type: integer
                  minimum: 1
                  maximum: 730
                  description: For this many days, 1 to 730
              required:
                - days
              additionalProperties: false
              description: >-
                Known for longer than `days` days and without an event in the
                last `days` days
          required:
            - inactive
          additionalProperties: false
        - type: object
          properties:
            balance:
              type: object
              properties:
                unit:
                  type: string
                  pattern: ^[a-z][a-z0-9_-]{0,63}$
                  description: The unit's key
                gte:
                  type: integer
                  minimum: 1
                  description: At least this much, 1 or more
              required:
                - unit
                - gte
              additionalProperties: false
              description: Holds at least `gte` of a unit
          required:
            - balance
          additionalProperties: false
        - type: object
          properties:
            property_total:
              type: object
              properties:
                event:
                  type: string
                  maxLength: 100
                  pattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
                  description: >-
                    An event's name: lowercase words joined by dots, thing
                    first, such as `checkin.scanned`
                property:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: >-
                    The name of the number property to add up, up to 64
                    characters
                gte:
                  type: integer
                  minimum: 1
                  description: At least this total, 1 or more
                within_days:
                  type: integer
                  minimum: 1
                  maximum: 730
                  description: Over events in this many days back from now, 1 to 730
              required:
                - event
                - property
                - gte
                - within_days
              additionalProperties: false
              description: >-
                The sum of a number property over the person's events of that
                name in the last `within_days` days is at least `gte`. Events
                without a number there add nothing. Money is in cents
          required:
            - property_total
          additionalProperties: false
        - type: object
          properties:
            chat_role:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
                role:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: 'The platform''s ID for the role (Discord: the role''s ID)'
                label:
                  type: string
                  maxLength: 100
                  description: >-
                    The name to show for it (a role's or group's name). Only a
                    label: the ID is what is matched
              required:
                - community
                - role
              additionalProperties: false
              description: >-
                Not available yet. Has this role in a chat community. Matched by
                the role's ID. A person whose roles Lurk does not know is not in
                the audience
          required:
            - chat_role
          additionalProperties: false
        - type: object
          properties:
            chat_group:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
                group:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: 'The platform''s ID for the group (Slack: the user group''s ID)'
                label:
                  type: string
                  maxLength: 100
                  description: >-
                    The name to show for it (a role's or group's name). Only a
                    label: the ID is what is matched
              required:
                - community
                - group
              additionalProperties: false
              description: >-
                Not available yet. Is in this group of a chat community. Matched
                by the group's ID. A person whose groups Lurk does not know is
                not in the audience
          required:
            - chat_group
          additionalProperties: false
        - type: object
          properties:
            chat_tag:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
                tag:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: The tag, exactly as Lurky set it (Telegram's member tag)
              required:
                - community
                - tag
              additionalProperties: false
              description: >-
                Not available yet. Has this tag in a chat community, as Lurky
                set it. A person with no known tag is not in the audience
          required:
            - chat_tag
          additionalProperties: false
        - type: object
          properties:
            chat_admin:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
              required:
                - community
              additionalProperties: false
              description: >-
                Not available yet. Administers a chat community (an owner or
                administrator). Unknown is not an admin
          required:
            - chat_admin
          additionalProperties: false
        - type: object
          properties:
            chat_booster:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
              required:
                - community
              additionalProperties: false
              description: >-
                Not available yet. Boosts a chat community. Unknown is not a
                booster
          required:
            - chat_booster
          additionalProperties: false
        - type: object
          properties:
            chat_tenure:
              type: object
              properties:
                community:
                  type: string
                  pattern: ^intg_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The community the clause is about: the intg_… ID of the
                    installed Discord server, Slack workspace or Telegram group
                gte:
                  type: integer
                  minimum: 1
                  maximum: 3650
                  description: At least this many days
              required:
                - community
                - gte
              additionalProperties: false
              description: >-
                Not available yet. Has been in a chat community for at least N
                days. Counted from the date the platform gives for when they
                joined; where it gives none (Slack, Telegram), from when Lurky
                first saw them there. With neither, not in the audience
          required:
            - chat_tenure
          additionalProperties: false
        - type: object
          properties:
            held_for:
              type: object
              properties:
                activation:
                  type: string
                  pattern: ^oac_[0-7][0-9a-hjkmnp-tv-z]{25}$
                  description: >-
                    The on-chain activation whose contract must be held; a
                    display-only activation may be used
                days:
                  type: integer
                  minimum: 1
                  maximum: 3650
                  description: >-
                    Whole days of continuous holding, 1 to 3650; each day is
                    exactly 86,400 seconds, ending at the scan's finalized
                    horizon
                min:
                  type: string
                  pattern: ^[1-9][0-9]*$
                  description: >-
                    Minimum held throughout: a positive decimal integer in
                    smallest token units, or an NFT count across the person's
                    counting wallets. Omit to use the activation's minimum
              required:
                - activation
                - days
              additionalProperties: false
              description: >-
                Continuous holding for an activation; no history before a wallet
                link becomes effective is counted
          required:
            - held_for
          additionalProperties: false
    AudienceStatus:
      type: string
      enum:
        - ok
        - broken
        - not_synced
      description: >-
        ok: nothing wrong. broken: a condition names something that is gone, so
        it can match nobody until it is fixed. not_synced: a chat condition's
        community has no state yet, so nobody can be in it yet (chat conditions
        are not available yet)
    AudienceProblem:
      type: object
      properties:
        condition:
          type: integer
          minimum: 0
          description: 'Which condition: its place in `conditions`, from 0'
        code:
          type: string
          enum:
            - community_removed
            - role_gone
            - group_gone
            - tag_gone
            - not_synced
          description: >-
            Not available yet (chat conditions). community_removed: Lurky was
            taken out of the community. role_gone, group_gone, tag_gone: the
            platform no longer has it. not_synced: Lurk has not learned anyone's
            state in the community yet
        message:
          type: string
          description: 'In words: Role no longer exists'
      required:
        - condition
        - code
        - message
    AudienceReader:
      type: object
      properties:
        type:
          type: string
          enum:
            - rule
            - view
          description: Whether a rule or a view reads it
        id:
          type: string
          description: The rule's or view's ID
        name:
          type: string
          description: The rule's or view's name
        status:
          type:
            - string
            - 'null'
          enum:
            - draft
            - live
            - paused
            - null
          description: A rule's status; null for a view
      required:
        - type
        - id
        - name
        - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A project key (Developers → API keys). Keep it on your server, not in an
        app.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.