Comment on an expiry

Preview
posthttps://api.expiryedge.com/v2/expiries/{id}/comments
any member of the expiry's organization60/minIdempotency-Key
Request
curl -X POST 'https://api.expiryedge.com/v2/expiries/exp_4Tq9sLm2/comments' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "text": "Board confirmed the renewal fee."
}'
Response
{
  "id": "cm_9Qa1",
  "expiryId": "exp_4Tq9sLm2",
  "organization_id": "org_northwind",
  "text": "Board confirmed the renewal fee.",
  "userId": "u_71bXq",
  "username": "Priya Shah",
  "userEmail": "priya.shah@northwinddental.example",
  "source": "api",
  "timestamp": "2026-09-27T14:20:00.000Z"
}

Plain text (max 5000 characters); stored HTML-escaped with newlines as <br>, like the app. Returns 201 with the comment and Location: /v2/comments/{commentId}.

Path parameters

  • idstringrequired

Headers

  • Idempotency-Keystring
    Optional client-generated key (1-255 characters of letters, digits, - _ : .).
    pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body parameters

application/json
  • textstringrequired
    Plain text.
    max length: 5000

Returns

201
Created.
  • idstring
  • expiryIdstring
  • organization_idstring
    Missing on older comments.
  • textstring
    HTML-escaped, newlines as <br>.
  • userIdstring
  • usernamestring
  • userEmailstring
  • editedboolean
  • sourcestring
    api for comments made through the API.
  • timestampstring
    UTC timestamp, ISO 8601. Every v1 response uses this form, never a raw Firestore Timestamp ({_seconds, _nanoseconds}).
    format: date-time

Errors

400
Invalid parameters or body (VALIDATION_FAILED; details names the fields).
401
Missing, invalid or expired token (UNAUTHORIZED).
403
Your role can't do this, or your account has no organization (FORBIDDEN).
404
No such record in your organization (records in other organizations are also 404).
405
Wrong HTTP method for this path; the Allow header lists the valid ones.
409
State or uniqueness conflict: EMAIL_EXISTS (contacts), GROUP_EXISTS (contact groups), CONFLICT (folder name taken), FOLDER_NOT_EMPTY, CLIENT_HAS_PROJECTS, TOO_MANY_ATTACHMENTS, INVALID_STATE (collection request cancel/resend), or IDEMPOTENCY_IN_PROGRESS (same Idempotency-Key still running; see Retry-After).
422
The Idempotency-Key was already used with a different body (IDEMPOTENCY_KEY_REUSED).
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.