Notifications API
HTTP reference for notifications. Read authentication and access before using these operations. All examples use made-up data and placeholder credentials.
GET /v1/farm/{farm_id}/notifications
Get Notifications
Current notifications HTTP operation. External credential scopes: read:records. Minimum farm role: READER. Pagination accepts integer skip and take; set both explicitly. An omitted value passes through to the data query. Collection property names differ by resource; use the response schema. Production rate limit: 100 requests per 15-minute window, per legacy key, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429.
| Parameter | In | Required | Schema |
|---|---|---|---|
| farm_id | path | Yes | {"type":"string","format":"uuid"} |
| skip | query | No | {"type":"integer"} |
| take | query | No | {"type":"integer"} |
| status | query | No | {"type":"string","enum":["FAILED","PENDING","SENT"]} |
Request example
curl --fail-with-body -X GET \
'https://api.ranch.bot/v1/farm/<farm_id>/notifications' \
-H "Authorization: Bearer $RANCHBOT_TOKEN"Responses
| Status | Meaning | Content type |
|---|---|---|
| 200 | Success | application/json |
| 400 | Request validation failed. | application/json |
| 401 | Missing/invalid authentication or insufficient farm role. | application/json |
| 403 | Missing required scope or credential type is disallowed. | application/json |
| 404 | Resource or active farm membership not found. | application/json |
| 429 | Rate limit exceeded. Retry after the indicated delay. | application/json |
| 500 | Unexpected server failure. | application/json |
200 response schema (application/json)
| Field | Type | Presence | Constraints |
|---|---|---|---|
| notifications | array | Required | |
| notifications[] | object | Required | |
| notifications[].status | string | Required | enum: ["FAILED","PENDING","SENT"] |
| notifications[].type | string | Required | enum: ["EMAIL","IN_APP","SMS"] |
| notifications[].id | string | Required | |
| notifications[].created_at | string | Required | format: "date-time" |
| notifications[].updated_at | string | Required | format: "date-time" |
| notifications[].user_id | string | Required | |
| notifications[].farm_id | string | Required | |
| notifications[].error_message (variant 1) | null | Required | |
| notifications[].error_message (variant 2) | string | Required | |
| notifications[].scheduled_event_id | string | Required | |
| notifications[].sent_at (variant 1) | null | Required | |
| notifications[].sent_at (variant 2) | string | Required | format: "date-time" |
| total | number | Required |
{
"notifications": [],
"total": 1
}Error body
Validation and authentication errors generally use this envelope. Rate-limit errors omit data; OAuth polling also has protocol-specific errors shown in its reference.
{
"success": false,
"errors": [
{
"code": 400,
"name": "ValidationError",
"message": "Example validation failure"
}
]
}