Upload handshake documents (organization)
POST /v1/handshakes/{id}/documents
- Scope
handshakes:edit- Roles
- admin, scheduler
Multipart upload. Each entry may carry a file plus categories, tags and the document setting it satisfies. Documents are stamped as uploaded by the organization.
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
id required | string | Handshake ID. |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Request body required
| Field | Type | Description |
|---|---|---|
documents required | array of object | min items 1. |
documents[].file | string (binary) | |
documents[].id | integer or null | Existing document to keep or update. |
documents[].file_name | string | |
documents[].document_setting_id | integer or null | Example |
documents[].categories | array of string | |
documents[].tags | array of string |
Example
{
"documents": [
{
"file": "string",
"id": 0,
"file_name": "string",
"document_setting_id": 1,
"categories": [
"string"
],
"tags": [
"string"
]
}
]
}Example request
curl -X POST "https://api.fetchfido.ai/v1/handshakes/{id}/documents" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID" \
-H "Content-Type: application/json" \
-d '{"documents":[{"file":"string","id":0,"file_name":"string","document_setting_id":1,"categories":["string"],"tags":["string"]}]}'Try it
Responses
201 Documents uploaded successfully
Documents uploaded successfully.
{
"success": true,
"message": "Documents uploaded successfully.",
"data": [
{
"id": 18,
"documentName": "Signed NDA.pdf",
"documentPath": "string",
"temporaryUrl": "string",
"uploadedBy": "organization",
"categories": [
{
"id": 3,
"value": 3,
"label": "Contracts",
"isCustom": false
}
],
"tags": [
{
"id": 7,
"value": 7,
"label": "Onboarding",
"isCustom": true
}
],
"createdAt": "string"
}
]
}Response fields (19)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | array of object | |
data[].id | integer | Example |
data[].documentName | string | Example |
data[].documentPath | string or null | Stored object key. |
data[].temporaryUrl | string or null | The stored object key, as sent today — not a presigned link. |
data[].uploadedBy | string | One of: |
data[].categories | array of object | |
data[].categories[].id | integer | Example |
data[].categories[].value | integer | Example |
data[].categories[].label | string | Example |
data[].categories[].isCustom | boolean | Example |
data[].tags | array of object | |
data[].tags[].id | integer | Example |
data[].tags[].value | integer | Example |
data[].tags[].label | string | Example |
data[].tags[].isCustom | boolean | Example |
data[].createdAt | string (date-time) or null |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'handshakes:edit' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
422 Validation failed
Validation failed — documents is required.
{
"success": false,
"message": "Unable to save. Please check the highlighted fields",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Details when the handler has them — a field-keyed object, a single string, or null. |
code | string | Empty unless the handler sets one. Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |