> This page is for RakeSign.

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

# Post documents by ID upload

POST https://api.cloudraker.com/v1/signing/documents/{id}/upload
Content-Type: multipart/form-data

Uses the same resource permissions and lifecycle as the RakeSign application. Integration access is limited to its shared team. Required scopes: documents:write.

Reference: https://docs.cloudraker.com/rakesign/api/rake-sign/signing-post-documents-by-id-upload

## Authentication

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

## Request

### Path parameters

- `id` (string, required)

### Body (multipart/form-data)

This endpoint expects a multipart form containing a file.

- `file` (file, required)
- `version` (integer, optional)

## Response

### 200

Authorized signing resource.

- `id` (string, required)
- `title` (string, required)
- `teamId` (string, required, nullable)
- `ownerId` (string, required)
- `privacy` (enum, required)
  - Allowed values: `team`, `participants`
- `status` (enum, required)
  - Allowed values: `draft`, `waiting`, `completed`, `cancelled`, `declined`, `expired`, `failed`
- `message` (string, required)
- `placement` (enum, required)
  - Allowed values: `page`, `tags`, `fields`
- `stages` (list of RakeSignDocumentStagesItems, required)
- `fields` (list of RakeSignDocumentFieldsItems, required)
- `createdAt` (string, required)
- `updatedAt` (string, required)
- `version` (integer, required)
- `activity` (list of RakeSignDocumentActivityItems, required)
- `source` (enum, optional)
  - Allowed values: `app`, `api`, `paperwork`
- `integrationId` (string, optional)
- `integrationName` (string, optional)
- `signingMode` (enum, optional)
  - Allowed values: `manual`, `delegated`
- `delegation` (RakeSignDocumentDelegation, optional, nullable)
- `templateOrigin` (RakeSignDocumentTemplateOrigin, optional)
- `attachments` (list of RakeSignDocumentAttachmentsItems, optional)
- `pageCount` (integer, optional)
- `pages` (list of RakeSignDocumentPagesItems, optional)
- `preparationReviewed` (boolean, optional)
- `contentNeedsRender` (boolean, optional)
- `cc` (list of RakeSignDocumentCcItems, optional)
- `language` (enum, optional)
  - Allowed values: `en`, `fr`
- `expiresInDays` (double, optional)
- `expiresAt` (string, optional)
- `reminders` (RakeSignDocumentReminders, optional)
- `allowReassignment` (boolean, optional)
- `branding` (RakeSignDocumentBranding, optional, nullable)
- `variables` (map from string to Schema0, optional)
- `brandingId` (string, optional, nullable)
- `purpose` ("template", optional)
- `generation` (map from string to Schema0, optional)
- `extraction` (map from string to Schema0, optional)
- `postSign` (map from string to Schema0, optional)
- `fileName` (string, optional)
- `fileId` (string, optional)
- `generatedText` (string, optional)
- `runId` (string, optional)
- `error` (string, optional)
- `sending` (boolean, optional) — A send is underway or was interrupted. Edits answer 409 until it ends; POST /send again to finish it.
- `errorCode` (enum, optional) — Set on a failed document when the plan limit of open signing requests stopped the send.
  - Allowed values: `concurrent_envelope_limit`
- `limit` (integer, optional) — With `errorCode`: the open signing request limit of the plan.
- `sentAt` (string, optional)
- `completedAt` (string, optional)

## Errors

### 400 Bad Request Error

The request could not complete.

- `code` (string, required)
- `message` (string, required)
- `retryable` (boolean, required)
- `requestId` (string, required)
- `docUrl` (string, optional)

### 401 Unauthorized Error

The request could not complete.

- `code` (string, required)
- `message` (string, required)
- `retryable` (boolean, required)
- `requestId` (string, required)
- `docUrl` (string, optional)

### 403 Forbidden Error

The request could not complete.

- `code` (string, required)
- `message` (string, required)
- `retryable` (boolean, required)
- `requestId` (string, required)
- `docUrl` (string, optional)

### 404 Not Found Error

The request could not complete.

- `code` (string, required)
- `message` (string, required)
- `retryable` (boolean, required)
- `requestId` (string, required)
- `docUrl` (string, optional)

### 409 Conflict Error

The request could not complete.

- `code` (string, required)
- `message` (string, required)
- `retryable` (boolean, required)
- `requestId` (string, required)
- `docUrl` (string, optional)

### 429 Too Many Requests Error

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

- `code` (enum, required)
  - Allowed values: `rate_limited`
- `message` (string, required)
- `retryable` (boolean, required)
- `requestId` (string, required)
- `docUrl` (string, optional)

### 503 Service Unavailable Error

The request could not complete.

- `code` (string, required)
- `message` (string, required)
- `retryable` (boolean, required)
- `requestId` (string, required)
- `docUrl` (string, optional)

## Types

### RakeSignDocumentStagesItems

- `id` (string, required)
- `mode` (enum, required)
  - Allowed values: `all`, `any`
- `recipients` (list of RakeSignDocumentStagesItemsRecipientsItems, required)
- `role` (enum, optional)
  - Allowed values: `signer`, `approver`
- `delayHours` (double, optional)
- `condition` (map from string to Schema0, optional)
- `skipped` (boolean, optional)

### RakeSignDocumentFieldsItems

- `id` (string, required)
- `kind` (enum, required)
  - Allowed values: `signature`, `initials`, `date`, `text`, `checkbox`, `dropdown`, `dateInput`, `name`, `email`
- `slot` (integer, required)
- `page` (integer, required)
- `x` (double, required)
- `y` (double, required)
- `width` (double, required)
- `height` (double, required)
- `label` (string, optional)
- `required` (boolean, optional)
- `options` (list of string, optional)
- `maxLength` (integer, optional)
- `defaultValue` (RakeSignDocumentFieldsItemsDefaultValue, optional)
- `attachmentId` (string, optional)
- `localPage` (integer, optional)

### RakeSignDocumentActivityItems

- `id` (string, required)
- `at` (string, required)
- `text` (string, required)

### RakeSignDocumentDelegation

- `templateId` (string, required)
- `templateVersion` (integer, required)

### RakeSignDocumentTemplateOrigin

- `templateId` (string, required)
- `templateVersion` (integer, required)
- `templateName` (string, required)

### RakeSignDocumentAttachmentsItems

- `id` (string, required)
- `fileId` (string, required)
- `name` (string, required)
- `mimeType` (string, required)
- `pageCount` (integer, required)
- `startPage` (integer, required)
- `sha256` (string, optional)
- `renditionSha256` (string, optional)

### RakeSignDocumentPagesItems

- `width` (double, required)
- `height` (double, required)

### RakeSignDocumentCcItems

- `name` (string, required)
- `email` (string, required)

### RakeSignDocumentReminders

- `enabled` (boolean, required)
- `firstAfterDays` (double, required)
- `repeatEveryDays` (double, required)
- `expiresBeforeDays` (integer, optional)

### RakeSignDocumentBranding

- `name` (string, required)
- `accentColor` (string, required)
- `logoDataUrl` (string, optional)

### Schema0

- string
- double
- boolean
- list of Schema0
- map from string to Schema0

### RakeSignDocumentStagesItemsRecipientsItems

- `id` (string, required)
- `name` (string, required)
- `email` (string, required)
- `status` (enum, required)
  - Allowed values: `pending`, `awaiting_consent`, `signed`, `approved`, `declined`, `skipped`
- `delegationId` (string, optional)
- `signedAt` (string, optional)
- `typedName` (string, optional)
- `viewedAt` (string, optional)
- `approvedAt` (string, optional)
- `declinedAt` (string, optional)
- `declineReason` (string, optional)
- `nextReminderAt` (string, optional)
- `lastInvitedAt` (string, optional)
- `deliveryError` (string, optional)
- `version` (integer, optional)

### RakeSignDocumentFieldsItemsDefaultValue

- string
- boolean

## Examples

**Request**

```json
{
  "file": "<file: [object Object]>",
  "version": {
    "type": "json"
  }
}
```

**Response**

```json
{
  "id": "string",
  "title": "string",
  "teamId": "string",
  "ownerId": "string",
  "privacy": "team",
  "status": "draft",
  "message": "string",
  "placement": "page",
  "stages": [
    {
      "id": "string",
      "mode": "all",
      "recipients": [
        {
          "id": "string",
          "name": "string",
          "email": "string",
          "status": "pending",
          "delegationId": "string",
          "signedAt": "string",
          "typedName": "string",
          "viewedAt": "string",
          "approvedAt": "string",
          "declinedAt": "string",
          "declineReason": "string",
          "nextReminderAt": "string",
          "lastInvitedAt": "string",
          "deliveryError": "string",
          "version": 1
        }
      ],
      "role": "signer",
      "delayHours": 1.1,
      "condition": {},
      "skipped": true
    }
  ],
  "fields": [
    {
      "id": "string",
      "kind": "signature",
      "slot": 1,
      "page": 1,
      "x": 0.5,
      "y": 0.5,
      "width": 0.5,
      "height": 0.5,
      "label": "string",
      "required": true,
      "options": [
        "string"
      ],
      "maxLength": 1,
      "defaultValue": "string",
      "attachmentId": "string",
      "localPage": 1
    }
  ],
  "createdAt": "string",
  "updatedAt": "string",
  "version": 1,
  "activity": [
    {
      "id": "string",
      "at": "string",
      "text": "string"
    }
  ],
  "source": "app",
  "integrationId": "string",
  "integrationName": "string",
  "signingMode": "manual",
  "delegation": {
    "templateId": "string",
    "templateVersion": 1
  },
  "templateOrigin": {
    "templateId": "string",
    "templateVersion": 1,
    "templateName": "string"
  },
  "attachments": [
    {
      "id": "string",
      "fileId": "string",
      "name": "string",
      "mimeType": "string",
      "pageCount": 1,
      "startPage": 1,
      "sha256": "string",
      "renditionSha256": "string"
    }
  ],
  "pageCount": 1,
  "pages": [
    {
      "width": 1.1,
      "height": 1.1
    }
  ],
  "preparationReviewed": true,
  "contentNeedsRender": true,
  "cc": [
    {
      "name": "string",
      "email": "string"
    }
  ],
  "language": "en",
  "expiresInDays": 1.1,
  "expiresAt": "string",
  "reminders": {
    "enabled": true,
    "firstAfterDays": 1.1,
    "repeatEveryDays": 1.1,
    "expiresBeforeDays": 1
  },
  "allowReassignment": true,
  "branding": {
    "name": "string",
    "accentColor": "string",
    "logoDataUrl": "string"
  },
  "variables": {},
  "brandingId": "string",
  "purpose": "string",
  "generation": {},
  "extraction": {},
  "postSign": {},
  "fileName": "string",
  "fileId": "string",
  "generatedText": "string",
  "runId": "string",
  "error": "string",
  "sending": true,
  "errorCode": "concurrent_envelope_limit",
  "limit": 1,
  "sentAt": "string",
  "completedAt": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.cloudraker.com/v1/signing/documents/id/upload"

files = { "file": "open('[object Object]', 'rb')" }
payload = { "version": "{
  \"type\": \"json\"
}" }
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cloudraker.com/v1/signing/documents/id/upload';
const form = new FormData();
form.append('file', '[object Object]');
form.append('version', '{
  "type": "json"
}');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

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

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/v1/signing/documents/id/upload"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"[object Object]\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n{\n  \"type\": \"json\"\n}\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/v1/signing/documents/id/upload")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"[object Object]\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n{\n  \"type\": \"json\"\n}\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.cloudraker.com/v1/signing/documents/id/upload")
  .header("Authorization", "Bearer <token>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"[object Object]\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n{\n  \"type\": \"json\"\n}\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.cloudraker.com/v1/signing/documents/id/upload', [
  'multipart' => [
    [
        'name' => 'file',
        'filename' => '[object Object]',
        'contents' => null
    ],
    [
        'name' => 'version',
        'contents' => '{
  "type": "json"
}'
    ]
  ]
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/v1/signing/documents/id/upload");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"[object Object]\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n{\n  \"type\": \"json\"\n}\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]
let parameters = [
  [
    "name": "file",
    "fileName": "[object Object]"
  ],
  [
    "name": "version",
    "value": "{
  \"type\": \"json\"
}"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/v1/signing/documents/id/upload")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```