1. Comments
    2. /Comment

    Comment

    Comments are messages on a Thread.


    Create a Comment

    Creates a new Comment related to an existing Thread, Record or Entry.

    Scopes

    • list_entry:readoptional
    • comment:read-writerequired
    • record_permission:readoptional
    • list_configuration:readoptional
    • object_configuration:readoptional

    Request Body

    dataunion

    REQUIRED

    Response

    Status code

    Description



    Request

    POST
    /v2/comments
    curl https://api.attio.com/v2/comments \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -d @- << EOF
    {
    "data": {
    "author": {
    "id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
    "type": "workspace-member"
    },
    "format": "plaintext",
    "content": "If I put the email address of my colleague on Attio in here, e.g. [email protected], they will be notified. Other emails (e.g. [email protected]) will be turned into clickable links.",
    "thread_id": "aa1dc1d9-93ac-4c6c-987e-16b6eea9aab2"
    }
    }
    EOF

    Response

    200 - Success

    {
    "data": {
    "id": {
    "comment_id": "aa1dc1d9-93ac-4c6c-987e-16b6eea9aab2",
    "workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c"
    },
    "entry": {
    "list_id": "33ebdbe9-e529-47c9-b894-0ba25e9c15c0",
    "entry_id": "2e6e29ea-c4e0-4f44-842d-78a891f8c156"
    },
    "author": {
    "id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
    "type": "workspace-member"
    },
    "record": {
    "object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
    "record_id": "bf071e1f-6035-429d-b874-d83ea64ea13b"
    },
    "thread_id": "aa1dc1d9-93ac-4c6c-987e-16b6eea9aab2",
    "created_at": "2023-01-01T15:00:00.000000000Z",
    "resolved_at": "2023-01-01T15:00:00.000000000Z",
    "resolved_by": {
    "id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
    "type": "workspace-member"
    },
    "content_plaintext": "Let's go ahead and close this deal, [email protected]."
    }
    }

    Get a Comment

    Get a single Comment by ID.

    Scopes

    • comment:readrequired
    • list_entry:readoptional
    • record_permission:readoptional
    • list_configuration:readoptional
    • object_configuration:readoptional

    Path params

    comment_idstring

    REQUIRED

    A UUID which identifies the Comment.

    Format: UUID

    Response

    Status code

    Description



    Request

    GET
    /v2/comments/:comment_id
    curl https://api.attio.com/v2/comments/aa1dc1d9-93ac-4c6c-987e-16b6eea9aab2 \
    -H "Authorization: Bearer <token>"

    Response

    200 - Success

    {
    "data": {
    "id": {
    "comment_id": "aa1dc1d9-93ac-4c6c-987e-16b6eea9aab2",
    "workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c"
    },
    "entry": {
    "list_id": "33ebdbe9-e529-47c9-b894-0ba25e9c15c0",
    "entry_id": "2e6e29ea-c4e0-4f44-842d-78a891f8c156"
    },
    "author": {
    "id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
    "type": "workspace-member"
    },
    "record": {
    "object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
    "record_id": "bf071e1f-6035-429d-b874-d83ea64ea13b"
    },
    "thread_id": "aa1dc1d9-93ac-4c6c-987e-16b6eea9aab2",
    "created_at": "2023-01-01T15:00:00.000000000Z",
    "resolved_at": "2023-01-01T15:00:00.000000000Z",
    "resolved_by": {
    "id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
    "type": "workspace-member"
    },
    "content_plaintext": "Let's go ahead and close this deal, [email protected]."
    }
    }

    Delete a Comment

    Deletes a Comment by ID. If deleting a comment at the head of a thread, all messages in the thread are also deleted.

    Scopes

    • comment:read-writerequired

    Path params

    comment_idstring

    REQUIRED

    The ID of the Comment to delete.

    Format: UUID

    Response

    Status code

    Description



    Request

    DELETE
    /v2/comments/:comment_id
    curl https://api.attio.com/v2/comments/aa1dc1d9-93ac-4c6c-987e-16b6eea9aab2 \
    -H "Authorization: Bearer <token>" \
    -X DELETE

    Response

    200 - Success

    {}