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

# Update Callout

> Update callout details including scheduling and configuration

# Update Callout

Update specific details of a callout including scheduling, actions, and configuration.

<Note>
  Only certain fields can be updated depending on the callout status. Active
  callouts have limited update capabilities.
</Note>

## Request

<ParamField path="id" type="string" required>
  The unique identifier of the callout to update
</ParamField>

<ParamField body="scheduled_time" type="string">
  ISO 8601 timestamp for when to execute the callout
</ParamField>

<ParamField body="actions" type="object">
  Configuration for callout actions
</ParamField>

<ParamField body="priority" type="string">
  Priority level of the callout (low, medium, high, urgent)
</ParamField>

<ParamField body="target_contact" type="object">
  Updated contact information for the callout target
</ParamField>

<ParamField body="metadata" type="object">
  Additional metadata for the callout
</ParamField>

<ParamField header="Authorization" type="string" required>
  Bearer token for API authentication
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request PUT \
       --url https://api.credira.com/v1/callouts/callout_123456789 \
       --header 'Authorization: Bearer YOUR_API_KEY' \
       --header 'Content-Type: application/json' \
       --data '{
         "scheduled_time": "2024-01-25T14:00:00Z",
         "actions": {
           "calls_enabled": true,
           "emails_enabled": true,
           "voice_agent_id": "agent_789123456"
         },
         "priority": "high",
         "target_contact": {
           "name": "Jane Smith",
           "email": "jane.smith@example.com",
           "phone": "+1987654321"
         },
         "metadata": {
           "campaign_id": "camp_456",
           "department": "sales",
           "notes": "Updated contact information"
         }
       }'
  ```

  ```typescript TypeScript theme={null}
  const calloutId = "callout_123456789";
  const response = await fetch(
    `https://api.credira.com/v1/callouts/${calloutId}`,
    {
      method: "PUT",
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        scheduled_time: "2024-01-25T14:00:00Z",
        actions: {
          calls_enabled: true,
          emails_enabled: true,
          voice_agent_id: "agent_789123456",
        },
        priority: "high",
        target_contact: {
          name: "Jane Smith",
          email: "jane.smith@example.com",
          phone: "+1987654321",
        },
        metadata: {
          campaign_id: "camp_456",
          department: "sales",
          notes: "Updated contact information",
        },
      }),
    }
  );

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample status="200" summary="Success">
  ```json theme={null}
  {
    "success": true,
    "data": {
      "id": "callout_123456789",
      "invoice_id": "inv_987654321",
      "status": "scheduled",
      "type": "payment_reminder",
      "scheduled_time": "2024-01-25T14:00:00Z",
      "created_time": "2024-01-19T09:00:00Z",
      "updated_time": "2024-01-15T10:30:00Z",
      "target_contact": {
        "name": "Jane Smith",
        "email": "jane.smith@example.com",
        "phone": "+1987654321"
      },
      "actions": {
        "calls_enabled": true,
        "emails_enabled": true,
        "voice_agent_id": "agent_789123456"
      },
      "account_id": "acc_789123456",
      "priority": "high",
      "metadata": {
        "campaign_id": "camp_456",
        "department": "sales",
        "notes": "Updated contact information"
      }
    },
    "meta": {
      "timestamp": "2024-01-15T10:30:00Z",
      "request_id": "req_123456789",
      "message": "Callout updated successfully"
    }
  }
  ```
</ResponseExample>

<ResponseExample status="400" summary="Bad Request">
  ```json theme={null}
  {
    "success": false,
    "error": {
      "code": "INVALID_REQUEST",
      "message": "Invalid request data"
    },
    "meta": {
      "timestamp": "2024-01-15T10:30:00Z",
      "request_id": "req_123456789"
    }
  }
  ```
</ResponseExample>

<ResponseExample status="401" summary="Unauthorized">
  ```json theme={null}
  {
    "success": false,
    "error": {
      "code": "UNAUTHORIZED",
      "message": "Invalid or missing API key"
    },
    "meta": {
      "timestamp": "2024-01-15T10:30:00Z",
      "request_id": "req_123456789"
    }
  }
  ```
</ResponseExample>

<ResponseExample status="403" summary="Forbidden">
  ```json theme={null}
  {
    "success": false,
    "error": {
      "code": "FORBIDDEN",
      "message": "You don't have permission to update this callout"
    },
    "meta": {
      "timestamp": "2024-01-15T10:30:00Z",
      "request_id": "req_123456789"
    }
  }
  ```
</ResponseExample>

<ResponseExample status="404" summary="Not Found">
  ```json theme={null}
  {
    "success": false,
    "error": {
      "code": "NOT_FOUND",
      "message": "Callout not found"
    },
    "meta": {
      "timestamp": "2024-01-15T10:30:00Z",
      "request_id": "req_123456789"
    }
  }
  ```
</ResponseExample>

<ResponseExample status="409" summary="Conflict">
  ```json theme={null}
  {
    "success": false,
    "error": {
      "code": "CONFLICT",
      "message": "Cannot update callout that is currently active"
    },
    "meta": {
      "timestamp": "2024-01-15T10:30:00Z",
      "request_id": "req_123456789"
    }
  }
  ```
</ResponseExample>
