> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Create an RNA Oligo

POST https://{tenant_name}.benchling.com/api/v2/rna-oligos
Content-Type: application/json

Create an RNA Oligo

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/rna-oligos/create-rna-oligo

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects a RnaOligoCreate.

- `name` (string, required) — Name of the Oligo.
- `aliases` (list of string, optional) — Aliases to add to the Oligo
- `authorIds` (list of string, optional) — IDs of users to set as the Oligo's authors.
- `bases` (string, optional) — Base pairs of the oligo.
- `customFields` (map from string to CustomField, optional) — Custom fields to add to the Oligo. Every field should have its name as a key, mapping to an object with information about the value of the field.
- `fields` (map from string to Field, optional) — Fields to set on the Oligo. Must correspond with the schema's field definitions. Every field should have its name as a key, mapping to an object with information about the value of the field.
- `folderId` (string, optional) — ID of the folder containing the entity. Can be left empty when registryId is present.
- `schemaId` (string, optional) — ID of the oligo's schema.
- `entityRegistryId` (string, optional) — Entity registry ID to set for the registered entity. Cannot specify both entityRegistryId and namingStrategy at the same time.
- `namingStrategy` (enum, optional) — Specifies the behavior for automatically generated names when registering an entity. - NEW_IDS: Generate new registry IDs - IDS_FROM_NAMES: Generate registry IDs based on entity names - DELETE_NAMES: Generate new registry IDs and replace name with registry ID - SET_FROM_NAME_PARTS: Generate new registry IDs, rename according to name template, and keep old name as alias - REPLACE_NAMES_FROM_PARTS: Generate new registry IDs, and replace name according to name template - KEEP_NAMES: Keep existing entity names as registry IDs - REPLACE_ID_AND_NAME_FROM_PARTS: Generate registry IDs and names according to name template
  - Allowed values: `NEW_IDS`, `IDS_FROM_NAMES`, `DELETE_NAMES`, `SET_FROM_NAME_PARTS`, `REPLACE_NAMES_FROM_PARTS`, `KEEP_NAMES`, `REPLACE_ID_AND_NAME_FROM_PARTS`
- `registryId` (string, optional) — Registry ID into which entity should be registered. this is the ID of the registry which was configured for a particular organization To get available registryIds, use the [/registries endpoint](#/Registry/listRegistries) Required in order for entities to be created directly in the registry.
- `annotations` (list of RnaAnnotation, optional) — Annotations on the Oligo.
- `helm` (string, optional) — Representation of the oligo in HELM syntax, including any chemical modifications
- `customNotation` (string, optional) — Representation of the sequence or oligo in the custom notation specified by customNotationId
- `customNotationId` (string, optional) — ID of the notation used to interpret the string provided in the customNotation field

## Response

### 201

Created

- `RnaOligo`

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

### 503 Service Unavailable Error

Deprecated, a 429 is returned for too many requests

- `any`

## Types

### CustomField

- `value` (string, optional)

### Field

- `value` (FieldValue, required, nullable) — For single link fields, use the id of the item you want to link (eg. "seq_jdf8BV24"). For multi-link fields, use an array of ids of the items you want to link (eg. ["seq_jdf8BV24"])
- `displayValue` (string, optional, nullable)
- `isMulti` (boolean, optional)
- `textValue` (string, optional, nullable)
- `type` (enum, optional)
  - Allowed values: `dna_sequence_link`, `aa_sequence_link`, `custom_entity_link`, `entity_link`, `mixture_link`, `molecule_link`, `dropdown`, `part_link`, `translation_link`, `aa_part_link`, `base_molecule_link`, `blob_link`, `text`, `long_text`, `batch_link`, `storage_link`, `entry_link`, `assay_request_link`, `assay_result_link`, `assay_run_link`, `boolean`, `float`, `integer`, `datetime`, `date`, `json`

### RnaAnnotation

- `color` (string, optional) — Hex color code used when displaying this feature in the UI.
- `customFields` (list of SequenceFeatureCustomField, optional)
- `name` (string, optional)
- `notes` (string, optional)
- `end` (integer, optional) — 0-based exclusive end index. The end of the sequence is always represented as 0.
- `start` (integer, optional) — 0-based inclusive start index.
- `strand` (integer, optional)
- `type` (string, optional)

### BadRequestErrorError

- `message` (string, optional)
- `type` (enum, optional)
  - Allowed values: `invalid_request_error`
- `userMessage` (string, optional)

### FieldValue

For single link fields, use the id of the item you want to link (eg. "seq_jdf8BV24"). For multi-link fields, use an array of ids of the items you want to link (eg. ["seq_jdf8BV24"])

### SequenceFeatureCustomField

A name and value pair associated with a sequence feature (annotation or translation). For genbank imports, these are the qualifiers associated with each feature.

- `name` (string, optional) — Name of the custom field
- `value` (string, optional) — Value of the custom field

## Examples

**Request**

```json
{
  "name": "string"
}
```

**Response**

```json
{
  "aliases": [
    "string"
  ],
  "annotations": [
    {
      "color": "#F58A5E",
      "customFields": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "end": 1,
      "name": "string",
      "notes": "Cong et al Science. 2013 Jan 3.",
      "start": 1,
      "strand": 1,
      "type": "string"
    }
  ],
  "apiURL": "https://benchling.com/api/v2/rna-oligos/seq_bhuDUw9D",
  "archiveRecord": {
    "reason": "Made in error"
  },
  "authors": [
    {
      "handle": "string",
      "id": "string",
      "name": "string"
    }
  ],
  "bases": "ACUUUUU",
  "createdAt": "2024-01-15T09:30:00Z",
  "creator": {
    "handle": "string",
    "id": "string",
    "name": "string"
  },
  "customFields": {},
  "customNotation": "string",
  "customNotationName": "string",
  "entityRegistryId": "string",
  "fields": {},
  "folderId": "string",
  "helm": "RNA1{r(A)p.r(C)[Ssp].r(U)p.r(U)p.r(U)p.r(U)p.r(U)p}$$$$V2.0",
  "id": "seq_bhuDUw9D",
  "length": 1,
  "modifiedAt": "2024-01-15T09:30:00Z",
  "name": "string",
  "nucleotideType": "RNA",
  "registrationOrigin": {
    "originEntryId": "string",
    "registeredAt": "2024-01-15T09:30:00Z"
  },
  "registryId": "string",
  "schema": {
    "id": "string",
    "name": "string"
  },
  "webURL": "https://benchling.com/benchling/f/lib_hBHqKbzE-oligos/seq_bhuDUw9D-test-oligo-abc/edit"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/rna-oligos"

payload = { "name": "string" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/rna-oligos';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```