---
title: "Service: /members/{member}/groups/{group}/uris/{uri}/documents [POST]"
source: https://dev.pageseeder.com/api/services/create-document-foruri-POST.html
description: "Create a PSML document under a folder"
last_updated: 2026-08-07T17:09:54+10:00
document_type: api_endpoint
operation_id: psml-POST
resource_id: psml
path_template: /members/{member}/groups/{group}/uris/{uri}/documents
http_method: POST
api_category: psml
implementation_version: null
api_since: null
deprecated_since: null
obsolete_since: null
api_support: supported
cache_control: N/A
generated_at: 2026-08-07
tokens: ~720
---

# /members/\{member\}/groups/\{group\}/uris/\{uri\}/documents \[POST\]

## Description

Create a new PSML [document](../../reference/glossary/document.md).

There are various ways of specifying the target destination:

- If the document config for the type specified has `<folder>` or `<filename>` defined, then these are used to compute the document path.
- Otherwise, the URI on the request or the following parameters are used: `name`.

## Parameters

| Name | Description | Required | Type | Default |
| --- | --- | --- | --- | --- |
| name | Name of file to create – without extension (required if filename not specified in document config) | maybe | string |  |
| description | Description of new document | no | string |  |
| docid | Document `ID` | no | string |  |
| labels | Comma-separated list of document label values | no | string |  |
| notification-content | Content of notification | no | string |  |
| notification-groups | Comma-separated list of group names to notify (optional, default to current group name) | no | string |  |
| notification-labels | Comma-separated list of label values for the note (if exists creates a note) | no | string |  |
| notification-subject | Subject of notification (default to document title or “Document Created”) | no | string |  |
| notify | Notification behavior | no | notification | `silent` |
| template.\* | `template.[name]` used as a param by the template to create the content | no | defined in template |  |
| title | Display title of new document | no | string |  |
| type | Type of new document | no | string | `default` |

## Permission

This service requires contributor or higher.

## Response

The XML output follows this format:

```lang-xml

<document-creation [renamed="true"
                    original-name="new:document.psml"]>
  <uri id="138614"
       scheme="https"
       host="localhost"
       port="443"
       path="/ps/jb/group1/documents/new_document.psml"
       decodedpath="/ps/jb/group1/documents/new_document.psml"
       external="false"
       mediatype="application/vnd.pageseeder.psml+xml"
       created="2013-12-19T15:14:54+11:00">
    <displaytitle>New document</displaytitle>
  </uri>
</document-creation> 
```

## Error Handling

| Code | Cause / Description |
| --- | --- |
| 0x0000 | The name is required |
| 0x120A | Invalid Document ID |
| 0x1201 | Illegal character in filename |
| 0x1209 | Existing Document ID |
| 0x1211 | Existing URI |
| 0x1216 | Invalid destination |
| 0x1217 | Two contradictory parameters have been specified (url and name or url and parenturl or url and parentfolder or parenturl and parentfolder) |
| 0x201B | Unable to create XRefs |
| 0x0204 | The Member was not found |
| 0x1222 | Invalid Publication ID |
| 0x1223 | Invalid Publication Type |
| 0x1231 | Publication ID is already being used |
| 0x6202 | Invalid PSML document configuration |

