> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.askelephant.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.askelephant.ai/_mcp/server.

# Create engagement transcript comment

POST https://app.askelephant.ai/api/v2/engagements/{engagement_id}/transcript_comments
Content-Type: application/json

Creates a transcript comment on a workspace engagement's transcript timeline. When `transcript_timeline_id` is omitted, the server resolves to the engagement's primary transcript timeline. Requires both `engagements:read` and `transcript_comments:write` scopes. Creating a transcript comment for a private engagement also requires `engagements:private:read`.

Reference: https://docs.askelephant.ai/api-reference/transcript-comments/create-engagement-transcript-comment

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: AskElephant Public API
  version: 1.0.0
paths:
  /v2/engagements/{engagement_id}/transcript_comments:
    post:
      operationId: create-engagement-transcript-comment
      summary: Create engagement transcript comment
      description: >-
        Creates a transcript comment on a workspace engagement's transcript
        timeline. When `transcript_timeline_id` is omitted, the server resolves
        to the engagement's primary transcript timeline. Requires both
        `engagements:read` and `transcript_comments:write` scopes. Creating a
        transcript comment for a private engagement also requires
        `engagements:private:read`.
      tags:
        - transcriptComments
      parameters:
        - name: engagement_id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created transcript comment response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transcript_comment'
        '401':
          description: Authentication is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Authenticated but missing required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The requested resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Request body validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/transcript_comment_create_request'
servers:
  - url: https://app.askelephant.ai/api
    description: Production
  - url: https://app-staging.askelephant.ai/api
    description: Staging
components:
  schemas:
    TranscriptCommentCreateRequestAnchor:
      type: object
      properties:
        start_citation:
          type:
            - string
            - 'null'
        end_citation:
          type:
            - string
            - 'null'
        start_seconds:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Start time in seconds. When both start_seconds and end_seconds are
            provided, end_seconds must be greater than or equal to
            start_seconds.
        end_seconds:
          type:
            - number
            - 'null'
          format: double
          description: >-
            End time in seconds. Must be greater than or equal to start_seconds
            when both are provided.
        quote_text:
          type:
            - string
            - 'null'
        speaker_index:
          type:
            - integer
            - 'null'
      title: TranscriptCommentCreateRequestAnchor
    transcript_comment_create_request:
      type: object
      properties:
        transcript_timeline_id:
          type: string
          description: >-
            Transcript timeline identifier. When omitted, the server resolves to
            the engagement's primary transcript timeline.
        body:
          type: string
          description: >-
            Transcript comment body text. Leading and trailing whitespace is
            trimmed server-side; the trimmed value must be at least 1 character.
            Whitespace-only strings are rejected with 422.
        anchor:
          $ref: '#/components/schemas/TranscriptCommentCreateRequestAnchor'
      required:
        - body
      title: transcript_comment_create_request
    TranscriptCommentObject:
      type: string
      enum:
        - transcript_comment
      title: TranscriptCommentObject
    TranscriptCommentStatus:
      type: string
      enum:
        - active
        - resolved
      title: TranscriptCommentStatus
    transcript_comment_anchor:
      type: object
      properties:
        start_citation:
          type:
            - string
            - 'null'
        end_citation:
          type:
            - string
            - 'null'
        start_seconds:
          type:
            - number
            - 'null'
          format: double
        end_seconds:
          type:
            - number
            - 'null'
          format: double
        quote_text:
          type:
            - string
            - 'null'
        speaker_index:
          type:
            - integer
            - 'null'
      required:
        - start_citation
        - end_citation
        - start_seconds
        - end_seconds
        - quote_text
        - speaker_index
      title: transcript_comment_anchor
    transcript_comment:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/TranscriptCommentObject'
        id:
          type: string
        engagement_id:
          type: string
        transcript_timeline_id:
          type: string
        body:
          type: string
        status:
          $ref: '#/components/schemas/TranscriptCommentStatus'
        anchor:
          $ref: '#/components/schemas/transcript_comment_anchor'
        created_by:
          type: string
        resolved_by:
          type:
            - string
            - 'null'
        resolved_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - object
        - id
        - engagement_id
        - transcript_timeline_id
        - body
        - status
        - anchor
        - created_by
        - resolved_by
        - resolved_at
        - created_at
        - updated_at
      title: transcript_comment
    error_item:
      type: object
      properties:
        field:
          type: string
          description: Request field or parameter associated with the error.
        code:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
          description: Human-readable explanation of the error.
      required:
        - code
        - message
      description: Structured validation or field-level error detail.
      title: error_item
    error:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: Stable URI identifying the error category.
        title:
          type: string
          description: Short human-readable summary of the error.
        status:
          type: integer
          description: HTTP status code for this error response.
        detail:
          type: string
          description: Human-readable explanation specific to this request.
        request_id:
          type: string
          description: Correlation identifier for support and debugging.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/error_item'
          description: Optional field-level validation errors.
      required:
        - type
        - title
        - status
        - detail
        - request_id
      description: RFC 9457 problem details response returned for client-visible failures.
      title: error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

```

## Examples



**Request**

```json
{
  "body": "This section needs a follow-up discussion.",
  "anchor": {
    "start_seconds": 62.5,
    "end_seconds": 78,
    "quote_text": "We should revisit the pricing model next quarter."
  }
}
```

**Response**

```json
{
  "object": "transcript_comment",
  "id": "tano_9f8d7a6b3c",
  "engagement_id": "ngmt_4b7e2c1d9f",
  "transcript_timeline_id": "tt_3a9f8b7c2d",
  "body": "This section needs a follow-up discussion.",
  "status": "active",
  "anchor": {
    "start_citation": "Section 3.2, Pricing Strategy",
    "end_citation": "Section 3.2, Pricing Strategy",
    "start_seconds": 62.5,
    "end_seconds": 78,
    "quote_text": "We should revisit the pricing model next quarter.",
    "speaker_index": 0
  },
  "created_by": "usr_7c9e1d2f4a",
  "resolved_by": "usr_8a7b6c5d3e",
  "resolved_at": "2024-01-15T09:30:00Z",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://app.askelephant.ai/api/v2/engagements/engagement_id/transcript_comments"

payload = {
    "body": "This section needs a follow-up discussion.",
    "anchor": {
        "start_seconds": 62.5,
        "end_seconds": 78,
        "quote_text": "We should revisit the pricing model next quarter."
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.askelephant.ai/api/v2/engagements/engagement_id/transcript_comments';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"body":"This section needs a follow-up discussion.","anchor":{"start_seconds":62.5,"end_seconds":78,"quote_text":"We should revisit the pricing model next quarter."}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.askelephant.ai/api/v2/engagements/engagement_id/transcript_comments"

	payload := strings.NewReader("{\n  \"body\": \"This section needs a follow-up discussion.\",\n  \"anchor\": {\n    \"start_seconds\": 62.5,\n    \"end_seconds\": 78,\n    \"quote_text\": \"We should revisit the pricing model next quarter.\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.askelephant.ai/api/v2/engagements/engagement_id/transcript_comments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": \"This section needs a follow-up discussion.\",\n  \"anchor\": {\n    \"start_seconds\": 62.5,\n    \"end_seconds\": 78,\n    \"quote_text\": \"We should revisit the pricing model next quarter.\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.askelephant.ai/api/v2/engagements/engagement_id/transcript_comments")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"This section needs a follow-up discussion.\",\n  \"anchor\": {\n    \"start_seconds\": 62.5,\n    \"end_seconds\": 78,\n    \"quote_text\": \"We should revisit the pricing model next quarter.\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.askelephant.ai/api/v2/engagements/engagement_id/transcript_comments', [
  'body' => '{
  "body": "This section needs a follow-up discussion.",
  "anchor": {
    "start_seconds": 62.5,
    "end_seconds": 78,
    "quote_text": "We should revisit the pricing model next quarter."
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.askelephant.ai/api/v2/engagements/engagement_id/transcript_comments");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"This section needs a follow-up discussion.\",\n  \"anchor\": {\n    \"start_seconds\": 62.5,\n    \"end_seconds\": 78,\n    \"quote_text\": \"We should revisit the pricing model next quarter.\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": "This section needs a follow-up discussion.",
  "anchor": [
    "start_seconds": 62.5,
    "end_seconds": 78,
    "quote_text": "We should revisit the pricing model next quarter."
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.askelephant.ai/api/v2/engagements/engagement_id/transcript_comments")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```