v1

latestSwagger 2.0Apache 2.02026-07-1334102.9 MB
Actions

Create a Preprint Request Action

Create a new action on a Preprint Request. Preprint Request Actions record transitions and comments during moderation workflows on preprint-related requests, such as access changes or withdrawal approvals.

Available Triggers

Supported trigger values:

  • submit: Submit or re-submit the request for review.
  • accept: Approve the request (e.g., accept withdrawal).
  • reject: Reject the request.
  • edit_comment: Add or update a comment without affecting state.

Permissions

  • submit: Allowed for users with write access on the preprint.
  • accept, reject, edit_comment: Require admin privileges or moderator rights via provider.

Returns

On success, returns 201 Created with a full representation of the new action.

Errors

  • 400 Bad Request: Malformed or missing fields in the request body.
  • 403 Forbidden: Action not permitted for the current user.
  • 409 Conflict: Invalid transition for the request's current state.

For full error handling, see Errors and Error Codes.

post/actions/requests/preprints/

Request body

Example request

{
  "data": {
    "type": "preprint-request-actions",
    "attributes": {
      "trigger": "accept",
      "comment": "Approving the preprint withdrawal request."
    },
    "relationships": {
      "target": {
        "data": {
          "type": "preprint-requests",
          "id": "preprintReq123"
        }
      }
    }
  }
}

Response

Preprint Request Action successfully created.

idstring required

A unique identifier representing the action.

type'review-actions' | 'node-request-actions' | 'preprint-request-actions' | 'registration-actions' | 'schema-response-actions' | 'collection-submission-actions' required

Specifies the resource type of the action, indicating the workflow it belongs to.

Example response

{
  "id": "abc123",
  "type": "review-actions",
  "attributes": {
    "trigger": "accept",
    "comment": "Approved after careful consideration.",
    "from_state": "pending",
    "to_state": "accepted",
    "date_created": "2024-01-01T00:00:00Z",
    "date_modified": "2024-01-01T01:00:00Z",
    "visible": true
  },
  "relationships": {
    "creator": {
      "links": {
        "related": {
          "href": "https://api.osf.io/v2/users/user456/",
          "meta": {}
        }
      },
      "data": {
        "id": "user456",
        "type": "users"
      }
    },
    "target": {
      "links": {
        "related": {
          "href": "https://api.osf.io/v2/preprints/preprint789/",
          "meta": {}
        }
      },
      "data": {
        "id": "preprint789",
        "type": "preprints"
      }
    },
    "provider": {
      "links": {
        "related": {
          "href": "https://api.osf.io/v2/providers/preprints/osf/",
          "meta": {}
        }
      },
      "data": {
        "id": "osf",
        "type": "preprint-providers"
      }
    }
  },
  "links": {
    "self": "https://api.osf.io/v2/actions/abc123/"
  }
}