POST
/
attachments

Note that this endpoint doesn’t directly send the file to any Devin session. Instead, it saves the uploaded file in our servers and returns a URL to the file. You can then provide the URL to Devin by including it in the prompt when you create a new session or send a message.

with open("data.csv", "rb") as f:
    response = requests.post(
        "https://api.devin.ai/v1/attachments",
        headers={"Authorization": f"Bearer {DEVIN_API_KEY}"},
        files={"file": f}
    )
file_url = response.text

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
file
file

The file to upload

Response

200 - text/plain

A string URL where the uploaded file can be accessed