# Agent Completed

`webhook agentCompleted`

## OpenAPI

````yaml api-reference/webhooks-openapi.json webhook agentCompleted
openapi: 3.1.0
info:
  title: Firecrawl Webhooks
  version: v2
webhooks:
  agentCompleted:
    post:
      summary: Agent Completed
      operationId: agentCompleted
      tags:
        - Agent
      parameters:
        - $ref: "#/components/parameters/FirecrawlSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - success
                - type
                - id
                - webhookId
                - data
              properties:
                success:
                  type: boolean
                  const: true
                type:
                  type: string
                  const: agent.completed
                id:
                  type: string
                  format: uuid
                  description: The agent job ID.
                webhookId:
                  type: string
                  format: uuid
                  description: Unique identifier for this webhook delivery.
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      creditsUsed:
                        type: number
                        description: Total credits consumed by the agent run.
                      data:
                        type: object
                        description: The structured data extracted by the agent, matching your schema if
                          one was provided.
                        additionalProperties: true
                metadata:
                  $ref: "#/components/schemas/WebhookMetadata"
            example:
              success: true
              type: agent.completed
              id: 550e8400-e29b-41d4-a716-446655440000
              webhookId: d4e5f6a7-0003-0000-0000-000000000000
              data:
                - creditsUsed: 15
                  data:
                    company: Example Corp
                    industry: Technology
                    founded: 2020
              metadata: {}
      responses:
        "200":
          description: Return any `2xx` status code to acknowledge receipt.
components:
  parameters:
    FirecrawlSignature:
      name: X-Firecrawl-Signature
      in: header
      required: false
      description: HMAC-SHA256 signature of the raw request body, formatted as
        `sha256=<hex>`. Present when an HMAC secret is configured in your
        [account settings](https://www.firecrawl.dev/app/settings?tab=advanced).
        See [Webhook Security](/webhooks/security) for verification details.
      schema:
        type: string
        example: sha256=abc123def456789...
  schemas:
    WebhookMetadata:
      type: object
      description: The custom metadata object you provided in the webhook
        configuration. Echoed back in every delivery.
      additionalProperties:
        type: string
````
