CommentKeyword API Reference

Endpoint-level reference for Personal Access Token (PAT) integrations.

Authentication

All requests require:

Authorization: Bearer YOUR_TOKEN

Tokens are workspace-scoped and do not expire automatically.

Base URL

https://commentkeyword.com/api

Permissions

  • keywords:read
  • keywords:write
  • keywords:delete
  • agents:read (optional; keywords:read can also read agents)

Public IDs

PAT responses expose public IDs (UUID-like strings) for keywords and agents. Use these IDs in API paths and payloads.

{
  "id": "5f9619c5-daa7-4f2f-ad6f-971f71f8d7f2",
  "aiAgentId": "a6be1900-8f4f-4ae6-8f4e-48f8b28f0f17"
}

GET /api/agents

Required permission: agents:read or keywords:read.

Parameters

FieldTypeRequiredAccepted ValuesNotes
(none)-No-No path, query, or body parameters.
curl -H "Authorization: Bearer YOUR_TOKEN" https://commentkeyword.com/api/agents

GET /api/keywords

Required permission: keywords:read.

Query Parameters

FieldTypeRequiredAccepted ValuesNotes
searchstringNoany textCase-insensitive keyword search.
statusstringNoactive | inactiveFilters by keyword activation state.
limitintegerNo1..100Default 50.
offsetintegerNo>= 0Default 0.
curl -H "Authorization: Bearer YOUR_TOKEN" "https://commentkeyword.com/api/keywords?status=active&limit=20&offset=0"

POST /api/keywords

Required permission: keywords:write.

Request Body

FieldTypeRequiredAccepted ValuesNotes
keywordstringYesnon-emptyMax 255 chars (database constraint).
matchModestringNoexact | containsDefault exact.
scopestringNoglobal | post_specificDefault global.
commentRepliesstring[]Noarray of stringsDefault [].
dmMessagesstring[]Noarray of stringsDefault [].
delaySecintegerNo1..60Default 30.
aiAgentIdstring | nullNoagent public ID UUID string or nullIf set, must refer to a Live agent in the same workspace.
mediaIdsstring[]Conditionalarray of non-empty stringsRequired when scope is post_specific.
curl -X POST https://commentkeyword.com/api/keywords \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "keyword": "pricing",
    "matchMode": "contains",
    "scope": "global",
    "commentReplies": ["I sent details in DM"],
    "dmMessages": ["Here are pricing details"],
    "delaySec": 20,
    "aiAgentId": "a6be1900-8f4f-4ae6-8f4e-48f8b28f0f17"
  }'

GET /api/keywords/{id}

Required permission: keywords:read.

Path Parameters

FieldTypeRequiredAccepted ValuesNotes
idstringYeskeyword public ID UUID stringUse keyword public ID.
curl -H "Authorization: Bearer YOUR_TOKEN" https://commentkeyword.com/api/keywords/5f9619c5-daa7-4f2f-ad6f-971f71f8d7f2

PATCH /api/keywords/{id}

Required permission: keywords:write.

Partial update: only provided fields are changed.

Path Parameters

FieldTypeRequiredAccepted ValuesNotes
idstringYeskeyword public ID UUID string-

Request Body

FieldTypeRequiredAccepted ValuesNotes
keywordstringNonon-emptyMax 255 chars.
matchModestringNoexact | contains-
scopestringNoglobal | post_specific-
commentRepliesstring[]Noarray of strings-
dmMessagesstring[]Noarray of strings-
delaySecintegerNo1..60-
isActivebooleanNotrue | false-
aiAgentIdstring | nullNoagent public ID UUID string or nullIf set, must refer to a Live agent in the same workspace.
mediaIdsstring[]Conditionalarray of non-empty stringsRequired when resulting scope is post_specific.
curl -X PATCH https://commentkeyword.com/api/keywords/5f9619c5-daa7-4f2f-ad6f-971f71f8d7f2 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"isActive": false}'

DELETE /api/keywords/{id}

Required permission: keywords:delete.

Path Parameters

FieldTypeRequiredAccepted ValuesNotes
idstringYeskeyword public ID UUID string-
curl -X DELETE -H "Authorization: Bearer YOUR_TOKEN" https://commentkeyword.com/api/keywords/5f9619c5-daa7-4f2f-ad6f-971f71f8d7f2

Error Format

{
  "error": "Bad Request",
  "message": "delaySec must be a number between 1 and 60"
}

Common status codes: 200, 201, 400, 401, 403, 404, 409, 500.