Add note​
Add a new note.
Query Parameters
The timestamp of the last mutation that was applied on the server. Required for any data modification operation to ensure concurrency control.
Request Body
Possible values: >= 6 characters and <= 10000 characters
The main content of the note, must be between the specified minimum and maximum length.
Indicates whether the note should be saved to the QuranReflect.
attachedEntity object
The unique identifier for the attached entity.
Possible values: [reflection]
The type of the attached entity, must be one of the predefined NoteEntityType values.
entityMetadata object
Additional metadata for the attached entity.
Possible values: Value must match regular expression ^(\d+):(\d+)-(\d+):(\d+)$
An array of verse ranges associated with the note.
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 429
- 500
- 502
- 503
- 504
Request has been handled successfully.
Response Headers
X-Mutation-At string
Unix timestamp (milliseconds) of the latest mutation for the user. Clients should store this value and include it in subsequent mutation requests for optimistic concurrency control.
Schema
- Array [
- ]
data object
The unique identifier of the note.
The creation date of the note.
The last update date of the note.
Possible values: >= 6 characters and <= 10000 characters
The main content of the note, must be between the specified minimum and maximum length.
The source of the note.
attachedEntities object[]
An array of attached entities associated with the note.
The unique identifier for the attached entity.
Possible values: [reflection]
The type of the attached entity, must be one of the predefined NoteEntityType values.
entityMetadata object
Additional metadata for the attached entity.
Possible values: Value must match regular expression ^(\d+):(\d+)-(\d+):(\d+)$
An array of verse ranges associated with the note.
{
"success": true,
"data": {
"id": "asdasdqwe1231",
"createdAt": "2023-01-21T07:28:13.023Z",
"updatedAt": "2023-01-22T07:28:13.023Z",
"body": "This is a sample note body.",
"source": "we23412312weq",
"attachedEntities": [
{
"entityId": "entity123",
"entityType": "reflection",
"entityMetadata": {
"key": "value"
}
}
],
"ranges": [
"2:255-2:257"
]
}
}
The request is missing required parameters or is invalid.
Schema
{
"message": "The request is missing required headers or is invalid",
"type": "invalid_request",
"success": false
}
The request is unauthorized.
Schema
{
"message": "The request requires user authentication",
"type": "unauthorized",
"success": false
}
Forbidden error. Can either be due to access token not being passed, having been expired or the caller trying to access a resource without enough permissions.
Schema
{
"message": "The server understood the request, but refuses to authorize it",
"type": "forbidden",
"success": false
}
Not Found. The resource being accessed does not exist.
Schema
{
"message": "The requested resource could not be found",
"type": "not_found",
"success": false
}
Out of Sync Error. The client lastMutationAt does not match server state. Client must re-sync data before retrying this operation.
Schema
error object
{
"success": false,
"error": {
"code": "OutOfSyncError",
"message": "Invalid lastMutationAt, please re-sync your data and try again."
}
}
{
"success": false,
"error": {
"code": "OutOfSyncError",
"message": "Invalid lastMutationAt, please re-sync your data and try again."
}
}
{
"success": false,
"error": {
"code": "OutOfSyncError",
"message": "First sync detected. Please use lastMutationAt=-1 for initial sync."
}
}
Validation Error. The request includes one or more invalid params. Please check the request params and try again.
Schema
{
"message": "The request was well-formed but was unable to be followed due to semantic errors",
"type": "unprocessable_entity",
"success": false
}
Too many requests, please try again later.
Schema
{
"message": "Too many requests, please try again later",
"type": "rate_limit_exceeded",
"success": false
}
Server Error. Something went wrong, try again later.
Schema
{
"message": "The server encountered an internal error and was unable to complete your request",
"type": "internal_server_error",
"success": false
}
Invalid response from the upstream server
Schema
{
"message": "The server was acting as a gateway or proxy and received an invalid response from the upstream server",
"type": "bad_gateway",
"success": false
}
The server is currently unable to handle the request due to a temporary overload or scheduled maintenance
Schema
{
"message": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance",
"type": "service_unavailable",
"success": false
}
The server did not receive a timely response from the upstream server.
Schema
{
"message": "The server was acting as a gateway or proxy and did not receive a timely response from the upstream server",
"type": "gateway_timeout",
"success": false
}