Skip to main content
POST
/
v1
/
files
/
{file_id}
/
associations
Associate File with Resource
curl --request POST \
  --url https://api.cuadra.ai/v1/files/{file_id}/associations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'resource_type=<string>' \
  --data 'resource_id=<string>'
{}

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.