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

# Create Tool



## OpenAPI

````yaml /openapi/openapi.yaml post /v1/tools
openapi: 3.1.0
info:
  title: OneInbox API
  version: 1.0.0
servers:
  - url: https://api.oneinbox.ai
    description: Production server
security: []
tags:
  - name: health
  - name: integrations
  - name: llm-models
  - name: tools
  - name: knowledge-bases
  - name: voices
  - name: webhooks
  - name: agents
  - name: phone-numbers
  - name: calls
  - name: workspace
  - name: usage
  - name: audit-events
paths:
  /v1/tools:
    post:
      tags:
        - tools
      summary: Create Tool
      operationId: create_tool_v1_tools_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateApiCallToolRequest'
                - $ref: '#/components/schemas/CreateTransferCallToolRequest'
                - $ref: '#/components/schemas/CreateEndCallToolRequest'
                - $ref: '#/components/schemas/CreateSendSmsToolRequest'
                - $ref: '#/components/schemas/CreateSendEmailToolRequest'
                - $ref: '#/components/schemas/CreateScheduleCalendarEventToolRequest'
                - $ref: '#/components/schemas/CreateExtractInformationToolRequest'
              discriminator:
                propertyName: type
                mapping:
                  api_call:
                    $ref: '#/components/schemas/CreateApiCallToolRequest'
                  transfer_call:
                    $ref: '#/components/schemas/CreateTransferCallToolRequest'
                  end_call:
                    $ref: '#/components/schemas/CreateEndCallToolRequest'
                  send_sms:
                    $ref: '#/components/schemas/CreateSendSmsToolRequest'
                  send_email:
                    $ref: '#/components/schemas/CreateSendEmailToolRequest'
                  schedule_calendar_event:
                    $ref: >-
                      #/components/schemas/CreateScheduleCalendarEventToolRequest
                  extract_information:
                    $ref: '#/components/schemas/CreateExtractInformationToolRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - API Key: []
components:
  schemas:
    CreateApiCallToolRequest:
      title: API Call
      type: object
      required:
        - name
        - type
        - description
        - url
        - method
      properties:
        name:
          type: string
          example: check_inventory
        type:
          type: string
          enum:
            - api_call
          example: api_call
        description:
          type: string
          example: Look up inventory by SKU.
        url:
          type: string
          description: HTTP endpoint to call during the conversation
          example: https://api.example.com/inventory
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
          example: POST
        headers:
          type: object
          description: Static headers sent with every request (e.g. Authorization)
          example:
            Authorization: Bearer {{secret}}
        parameters:
          type: array
          description: >-
            Fields the agent extracts from the conversation and sends to the
            endpoint
          items:
            type: object
            required:
              - name
              - type
            properties:
              name:
                type: string
              type:
                type: string
                enum:
                  - string
                  - number
                  - boolean
              required:
                type: boolean
              description:
                type: string
        run_in_background:
          type: boolean
          description: Agent keeps talking while the HTTP call executes
          example: false
        speak_during_execution:
          type: boolean
          description: Agent says a filler phrase while waiting for the response
          example: true
    CreateTransferCallToolRequest:
      title: Transfer Call
      type: object
      required:
        - name
        - type
        - description
        - transfer_to
      properties:
        name:
          type: string
          example: transfer_to_human
        type:
          type: string
          enum:
            - transfer_call
          example: transfer_call
        description:
          type: string
          example: Escalate to a human agent.
        transfer_to:
          type: string
          description: E.164 phone number to transfer the caller to
          example: '+15105550100'
        transfer_config:
          type: object
          description: >-
            Transfer type. Omit or mode='cold' for a blind SIP REFER;
            mode='warm' uses a consult room with hold music and a context
            handoff to the human.
          properties:
            mode:
              type: string
              enum:
                - cold
                - warm
              default: cold
              example: warm
            extra_instructions:
              type: string
              description: Extra guidance for the warm-transfer agent during the handoff.
              example: Brief the agent on the caller's issue before connecting.
    CreateEndCallToolRequest:
      title: End Call
      type: object
      required:
        - name
        - type
        - description
      properties:
        name:
          type: string
          example: hangup
        type:
          type: string
          enum:
            - end_call
          example: end_call
        description:
          type: string
          example: End the call politely.
    CreateSendSmsToolRequest:
      title: Send SMS
      type: object
      required:
        - name
        - type
        - description
        - messaging_config
      properties:
        name:
          type: string
          example: send_confirmation_sms
        type:
          type: string
          enum:
            - send_sms
          example: send_sms
        description:
          type: string
          example: Send a confirmation SMS to the caller.
        messaging_config:
          type: object
          required:
            - to
            - body_template
          properties:
            to:
              type: string
              description: Destination phone number in E.164 format
              example: '+15555550000'
            body_template:
              type: string
              description: Message body. Use {{variable}} placeholders for dynamic values.
              example: Hi {{name}}, your appointment is confirmed for {{date}}.
    CreateSendEmailToolRequest:
      title: Send Email
      type: object
      required:
        - name
        - type
        - description
        - messaging_config
        - credential_id
      properties:
        name:
          type: string
          example: send_followup_email
        type:
          type: string
          enum:
            - send_email
          example: send_email
        description:
          type: string
          example: Send a follow-up email after the call.
        credential_id:
          type: string
          description: >-
            ID of a resend/sendgrid integration (POST /v1/integrations) whose
            verified from_email is used as the sender. Required for send_email.
          example: crd_xxxxxxxxxxxxxxxxxxxxxxxx
        messaging_config:
          type: object
          required:
            - to
            - subject_template
            - body_template
          properties:
            to:
              type: string
              description: Destination email address
              example: leads@example.com
            subject_template:
              type: string
              description: Email subject line. Use {{variable}} placeholders.
              example: 'New lead: {{name}}'
            body_template:
              type: string
              description: Email body. Use {{variable}} placeholders.
              example: '{{summary}}'
    CreateScheduleCalendarEventToolRequest:
      title: Schedule Calendar Event
      type: object
      required:
        - name
        - type
        - description
        - calendar_config
        - credential_id
      properties:
        name:
          type: string
          example: book_demo
        type:
          type: string
          enum:
            - schedule_calendar_event
          example: schedule_calendar_event
        description:
          type: string
          example: Book a demo on the team's calendar.
        credential_id:
          type: string
          description: >-
            ID of a calcom integration (POST /v1/integrations, provider=calcom)
            whose API key books the event. Required for schedule_calendar_event.
          example: crd_xxxxxxxxxxxxxxxxxxxxxxxx
        calendar_config:
          type: object
          required:
            - event_type_id
          properties:
            event_type_id:
              type: integer
              description: Cal.com event type id to book.
              example: 123456
            duration_minutes:
              type: integer
              description: Length of the event in minutes.
              example: 30
            timezone:
              type: string
              description: IANA timezone (e.g. America/New_York).
              example: America/New_York
    CreateExtractInformationToolRequest:
      title: Extract Information
      type: object
      required:
        - name
        - type
        - description
        - extraction_schema
      properties:
        name:
          type: string
          example: capture_lead
        type:
          type: string
          enum:
            - extract_information
          example: extract_information
        description:
          type: string
          example: Capture the caller's name, email, and reason for calling.
        extraction_schema:
          type: object
          required:
            - fields
          properties:
            fields:
              type: array
              items:
                type: object
                required:
                  - name
                  - type
                properties:
                  name:
                    type: string
                  type:
                    type: string
                    enum:
                      - string
                      - boolean
                      - number
                  required:
                    type: boolean
                  description:
                    type: string
              example:
                - name: full_name
                  type: string
                  required: true
                  description: Caller's full name
                - name: email
                  type: string
                  description: Caller's email address
                - name: reason_for_call
                  type: string
                  description: Why they are calling
    ToolResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        method:
          anyOf:
            - type: string
            - type: 'null'
          title: Method
        headers:
          additionalProperties: true
          type: object
          title: Headers
        parameters:
          items: {}
          type: array
          title: Parameters
        parameters_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters Schema
        credential_id:
          type: string
          title: Credential Id
        transfer_to:
          anyOf:
            - type: string
            - type: 'null'
          title: Transfer To
        transfer_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Transfer Config
        run_in_background:
          type: boolean
          title: Run In Background
          default: false
        speak_during_execution:
          type: boolean
          title: Speak During Execution
          default: false
        extraction_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extraction Schema
        messaging_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Messaging Config
        calendar_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Calendar Config
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - type
        - description
        - url
        - method
        - headers
        - parameters
        - transfer_to
        - created_at
        - updated_at
      title: ToolResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    API Key:
      type: http
      description: >-
        Your **API key** sent as a Bearer credential — `Authorization: Bearer
        <api_key>`, where `<api_key>` starts with `oi_sk_` (create one via `POST
        /v1/api-keys`). Although the field is labelled 'token', paste your API
        key here. A dashboard JWT is also accepted on this header for the same
        endpoints.
      scheme: bearer

````