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

# Create A Scout

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.yutori.com/v1/scouting/tasks \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "query": "Tell me about the latest news, product updates, press releases, social media announcements, investments into, or other relevant information about Yutori"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.yutori.com/v1/scouting/tasks",
      headers={"X-API-Key": "YOUR_API_KEY"},
      json={
          "query": "Tell me about the latest news, product updates, press releases, social media announcements, investments into, or other relevant information about Yutori"
      }
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.yutori.com/v1/scouting/tasks", {
    method: "POST",
    headers: {
      "X-API-Key": "YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      query: "Tell me about the latest news, product updates, press releases, social media announcements, investments into, or other relevant information about Yutori"
    })
  });
  const data = await response.json();
  ```
</RequestExample>

## Advanced Example

<Accordion title="Receive structured output on a webhook when the task completes">
  Configure structured output with `output_schema` to receive data in a specific JSON schema format, and optionally add webhook notifications.

  <CodeGroup>
    ```bash cURL theme={null}
    curl --request POST \
      --url https://api.yutori.com/v1/scouting/tasks \
      --header 'X-API-Key: YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "query": "Tell me about the latest news, product updates, press releases, social media announcements, investments into, or other relevant information about Yutori",
        "output_interval": 86400,
        "user_timezone": "America/Los_Angeles",
        "skip_email": true,
        "webhook_url": "https://example.com/webhook",
        "output_schema": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "headline": { "type": "string" },
              "summary": { "type": "string" },
              "source_url": { "type": "string" }
            }
          }
        }
      }'
    ```

    ```python Python theme={null}
    import requests

    response = requests.post(
        "https://api.yutori.com/v1/scouting/tasks",
        headers={"X-API-Key": "YOUR_API_KEY"},
        json={
            "query": "Tell me about the latest news, product updates, press releases, social media announcements, investments into, or other relevant information about Yutori",
            "output_interval": 86400,
            "user_timezone": "America/Los_Angeles",
            "skip_email": True,
            "webhook_url": "https://example.com/webhook",
            "output_schema": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "headline": {"type": "string"},
                        "summary": {"type": "string"},
                        "source_url": {"type": "string"}
                    }
                }
            }
        }
    )
    print(response.json())
    ```

    ```javascript JavaScript theme={null}
    const response = await fetch("https://api.yutori.com/v1/scouting/tasks", {
      method: "POST",
      headers: {
        "X-API-Key": "YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        query: "Tell me about the latest news, product updates, press releases, social media announcements, investments into, or other relevant information about Yutori",
        output_interval: 86400,
        user_timezone: "America/Los_Angeles",
        skip_email: true,
        webhook_url: "https://example.com/webhook",
        output_schema: {
          type: "array",
          items: {
            type: "object",
            properties: {
              headline: { type: "string" },
              summary: { type: "string" },
              source_url: { type: "string" }
            }
          }
        }
      })
    });
    const data = await response.json();
    ```
  </CodeGroup>
</Accordion>


## OpenAPI

````yaml POST /v1/scouting/tasks
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.yutori.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /v1/scouting/tasks:
    post:
      tags:
        - Scouting
      summary: Create Scout Task
      operationId: create_scout_task_v1_scouting_tasks_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScoutRequestAPI'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateScoutResponsePublic'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateScoutRequestAPI:
      properties:
        output_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output Schema
          description: >-
            JSON Schema for structured output. Takes precedence over task_spec
            if both provided.
          examples:
            - items:
                properties:
                  headline:
                    description: News headline
                    type: string
                  summary:
                    description: Brief summary
                    type: string
                  source_url:
                    description: URL for more details
                    type: string
                type: object
              type: array
        task_spec:
          anyOf:
            - $ref: '#/components/schemas/TaskSpec'
            - type: 'null'
          description: Deprecated but still supported. Use output_schema instead.
          deprecated: true
        used_deprecated_task_spec:
          type: boolean
          title: Used Deprecated Task Spec
          default: false
          hidden: true
        query:
          type: string
          title: Query
          description: |2-

                    String describing what to monitor in natural language.
                    This is typically what a user types into the Scouts web UI (without any frequency preferences).
                    
          examples:
            - >-
              Tell me about the latest news, product updates, press releases,
              social media announcements, investments into, or other relevant
              information about Yutori, the AI company.
        output_interval:
          type: integer
          title: Output Interval
          description: |2-

                    Interval in seconds of how often to run the task. This must be >= 1800 (= 30 minutes).
                    On the web UI, this is inferred from what the user types into the new scout input (e.g. "daily at 9am").
                    Recommended: 86400 (daily) or 3600 (hourly).
                    
          default: 86400
          examples:
            - 3600
        start_timestamp:
          type: integer
          title: Start Timestamp
          description: |2-

                    Unix timestamp (past, present, or future) of when the scout should start running.
                    If past, present, or up to 30 min in the future, the scout will start running immediately.
                    Else, the scout will start running at the specified timestamp.
                    
          default: 0
          examples:
            - 0
        user_timezone:
          type: string
          title: User Timezone
          description: |2-

                    String indicating the user's timezone (e.g. "America/Los_Angeles")
                    On the web UI, this is inferred from the browser's timezone.
                    Default: "America/Los_Angeles".
                    
          default: America/Los_Angeles
          examples:
            - America/Los_Angeles
        user_location:
          anyOf:
            - type: string
            - type: 'null'
          title: User Location
          description: |2-

                    String indicating the user's coarse location in the format: city, region_code, country_name.
                    On the web UI, this is inferred from the browser's location.
                    Default: "San Francisco, CA, US".
                    
          default: San Francisco, CA, US
          examples:
            - San Francisco, CA, US
        skip_email:
          type: boolean
          title: Skip Email
          description: |2-

                    If true, email notifications will be skipped and only webhook notifications will be sent.
                    Email subscriptions will still be stored but no emails will be sent.
                    Default: true (sends webhooks only).
                    
          default: true
          examples:
            - true
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: >-
            Optional webhook URL to receive updates for this scout. Creates a
            webhook subscription for the calling user using webhook_format.
          examples:
            - null
        webhook_format:
          type: string
          enum:
            - scout
            - slack
            - zapier
          title: Webhook Format
          description: >-
            Webhook payload format to use when webhook_url is provided. Slack
            incoming webhook URLs require 'slack'.
          default: scout
          examples:
            - scout
        is_public:
          type: boolean
          title: Is Public
          description: |2-

                    Whether the scout is publicly accessible (true) or private (false).
                    Public scouts can be accessed by anyone via the UUID link.
                    Private scouts can only be accessed by the creator.
                    Default: false (private).
                    
          default: false
      type: object
      required:
        - query
      title: CreateScoutRequestAPI
    CreateScoutResponsePublic:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        query:
          type: string
          title: Query
        query_object:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Query Object
        display_name:
          type: string
          title: Display Name
        next_run_timestamp:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Run Timestamp
        user_timezone:
          type: string
          title: User Timezone
        next_output_timestamp:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Output Timestamp
        created_at:
          type: string
          format: date-time
          title: Created At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        paused_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Paused At
        rejection_reason:
          anyOf:
            - $ref: '#/components/schemas/RejectionReason'
            - type: 'null'
        is_public:
          type: boolean
          title: Is Public
          default: false
        view_url:
          anyOf:
            - type: string
            - type: 'null'
          title: View Url
          description: URL to view this scout's details in the API platform dashboard.
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: >-
            Optional webhook URL configured for this scout, if provided at
            creation time.
        output_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output Schema
          description: JSON Schema for structured output, if configured
          readOnly: true
      type: object
      required:
        - id
        - query
        - display_name
        - next_run_timestamp
        - user_timezone
        - next_output_timestamp
        - created_at
        - completed_at
        - paused_at
        - output_schema
      title: CreateScoutResponsePublic
      description: >-
        Public API response for scout creation. Excludes internal fields like
        llm_output.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskSpec:
      properties:
        output_schema:
          anyOf:
            - $ref: '#/components/schemas/JsonSchemaSpec'
            - type: 'null'
      type: object
      title: TaskSpec
    RejectionReason:
      type: string
      enum:
        - insufficient_prepaid_balance
        - budget_exceeded
        - subscription_inactive
      title: RejectionReason
    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
    JsonSchemaSpec:
      properties:
        type:
          type: string
          const: json
          title: Type
          default: json
        json_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Json Schema
          description: A JSON Schema object defining the structure
      type: object
      title: JsonSchemaSpec
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````