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

# Create a signal agent

> Create a signal agent: it watches X for the given keywords and scores
the people it finds against `icp_description`. Matching leads land in
Signals (and `GET /v1/signals/leads`) over the following minutes and
days; nothing is returned synchronously.

Omit `keywords` and 1-3 watches are suggested from the ICP (if
suggestion fails, nothing is created and you get 502
`upstream_error`). Omit `destination_list_id` and a contact list
named `Leads: <agent name>` is created for the leads, flagged
`destination_list_created: true` in the response.

Plan limits apply (403 `cap_reached`). Supports `Idempotency-Key`
(max 64 chars): retries with the same key and body replay the
original response with `Idempotency-Replayed: true`. Main account
only in v1 (optional `account_id` in the body must be the main
account).




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/signals/agents
openapi: 3.1.0
info:
  title: SuperX API
  version: 1.0.0
  description: >
    The SuperX public API: your Twitter/X content, analytics, audience and

    scheduling data over REST.


    All endpoints require an API key (`Authorization: Bearer sxk_...`) except

    `GET /v1/docs`. Keys are created in the SuperX app under Account > API / MCP
    / CLI

    and are server-side secrets.


    Timestamps are UTC ISO-8601 in both directions; inputs must carry an
    explicit

    `Z` or numeric offset. Every authenticated response carries

    `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`
    headers.
  contact:
    name: SuperX
    url: https://superx.so
servers:
  - url: https://api.superx.so
security:
  - apiKey: []
tags:
  - name: Identity
  - name: Content
  - name: Analytics
  - name: Inspiration
  - name: Audience
  - name: Contact Lists
  - name: Signals
  - name: Media
  - name: Scheduling
  - name: Tags
  - name: Context
  - name: Queue
  - name: Articles
  - name: Meta
paths:
  /v1/signals/agents:
    post:
      tags:
        - Signals
      summary: Create a signal agent
      description: |
        Create a signal agent: it watches X for the given keywords and scores
        the people it finds against `icp_description`. Matching leads land in
        Signals (and `GET /v1/signals/leads`) over the following minutes and
        days; nothing is returned synchronously.

        Omit `keywords` and 1-3 watches are suggested from the ICP (if
        suggestion fails, nothing is created and you get 502
        `upstream_error`). Omit `destination_list_id` and a contact list
        named `Leads: <agent name>` is created for the leads, flagged
        `destination_list_created: true` in the response.

        Plan limits apply (403 `cap_reached`). Supports `Idempotency-Key`
        (max 64 chars): retries with the same key and body replay the
        original response with `Idempotency-Replayed: true`. Main account
        only in v1 (optional `account_id` in the body must be the main
        account).
      operationId: createSignalAgent
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - icp_description
              properties:
                name:
                  type: string
                  maxLength: 80
                  description: Agent name shown in SuperX.
                icp_description:
                  type: string
                  maxLength: 500
                  description: >-
                    Who the ideal leads are; found people are scored against
                    this.
                precision_mode:
                  type: string
                  enum:
                    - high
                    - discovery
                  default: high
                  description: high = fewer, stricter matches; discovery = broader net.
                keywords:
                  type: array
                  minItems: 1
                  maxItems: 5
                  items:
                    type: string
                    maxLength: 180
                  description: >-
                    Plain-language descriptions of what the target customer
                    posts about. Omit to auto-suggest from the ICP. Keywords
                    beyond your plan's per-agent signal limit are dropped; the
                    response lists the signals actually created.
                destination_list_id:
                  type: string
                  description: >-
                    Contact list id (from `GET /v1/contact-lists`) that receives
                    the leads. Omit to auto-create one.
                account_id:
                  type: string
                  description: Optional; must resolve to your main account.
            example:
              name: Build in public founders
              icp_description: >-
                Indie founders building SaaS in public, sharing MRR and launch
                updates
              precision_mode: high
              keywords:
                - building in public
                - just shipped my MVP
      responses:
        '201':
          description: >-
            The created agent with its keyword signals, plus whether a
            destination list was auto-created.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotency-Replayed:
              description: >-
                Present and "true" when this response was replayed from a
                previous request with the same Idempotency-Key.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/SignalAgent'
                      - type: object
                        properties:
                          destination_list_created:
                            type: boolean
                            description: >-
                              true when destination_list_id was omitted and a
                              list was created for the agent.
              example:
                data:
                  id: 12
                  name: Build in public founders
                  status: active
                  status_detail: null
                  icp_description: >-
                    Indie founders building SaaS in public, sharing MRR and
                    launch updates
                  precision_mode: high
                  destination_list_id: contact:V1StGXR8_Z5jdHi6B-myT
                  created_at: '2026-07-08T10:00:00.000Z'
                  updated_at: '2026-07-08T10:00:00.000Z'
                  deposited_count: 0
                  last_checked: null
                  signals:
                    - id: 31
                      type: keyword_watch
                      handle: null
                      name: null
                      avatar: null
                      query: building in public
                      list_name: null
                      status: active
                      status_detail: null
                      last_run_at: null
                      created_at: '2026-07-08T10:00:00.000Z'
                  destination_list_created: true
        '400':
          description: >-
            A parameter is missing, malformed, or out of range
            (`invalid_parameter`), or the create was rejected upstream
            (`invalid_request`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                error:
                  code: invalid_parameter
                  message: icp_description is required (1-500 characters)
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Read-only key (`insufficient_scope`), linked account
            (`writes_main_account_only`), lapsed subscription (legacy string
            envelope), or the plan's agent limit is reached (`cap_reached`).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorEnvelope'
                  - $ref: '#/components/schemas/LegacyErrorEnvelope'
              example:
                error:
                  code: cap_reached
                  message: >-
                    You've reached your plan's signal agent limit (1 on the pro
                    plan). Pause and delete an agent, or upgrade your plan.
        '404':
          $ref: '#/components/responses/ListNotFound'
        '409':
          description: The Idempotency-Key was already used with a different request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                error:
                  code: idempotency_key_reuse
                  message: >-
                    This Idempotency-Key was already used with a different
                    request body.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/UpstreamUnavailable'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Unique key (max 64 characters) for safe retries. Replays carry the
        "Idempotency-Replayed" response header set to "true". Keys are retained
        for 24 hours.
      schema:
        type: string
        maxLength: 64
  headers:
    X-RateLimit-Limit:
      description: The limit of the rate window closest to exhaustion.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests remaining in that window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when that window resets.
      schema:
        type: integer
  schemas:
    SignalAgent:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        status:
          type: string
          description: active, paused, or error.
        status_detail:
          type: string
          nullable: true
        icp_description:
          type: string
          description: The ideal customer profile the agent scores people against.
        precision_mode:
          type: string
          enum:
            - high
            - discovery
        destination_list_id:
          type: string
          nullable: true
          description: The contact list deposits go to; joins to `GET /v1/contact-lists`.
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
        deposited_count:
          type: integer
          description: Leads already saved to the destination list.
        last_checked:
          type: string
          format: date-time
          nullable: true
          description: The most recent signal run across the agent's signals.
        signals:
          type: array
          items:
            $ref: '#/components/schemas/SignalAgentSignal'
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
            message:
              type: string
            retry_after:
              type: integer
              description: Seconds to wait before retrying (rate-limit errors only).
    LegacyErrorEnvelope:
      type: object
      required:
        - error
      description: |
        Legacy shape used ONLY by the shared subscription middleware: a plain
        string `error` field. Seen on `403` when the subscription has lapsed
        (string starts with "subscription_required:") and on `500` when
        subscription verification fails (string starts with "internal_error:").
      properties:
        error:
          type: string
          example: >-
            subscription_required: The SuperX API requires an active
            subscription
    SignalAgentSignal:
      type: object
      description: >-
        One watched signal on an agent. Which fields are set depends on the type
        (handle/name/avatar for profile and follower watches, query for keyword
        watches, list_name for list watches).
      properties:
        id:
          type: integer
        type:
          type: string
          enum:
            - profile_watch
            - follower_watch
            - keyword_watch
            - list_watch
        handle:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        avatar:
          type: string
          nullable: true
        query:
          type: string
          nullable: true
        list_name:
          type: string
          nullable: true
        status:
          type: string
        status_detail:
          type: string
          nullable: true
        last_run_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
  responses:
    Unauthorized:
      description: >-
        Missing/malformed Authorization header (`unauthorized`) or an
        unknown/revoked key (`invalid_api_key`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: invalid_api_key
              message: Unknown or revoked API key
    ListNotFound:
      description: No contact list with that id belongs to this account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: list_not_found
              message: No contact list with that id belongs to this account.
    RateLimited:
      description: Rate limit exceeded (limits vary by plan). Honor Retry-After.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: rate_limited
              message: >-
                Rate limit exceeded for the Pro plan (30 requests/min). Upgrade
                for higher limits.
              retry_after: 42
    InternalError:
      description: >-
        Unexpected server error. May also use the legacy string envelope when
        subscription verification fails.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ErrorEnvelope'
              - $ref: '#/components/schemas/LegacyErrorEnvelope'
          example:
            error:
              code: internal_error
              message: Failed to fetch posts
    UpstreamError:
      description: A dependent SuperX service returned an unexpected response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: upstream_error
              message: Failed to fetch scheduled posts. Try again shortly.
    UpstreamUnavailable:
      description: >-
        The scheduling service is temporarily unreachable. Safe to retry; reuse
        your Idempotency-Key on POST.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: upstream_unavailable
              message: >-
                The scheduling service is temporarily unavailable. Retry with
                the same Idempotency-Key.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A SuperX API key ("sxk_..."), created in the SuperX app under Account >
        API / MCP / CLI. Keys are server-side secrets.

````