---
updatedAt: 2026-09-09T18:47:20.000Z
agentTools:
  projectIndex: https://docs.pennsieve.io/llms.txt
---

# creates a new collection

Creates a new collection


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "version": "3.0",
    "title": "Collections API",
    "description": "This is the serverless collections api\n",
    "termsOfService": "https://docs.pennsieve.io/page/pennsieve-terms-of-use",
    "contact": {
      "name": "Pennsieve Support",
      "email": "support@pennsieve.net"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "servers": [
    {
      "url": "https://api2.pennsieve.io/collections",
      "description": "Production server"
    },
    {
      "url": "https://api2.pennsieve.net/collections",
      "description": "Development server"
    }
  ],
  "externalDocs": {
    "description": "Find more info here",
    "url": "https://docs.pennsieve.io"
  },
  "tags": [
    {
      "name": "Collections Service",
      "description": "Management of dataset collections",
      "externalDocs": {
        "url": "https://docs.pennsieve.io/reference"
      }
    }
  ],
  "paths": {
    "/": {
      "post": {
        "x-amazon-apigateway-integration": {
          "$ref": "#/components/x-amazon-apigateway-integrations/collections-service"
        },
        "operationId": "createCollection",
        "summary": "creates a new collection",
        "description": "Creates a new collection\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCollectionRequest"
              }
            }
          }
        },
        "security": [
          {
            "token_auth": []
          }
        ],
        "tags": [
          "Collections Service"
        ],
        "responses": {
          "201": {
            "description": "the collection was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "4XX": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "5XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "x-amazon-apigateway-integrations": {
      "collections-service": {
        "type": "aws_proxy",
        "uri": "${collections_service_lambda_arn}",
        "httpMethod": "POST",
        "passthroughBehavior": "when_no_match",
        "contentHandling": "CONVERT_TO_TEXT",
        "payloadFormatVersion": 2
      }
    },
    "securitySchemes": {
      "token_auth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-amazon-apigateway-authorizer": {
          "identitySource": "$request.header.Authorization",
          "authorizerUri": "${authorize_lambda_invoke_uri}",
          "authorizerPayloadFormatVersion": "2.0",
          "authorizerResultTtlInSeconds": 300,
          "type": "request",
          "enableSimpleResponses": true,
          "authorizerCredentials": "${gateway_authorizer_role}"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Incorrect authentication or user has incorrect permissions.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                },
                "errorId": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                },
                "errorId": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error": {
        "description": "Server Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                },
                "errorId": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "CreateCollectionRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dois": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "description",
          "dois"
        ]
      },
      "PublishedDataset": {
        "description": "information about the published status of a collection obtained from Discover",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "id of the published collection"
          },
          "version": {
            "type": "integer",
            "description": "the number of published versions (and if > 0, the version of the most recent publication)"
          },
          "lastPublishedDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "version"
        ]
      },
      "Publication": {
        "description": "information about the published status of a collection",
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "InProgress",
              "Completed",
              "Failed"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "Publication",
              "Revision",
              "Removal"
            ]
          },
          "publishedDataset": {
            "$ref": "#/components/schemas/PublishedDataset"
          }
        },
        "required": [
          "status"
        ]
      },
      "CollectionResponse": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "banners": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "size": {
            "type": "integer"
          },
          "userRole": {
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publication": {
            "$ref": "#/components/schemas/Publication"
          }
        },
        "required": [
          "nodeId",
          "name",
          "description",
          "banners",
          "size",
          "userRole",
          "license",
          "tags"
        ]
      }
    }
  }
}
```