Skip to main content
POST
Upload evidence files

Authorizations

Authorization
string
header
required

You can use an OAuth2 JWT bearer token in the Authorization header of your API requests for supported endpoints: Authorization: Bearer <YOUR_JWT_HERE>. These tokens are valid for 10 minutes and can be requested via the access token endpoint endpoint.

Scopes

disputeevidences:create

Headers

x-idempotency-key
string<uuid>
required

Idempotency key to be used. Sending again the same key would return the same result without re-executing the update.

Path Parameters

disputeId
string<uuid>
required

Identifier of the resource in Payrails.

Query Parameters

async
boolean
default:false

Classify the uploaded files in the background.

Body

multipart/form-data

Evidence to upload for the dispute. Provide at least one of files[] (binary file uploads) or inlineContexts (inline JSON context); both may be combined in a single request. A request with neither is rejected.

files[]
object[]

List of files supporting the dispute defense.

inlineContexts
object[]

Inline merchant-context evidences supplied as a JSON array in a single inlineContexts form field. Each item is stored as JSON evidence with no uploaded file. Maximum 10 items.

labels
string[]

Evidence slugs from the representment plan to set on every uploaded file, such as the slug of the missing evidence the upload answers. Repeat the field for each label. Maximum 10, each at most 100 bytes of UTF-8.

Maximum array length: 10
Minimum string length: 1
Example:
sectionId
string<uuid>

Text section of the representment draft to link every uploaded file to. The section text is not changed, and the draft and its PDF are not regenerated. A plan in RepresentmentReady returns to EvidencesReady. Regenerating stays an operator action through submit-plan. Returns 409 while the representment PDF is being generated.

Response

Dispute evidences uploaded.

evidences
object[]
required
failedEvidences
object[]
required

Files that failed to upload, or were stored but not labelled or linked to the section.

classifications
object[]

AI classifications. Omitted when the evidence agent feature is not enabled.