> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Create an API comment

POST https://api.getpostman.com/apis/{apiId}/comments
Content-Type: application/json

Creates a comment on an API. To create a reply on an existing comment, include the `threadId` property in the request body.

**Note:**

This endpoint accepts a max of 10,000 characters.


Reference: https://learning.postman.com/api-docs/api-reference/api/create-api-comment

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /apis/{apiId}/comments:
    post:
      operationId: createApiComment
      summary: Create an API comment
      description: >
        Creates a comment on an API. To create a reply on an existing comment,
        include the `threadId` property in the request body.


        **Note:**


        This endpoint accepts a max of 10,000 characters.
      tags:
        - api
      parameters:
        - name: apiId
          in: path
          description: The API's ID.
          required: true
          schema:
            $ref: '#/components/schemas/apiId'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commentCreatedUpdated'
        '400':
          description: Missing v10 Accept Header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorNameMessage'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/commentCreate'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    apiId:
      type: string
      title: apiId
    CommentTaggedUsersUserNameType:
      type: string
      enum:
        - user
      description: The `user` value.
      title: CommentTaggedUsersUserNameType
    CommentTaggedUsersUserName:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommentTaggedUsersUserNameType'
          description: The `user` value.
        id:
          type: string
          description: The user's ID.
      required:
        - type
        - id
      description: >-
        An object that contains information about the tagged user. The object's
        name is the user's Postman username. For example, `@user-postman`.
      title: CommentTaggedUsersUserName
    commentTaggedUsers:
      type: object
      properties:
        '{{userName}}':
          $ref: '#/components/schemas/CommentTaggedUsersUserName'
          description: >-
            An object that contains information about the tagged user. The
            object's name is the user's Postman username. For example,
            `@user-postman`.
      description: Information about users tagged in the `body` comment.
      title: commentTaggedUsers
    commentCreate:
      type: object
      properties:
        body:
          type: string
          description: The contents of the comment.
        threadId:
          type: integer
          description: >-
            The comment's thread ID. To create a reply on an existing comment,
            include this property.
        tags:
          $ref: '#/components/schemas/commentTaggedUsers'
      required:
        - body
      description: Information about the comment.
      title: commentCreate
    CommentCreatedUpdatedData:
      type: object
      properties:
        id:
          type: integer
          description: The comment's ID.
        threadId:
          type: integer
          description: The comment's thread ID.
        createdBy:
          type: integer
          description: The user ID of the user who created the comment.
        createdAt:
          type: string
          format: date-time
          description: The date and time at which the comment was created.
        updatedAt:
          type: string
          format: date-time
          description: The date and time when the comment was last updated.
        body:
          type: string
          description: The contents of the comment.
      title: CommentCreatedUpdatedData
    commentCreatedUpdated:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CommentCreatedUpdatedData'
      title: commentCreatedUpdated
    apiErrorNameMessage:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      title: apiErrorNameMessage
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples

### Comment Created



**Request**

```json
undefined
```

**Response**

```json
{
  "data": {
    "id": 46814,
    "threadId": 12345,
    "createdBy": 12345678,
    "createdAt": "2024-01-18T11:30:40.000Z",
    "updatedAt": "2024-01-18T11:30:40.000Z",
    "body": "This is an example.",
    "status": "Open"
  }
}
```

**SDK Code**

```python Comment Created
import requests

url = "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Comment Created
const url = 'https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go Comment Created
package main

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

func main() {

	url := "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments"

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

	req.Header.Add("x-api-key", "<apiKey>")
	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 Comment Created
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Comment Created
using RestSharp;

var client = new RestClient("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Comment Created
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```

### Create Comment



**Request**

```json
{
  "body": "This is an example."
}
```

**Response**

```json
{
  "data": {
    "id": 46814,
    "threadId": 12345,
    "createdBy": 12345678,
    "createdAt": "2024-01-18T11:30:40.000Z",
    "updatedAt": "2024-01-18T11:30:40.000Z",
    "body": "This is an example.",
    "status": "Open"
  }
}
```

**SDK Code**

```python Create Comment
import requests

url = "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments"

payload = { "body": "This is an example." }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Create Comment
const url = 'https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"body":"This is an example."}'
};

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

```go Create Comment
package main

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

func main() {

	url := "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments"

	payload := strings.NewReader("{\n  \"body\": \"This is an example.\"\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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 Create Comment
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": \"This is an example.\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"This is an example.\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments', [
  'body' => '{
  "body": "This is an example."
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Create Comment
using RestSharp;

var client = new RestClient("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"This is an example.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create Comment
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["body": "This is an example."] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/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()
```

### Reply to Comment Thread



**Request**

```json
{
  "body": "This is an example.",
  "threadId": 12345
}
```

**Response**

```json
{
  "data": {
    "id": 46814,
    "threadId": 12345,
    "createdBy": 12345678,
    "createdAt": "2024-01-18T11:30:40.000Z",
    "updatedAt": "2024-01-18T11:30:40.000Z",
    "body": "This is an example.",
    "status": "Open"
  }
}
```

**SDK Code**

```python Reply to Comment Thread
import requests

url = "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments"

payload = {
    "body": "This is an example.",
    "threadId": 12345
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Reply to Comment Thread
const url = 'https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"body":"This is an example.","threadId":12345}'
};

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

```go Reply to Comment Thread
package main

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

func main() {

	url := "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments"

	payload := strings.NewReader("{\n  \"body\": \"This is an example.\",\n  \"threadId\": 12345\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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 Reply to Comment Thread
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": \"This is an example.\",\n  \"threadId\": 12345\n}"

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

```java Reply to Comment Thread
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"This is an example.\",\n  \"threadId\": 12345\n}")
  .asString();
```

```php Reply to Comment Thread
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments', [
  'body' => '{
  "body": "This is an example.",
  "threadId": 12345
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Reply to Comment Thread
using RestSharp;

var client = new RestClient("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"This is an example.\",\n  \"threadId\": 12345\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Reply to Comment Thread
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": "This is an example.",
  "threadId": 12345
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/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()
```

### Tag User in Comment



**Request**

```json
{
  "body": "This is an example. @alex-cruz",
  "tags": {
    "@alex-cruz": {
      "id": "87654321",
      "type": "user"
    }
  }
}
```

**Response**

```json
{
  "data": {
    "id": 46814,
    "threadId": 12345,
    "createdBy": 12345678,
    "createdAt": "2024-01-18T11:30:40.000Z",
    "updatedAt": "2024-01-18T11:30:40.000Z",
    "body": "This is an example.",
    "status": "Open"
  }
}
```

**SDK Code**

```python Tag User in Comment
import requests

url = "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments"

payload = {
    "body": "This is an example. @alex-cruz",
    "tags": { "@alex-cruz": {
            "id": "87654321",
            "type": "user"
        } }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Tag User in Comment
const url = 'https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"body":"This is an example. @alex-cruz","tags":{"@alex-cruz":{"id":"87654321","type":"user"}}}'
};

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

```go Tag User in Comment
package main

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

func main() {

	url := "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments"

	payload := strings.NewReader("{\n  \"body\": \"This is an example. @alex-cruz\",\n  \"tags\": {\n    \"@alex-cruz\": {\n      \"id\": \"87654321\",\n      \"type\": \"user\"\n    }\n  }\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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 Tag User in Comment
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": \"This is an example. @alex-cruz\",\n  \"tags\": {\n    \"@alex-cruz\": {\n      \"id\": \"87654321\",\n      \"type\": \"user\"\n    }\n  }\n}"

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

```java Tag User in Comment
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"This is an example. @alex-cruz\",\n  \"tags\": {\n    \"@alex-cruz\": {\n      \"id\": \"87654321\",\n      \"type\": \"user\"\n    }\n  }\n}")
  .asString();
```

```php Tag User in Comment
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments', [
  'body' => '{
  "body": "This is an example. @alex-cruz",
  "tags": {
    "@alex-cruz": {
      "id": "87654321",
      "type": "user"
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Tag User in Comment
using RestSharp;

var client = new RestClient("https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/comments");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"This is an example. @alex-cruz\",\n  \"tags\": {\n    \"@alex-cruz\": {\n      \"id\": \"87654321\",\n      \"type\": \"user\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Tag User in Comment
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": "This is an example. @alex-cruz",
  "tags": ["@alex-cruz": [
      "id": "87654321",
      "type": "user"
    ]]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/apis/90ca9f5a-c4c4-11ed-afa1-0242ac120002/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()
```