Comments

GET /v2/projects/:project_id/keys/:key_id/comments

List all comments for a key.

This endpoint is paginated.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/keys/:key_id/comments" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp comments list <project_id> <key_id>

Response

Status: 200
[ { "id": "abcd1234cdef1234abcd1234cdef1234", "message": "Some message...", "user": { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" }, "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1234", "message": "Some message...", "user": { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" }, "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ]

GET /v2/projects/:project_id/keys/:key_id/comments/:id

Get details on a single comment.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/keys/:key_id/comments/:id" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp comment show <project_id> <key_id> <id>

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "message": "Some message...", "user": { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" }, "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

POST /v2/projects/:project_id/keys/:key_id/comments

Create a new comment for a key.

Parameters

Name Type Description
message string Comment message

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/keys/:key_id/comments" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"message":"Some message..."}' \
  -H 'Content-Type: application/json'
phraseapp comment create <project_id> <key_id> \
--message "Some message..."

Response

Status: 201
{ "id": "abcd1234cdef1234abcd1234cdef1234", "message": "Some message...", "user": { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" }, "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

PATCH /v2/projects/:project_id/keys/:key_id/comments/:id

Update an existing comment.

Parameters

Name Type Description
message string Comment message

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/keys/:key_id/comments/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"message":"Some message..."}' \
  -H 'Content-Type: application/json'
phraseapp comment update <project_id> <key_id> <id> \
--message "Some message..."

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "message": "Some message...", "user": { "id": "abcd1234cdef1234abcd1234cdef1234", "username": "joe.doe", "name": "Joe Doe" }, "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }

DELETE /v2/projects/:project_id/keys/:key_id/comments/:id

Delete an existing comment.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/keys/:key_id/comments/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X DELETE
phraseapp comment delete <project_id> <key_id> <id>

Response

Status: 204

PATCH /v2/projects/:project_id/keys/:key_id/comments/:id/read

Mark a comment as read.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/keys/:key_id/comments/:id/read" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH
phraseapp comment mark read <project_id> <key_id> <id>

Response

Status: 204

DELETE /v2/projects/:project_id/keys/:key_id/comments/:id/read

Mark a comment as unread.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/keys/:key_id/comments/:id/read" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X DELETE
phraseapp comment mark unread <project_id> <key_id> <id>

Response

Status: 204

GET /v2/projects/:project_id/keys/:key_id/comments/:id/read

Check if comment was marked as read. Returns 204 if read, 404 if unread.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/keys/:key_id/comments/:id/read" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp comment mark check <project_id> <key_id> <id>

Response

Status: 204