v1

latestSwagger 2.0Apache 2.02026-07-1334102.9 MB
Nodes

Create a contributor

Adds a contributor to a node, effectively creating a relationship between the node and a user.

Contributors are users who can make changes to the node or, in the case of private nodes, have read access to the node.

Contributors are categorized as either "bibliographic" or "non-bibliographic" contributors. From a permissions standpoint, both are the same, but bibliographic contributors are included in citations and are listed on the project overview page on the OSF, while non-bibliographic contributors are not.

Permissions

Only project administrators can add contributors to a node.

Required

A relationship object with a data key, containing the users type and valid user ID is required.

All attributes describing the relationship between the node and the user are optional.

Returns

Returns a JSON object with a data key containing the representation of the new contributor, if the request is successful.

If the request is unsuccessful, an errors key containing information about the failure will be returned. Refer to the list of error codes to understand why this request may have failed.

post/nodes/{node_id}/contributors/

Path parameters

node_idstring required

The unique identifier of the node.

Request body

idstring

The identifier of the contributor entity. Contributor identifiers have the form {node_id}-{user_id}.

typestring required

The type identifier of the contributor entity (contributors).

Example request

{
  "data": {
    "type": "contributors",
    "attributes": {},
    "relationships": {
      "user": {
        "data": {
          "type": "users",
          "id": "guid0"
        }
      }
    }
  }
}

Response

Success