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

# Add Action to Telephone Encounter

> Adds a timestamped action log to an existing telephone encounter in the provider's EMR system.

### Request Parameters

#### Required Fields

* **appointment\_id** (string, required): The identifier of the telephone encounter to add the action to. This is **not** the "Ref #" shown in the eCW UI. Use one of the identifiers Cobalt provides — any of the following is accepted:
  * The `telephone_encounter_id` returned by [`POST /telephone-encounters`](/api-reference/telephone-encounters/create) when you created the encounter.
  * The `emr_encounter_id` from the `telephone_encounter.created` webhook payload.
  * The appointment `id` returned by the appointment fetch endpoints/webhooks (Cobalt resolves it to the underlying encounter).

* **text** (string, required): The action text/note to add to the telephone encounter log

### How It Works

When you add an action to a telephone encounter:

1. **Formatting**: The action is automatically formatted with the staff member's name, timestamp, and timezone
2. **Appending**: The formatted action is appended to the existing action log in the telephone encounter
3. **Timestamping**: Each action includes the exact date, time, and timezone when it was added

### Example Request

```bash theme={null}
curl -X POST https://api.usecobalt.com/v1/telephone-encounters/actions \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "appointment_id": "3fa85f6457174562b3fc2c963f66afa6",
    "text": "Patient called for prescription refill"
}'
```

### Example Response

```json theme={null}
{
  "success": true,
  "message": "Action processing. A webhook event will be sent upon completion.",
  "action_id": "a7b8c9d0e1f2g3h4i5j6k7l8m9n0o1p2",
  "job_id": 12345
}
```

### Response Fields

* **success** (boolean): Indicates if the request was accepted for processing
* **message** (string): Confirmation message
* **action\_id** (string): Unique identifier for the action record (32-character hex string)
* **job\_id** (integer): Reference to the job that will process this action

### Webhook Events

You'll receive a webhook when the action is processed:

#### Success Event

```json theme={null}
{
  "id": "evt_abc123",
  "object": "event",
  "type": "telephone_encounter_action.created",
  "created": "2026-01-21T20:15:30.000Z",
  "job_id": "12345",
  "access_token_reference_id": "user_123",
  "data": {
    "action_id": "a7b8c9d0e1f2g3h4i5j6k7l8m9n0o1p2",
    "emr_appointment_id": "3784895",
    "text": "Patient called for prescription refill"
  }
}
```


## OpenAPI

````yaml POST /telephone-encounters/actions
openapi: 3.0.0
info:
  title: Cobalt API
  version: 1.0.1
  description: API for interacting with Cobalt's EHR integration services
servers:
  - url: https://api.usecobalt.com/v1
security:
  - ClientCredentials: []
    ClientSecret: []
    AccessToken: []
paths:
  /telephone-encounters/actions:
    post:
      summary: Add Action to Telephone Encounter
      description: >-
        Adds a timestamped action log to an existing telephone encounter in the
        provider's EMR system. This is an asynchronous operation that returns
        immediately with a job_id, and sends webhook notification upon
        completion.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - appointment_id
                - text
              properties:
                appointment_id:
                  type: string
                  description: The ID of the telephone encounter
                text:
                  type: string
                  description: The action text/note to add to the telephone encounter log
                is_high_priority:
                  type: string
                  enum:
                    - 'true'
                    - 'false'
                  description: >-
                    Whether this action should be marked as high priority
                    (optional). Must be "true" or "false"
      responses:
        '200':
          description: Action queued successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                    example: >-
                      Action processing. A webhook event will be sent upon
                      completion.
                  action_id:
                    type: string
                    description: >-
                      Unique identifier for the action record (32-character hex
                      string)
                  job_id:
                    type: integer
                    description: Job execution identifier for tracking the async operation
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                    example: 'Missing required parameters: appointment_id, text.'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                    example: Error creating action.
                  action_id:
                    type: string
                    nullable: true
components:
  securitySchemes:
    ClientCredentials:
      type: apiKey
      in: header
      name: client_id
    ClientSecret:
      type: apiKey
      in: header
      name: client_secret
    AccessToken:
      type: apiKey
      in: header
      name: access_token

````