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

# Twilio - Set Context

> Sets context for a Twilio voice call with the provided details



## OpenAPI

````yaml POST /voice/api/v1/twilio/set-context
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://protegee.ai/
security:
  - bearerAuth: []
paths:
  /voice/api/v1/twilio/set-context:
    post:
      description: Sets context for a Twilio voice call with the provided details
      parameters:
        - name: api_token
          in: query
          description: API token to authenticate the request
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                caller:
                  type: string
                  description: Phone number of the caller (your customer)
                  default: '+16151231234'
                description:
                  type: string
                  description: Details about the purchase
                  default: >-
                    Reservation for two at The Gourmet Bistro, 7:30 PM on
                    December 30th, 2024, Table 12, Indoor seating, Special
                    request: Window view, Confirmation number: 12345
                price:
                  type: string
                  description: Price of the item (in USD), e.g. 10.50
                  default: '10.00'
                vendor:
                  type: string
                  description: >-
                    Who this payment should be sent to - please refer to the
                    /vendors page to find the full list
                  default: example-co
                customer_id:
                  type: string
                  description: >-
                    To specify the processor-specific customer ID (if you have
                    it). Only used if processor is Authorize.net.
                  default: ''
                persona:
                  type: string
                  description: 'Which voice to use - currently available: ''english-jessica'''
                  default: english-jessica
                callback:
                  type: string
                  description: >-
                    Phone number to hand the call back to after the payment is
                    processed, e.g. +14155552671
                  default: '+14155552671'
                email:
                  type: string
                  description: Email of the caller (your customer)
                  format: email
                  default: my_customer@company.com
                full_name:
                  type: string
                  description: Name of the caller (your customer)
                  default: John Doe
                transaction_type:
                  type: string
                  description: How to process the transaction
                  default: once
                  enum:
                    - once
                    - subscription
                    - authorize
                memory:
                  type: string
                  description: >-
                    Literally anything. Typically used to share information
                    across agents.
              required:
                - caller
                - description
                - price
                - vendor
      responses:
        '200':
          description: Get / Set Context Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContextResponse'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    description: Details about the response
                    type: object
components:
  schemas:
    ContextResponse:
      required:
        - status
        - message
      type: object
      properties:
        status:
          description: status of the request
          type: string
          enum:
            - success
            - error
        message:
          description: Details about the response
          type: object

````