Skip to content

B2INST v3 (Invenio-RDM 13) API Submission Guide#

Overview#

This guide explains how to publish instrument metadata, upload files, and submit a record to a community through the B2INST v3 API.

To use the API, you first need to generate an API token:

Profile > Applications > Personal access tokens

Use this token as your in all requests.


STEP 1: Create a draft record (publish metadata)#

This creates a draft record. You will publish it later.

curl -X POST "https://141.5.103.19/api/records" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -d '{
    "access": {"record": "public", "files": "public"},
    "metadata": {
      "Name": "Alpine Weather Station AWS-42",
      "Identifier": {
        "identifierType": "Handle",
        "identifierValue": "21.T11975/aws-42"
      },
      "SchemaVersion": "1.0",
      "Description": "Automatic weather station used for long-term alpine climate monitoring.",
      "InstrumentType": [
        {"instrumentTypeName": "Weather station"}
      ],
      "Manufacturer": [
        {
          "manufacturerName": "Acme Instruments",
          "manufacturerIdentifier": {
            "manufacturerIdentifierType": "URL",
            "manufacturerIdentifierValue": "https://acme.example.com"
          }
        }
      ],
      "Owner": [
        {
          "ownerName": "Arctic Research Institute",
          "ownerContact": "instruments@example.org"
        }
      ],
      "Model": {
        "modelName": "AWS-42",
        "modelIdentifier": {
          "modelIdentifierType": "SerialNumber",
          "modelIdentifierValue": "SN-0042"
        }
      },
      "MeasuredVariable": [
        "Air temperature",
        "Wind speed"
      ],
      "LandingPage": "https://instruments.example.org/aws-42",
      "AlternateIdentifier": [
        {
          "alternateIdentifierType": "InventoryNumber",
          "alternateIdentifierValue": "INV-2025-0042"
        }
      ],
      "RelatedIdentifier": [
        {
          "relatedIdentifierType": "URL",
          "relatedIdentifierValue": "https://doi.org/10.1234/example.manual",
          "relationType": "IsDescribedBy",
          "relatedIdentifierName": "User manual"
        }
      ]
    },
    "files": {"enabled": true}
  }'

The response will return a Record ID. Use this value in all following steps:

$RID = <record_id>

STEP 2: Add file metadata#

Add the list of file entries you plan to upload.

Single file:

curl -X POST "https://141.5.103.19/api/records/$RID/draft/files" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '[{"key": "article.pdf"}]'

Multiple files:

curl -X POST "https://141.5.103.19/api/records/$RID/draft/files" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '[
        {"key": "figure.png"},
        {"key": "article.pdf"},
        {"key": "data.zip"}
      ]'

STEP 3: Upload file content#

Repeat this step for each file.

curl -X PUT "https://141.5.103.19/api/records/$RID/draft/files/article.pdf/content" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/octet-stream" \
  --upload-file <file_path>/article.pdf

STEP 4: Commit the uploaded file#

Repeat this step for each file.

curl -X POST "https://141.5.103.19/api/records/$RID/draft/files/article.pdf/commit" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

STEP 5: Create a request to submit to a community#

In order to submit to a community, you need to first get the community id.

The community id can be found quering the https://141.5.103.19/api/communities/ endpoint.

Example: https://141.5.103.19/api/communities/eudat

Then you can create a review request associated with your draft record.

curl -X PUT "https://141.5.103.19/api/records/$RID/draft/review" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -d '{
    "receiver": {
      "community": "<community_id>"
    },
    "type": "community-submission"
  }'

The response includes a section like:

"links": {
  "actions": {
    "submit": "https://141.5.103.19/api/requests/<request_id>/actions/submit"
  }
}

Copy the value of the submit link.


STEP 6: Submit the record to the community#

Use the submit URL obtained from the previous response:

response_link = response.links.actions.submit

Example:

https://141.5.103.19/api/requests/<request_id>/actions/submit

Submit the request:

curl -X POST "<response_link>" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

After this step: - If the community allows direct publication, the submission is accepted immediately. - If the community requires review, the request will stay pending until a curator accepts it.

Last update : 02.02.2026

Last review : 02.02.2026