Skip to main content
POST
Associate File with Resource

Authorizations

Authorization
string
header
required

JWT token from Stytch B2B authentication (magic link, SSO, or M2M)

Headers

Idempotency-Key
string | null

Path Parameters

file_id
string
required

File ID

Example:

"file_abc123"

Body

application/x-www-form-urlencoded
resource_type
string
required

Resource type: chat, dataset, fine_tuning_job, etc.

resource_id
string
required

ID of the resource to associate with

Response

File associated successfully

The response is of type Response Associatefile · object.