Files
Endpoints для загрузки файлов через upload intents.
Создать upload intent
Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Sanctum token in Authorization: Bearer <token> format.
Header parameters
Idempotency-Keystring · min: 8 · max: 191Optional
Makes unsafe requests safely repeatable for 24 hours by default.
X-Correlation-Idstring · max: 128Optional
Client-defined id used to correlate API request and webhook events.
Body
purposestring · enumRequiredPossible values:
resource_typestring · nullableOptional
resource_idstring · nullableOptional
field_keystring · nullableOptional
allowed_extensionsstring[] · nullableOptional
max_bytesinteger · nullableOptional
Responses
201
Upload intent.
application/json
stateinteger · enumRequiredPossible values:
messagestringRequired
422
Standard error envelope.
application/json
post/private/files/upload-intents
POST /api/v3/private/files/upload-intents HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 142
{
"purpose": "identity_verification",
"resource_type": "text",
"resource_id": "text",
"field_key": "text",
"allowed_extensions": [
"text"
],
"max_bytes": 1
}{
"state": 0,
"message": "text",
"result": {
"upload_intent": {
"id": 1,
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"purpose": "text",
"resource_type": "text",
"resource_id": "text",
"field_key": "text",
"status": "pending",
"allowed_extensions": [
"text"
],
"max_bytes": 1,
"file": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"expires_at": "2026-01-01T00:00:00.000Z",
"committed_at": "2026-01-01T00:00:00.000Z",
"consumed_at": "2026-01-01T00:00:00.000Z"
}
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Получить upload intent
Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Sanctum token in Authorization: Bearer <token> format.
Path parameters
intentstring · uuidRequired
Responses
200
Upload intent.
application/json
stateinteger · enumRequiredPossible values:
messagestringRequired
404
Standard error envelope.
application/json
get/private/files/upload-intents/{intent}
GET /api/v3/private/files/upload-intents/{intent} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": {
"upload_intent": {
"id": 1,
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"purpose": "text",
"resource_type": "text",
"resource_id": "text",
"field_key": "text",
"status": "pending",
"allowed_extensions": [
"text"
],
"max_bytes": 1,
"file": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"expires_at": "2026-01-01T00:00:00.000Z",
"committed_at": "2026-01-01T00:00:00.000Z",
"consumed_at": "2026-01-01T00:00:00.000Z"
}
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Загрузить файл по upload intent
Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Sanctum token in Authorization: Bearer <token> format.
Path parameters
intentstring · uuidRequired
Header parameters
Idempotency-Keystring · min: 8 · max: 191Optional
Makes unsafe requests safely repeatable for 24 hours by default.
X-Correlation-Idstring · max: 128Optional
Client-defined id used to correlate API request and webhook events.
Body
filestring · binaryRequired
Responses
200
Standard success envelope.
application/json
stateinteger · enumRequiredPossible values:
messagestringRequired
resultany · nullableRequired
422
Standard error envelope.
application/json
post/private/files/upload-intents/{intent}/commit
POST /api/v3/private/files/upload-intents/{intent}/commit HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}{
"state": 0,
"message": "text",
"result": null,
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Последнее обновление
Это было полезно?